VMime :: a C++ mail library

Sections

Documentation

Building VMime

What you need

To build VMime from the sources, you need the following:

Configuration and build using SCons

VMime features are configurable by setting options on the build command. To see which options are available for your version, type the following command in the root of the source tree:

$ scons -h

The build process can be run using the command scons with one or more configuration options. If you set no option, defaults are used. This is an example of a build command line:

$ scons prefix=/usr/local debug=yes with_messaging=yes

As of version 0.7.2cvs, the following options are available:

prefix = path
This option specifies the installation target directory prefix. Default is '/usr'. It means that the include files will be put in /usr/include/vmime and the library files (.a file) in /usr/lib.
debug = { yes | no }
Used to build a debug version of the library (useful for developers only). Defaults to 'no'. If set to 'yes', the compiler flag -g will be used.
with_filesystem = { yes | no }
Enable file-system support (this is needed for "maildir" messaging support). Default is 'yes'.
with_messaging = { yes | no }
Enable/disable messaging support (connection to mail store/transport servers). Default is 'yes'.
with_messaging_protocols = "protocol list"
Specifies which protocols to build into the library. This option has no effect if the option with_messaging is not activated. Separate protocols with spaces; string must be quoted with "". Default is "pop3 smtp imap maildir sendmail".
with_platforms = "platform list"
Enable support for the specified platforms.
with_sasl = { yes | no }
Enable SASL support for authentication. Only used if messaging is enabled. This requires the GNU SASL library.
sendmail_path = path
Specifies path to sendmail binary. This is only used on POSIX platforms, when 'sendmail' protocol is enabled.
byte_order = { big | little }
Specify byte order for the target platform: big-endian (most significant bit first) or little-endian (least significant bit first). Default is 'little'.

To install the library binary files and include files to the specified directory (using the prefix option), execute the following command (must be root):

# scons install

And voila! You now have an usable installation of VMime library.

Alternative using autotools

Since version 0.6.1, an alternate build system using autotools is supported by VMime. This is recommended if you are building VMime on platforms other than GNU/Linux, as this ensures maximum portability when detecting libraries and include files.

Autotools support is only available in the tarball distribution of VMime. To build the support from the CVS source, you will have to build the target 'autotools' with SCons:

$ scons autotools

This will generate all the files needed by autoconf, automake and a build system compatible with libtool and pkg-config. Note that you have to have autotools installed on your system for this to work (automake >= 1.8, autoconf >= 2.5).

Then, you can use the classic build commands to build the library:

$ ./configure
$ make
# make install

To get some information about available options for configure, type:

$ ./configure --help