Compiling the IMAP Server

    Once you have unpacked the files by extracting the tar archive, "cd" to
    the "cyrus-imapd-NNNN" directory where NNNN is the version number. The
    configuration files and various subdirectories are stored there. In the
    directory that the configure file is in, type "./configure" to
    configure the software. Please continue to read this document as there
    are switches to ./configure that may apply to you. 

configure Overview

    The "configure" shell script attempts to guess correct values for
    various system-dependent variables used during compilation. It uses
    those values to create a "Makefile" in each directory of the package.
    Finally, it creates a shell script "config.status" that you can run in
    the future to recreate the current configuration, a file "config.cache"
    that saves the results of its tests to speed up reconfiguring, and a
    file "config.log" containing compiler output (useful mainly for
    debugging "configure"). 

    Running "configure" takes awhile. While running, it prints some
    messages telling which features it is checking for. 

    You can compile the package in a different directory from the one
    containing the source code. Doing so allows you to compile it on more
    than one kind of computer at the same time. To do this, you must use a
    version of "make" that supports the "VPATH" variable, such as GNU
    "make". "cd" to the directory where you want the object files and
    executables to go and run the "configure" script. "configure"
    automatically checks for the source code in the directory that
    "configure" is in and in "..". 

    By default, "make install" will install files (other than
    server-specific programs) in "/usr/local/bin", "/usr/local/man", etc.
    You can specify an installation prefix other than "/usr/local" by
    giving "configure" the option "--prefix=PATH". 

    You can specify separate installation prefixes for
    architecture-specific files and architecture-independent files. If you
    give "configure" the option "--exec-prefix=PATH", the package will use
    PATH as the prefix for installing programs and libraries. Documentation
    and other data files will still use the regular prefix. 

    By default, "make install" will install the server-specific programs in
    "/usr/cyrus/bin". You can specify a server-specific installation prefix
    other than "/usr/cyrus" by giving "configure" the option
    "--with-cyrus-prefix=PATH". 

Options to configure

    Here are a list of switches that can be used with "configure". 3 

    --help  Print a summary of the options to "configure", and exit. 

    --with-auth=METHOD 
            Specifies the authorization (group membership) module to use.
            Currently implemented authorization modules are: 

            unix    Unix /etc/passwd and /etc/group file 
            krb     Kerberos principals (requires Kerberos libraries).
                    Optionally, specify where to find Kerberos v4 with
                    "--with-krb=DIR" IMPORTANT: The Kerberos v4 support
                    requires the DES library. Some vendor distributions of
                    Kerberos, including the one with Solaris, do not have
                    this support and cannot be used. 
            krb_pts Kerberos principals with AFS PTserver groups (requires
                    Kerberos and AFS libraries). Optionally, specify where
                    the AFS libraries are found with "--with-afs=PATH".
                    Also requires krb support as above. 

            Any method of authenticating with SASL can be used with any
            authorization module.

    --with-cyrus-group=USER 
            Specifies the group used for installing setguid programs. By
            default, configure uses "mail". 

    --with-cyrus-prefix=PATH 
            Change the location of the server software. By default, the
            cyrus-prefix is /usr/cyrus.

    --with-cyrus-user=USER 
            Specifies the userid that the Cyrus IMAP server will run as. By
            default, configure uses "cyrus". 

    --with-notify=METHOD 
    --without-notify 
            Specifies the new mail notification method to use. Currently
            implemented notification methods are: 

            zephyr  New mail notification through Zephyr. Specify the
                    location of the zephyr installation with
                    "--with-zephyr=PATH". 
            unix    New mail notification through a Unix sockets daemon.
                    See overview.html for details. 
            no      No new mail notification. 

            By default, uses "zephyr" if the Zephyr libraries are
            available, otherwise "no".

    --with-idle=METHOD 
            Specifies the IMAP IDLE method to use. Currently implemented
            IDLE methods are: 

            idled   Use the IDLE daemon. The IDLE daemon listens on a UNIX
                    socket for messages from lmtpd/imapd/pop3d that a
                    mailbox has been updated. The daemon then signals those
                    (if any) imapd that are idling on the mailbox to check
                    for the changes. 
            poll    Periodically poll the mailbox for changes. 
            no      Disable IMAP IDLE. 

            By default, uses "poll".

    --with-sasldir=PATH 
            Specifies the path to the directories containing the library
            (.../lib) and include (.../include) files for libsasl. 

    --with-statedir=PATH 
            Specifies the directory used for communicating with various
            daemons. By default, configure uses "/var". 

    --with-openssl=PATH 
            Specifies where to find the OpenSSL library.

    --with-inn=PATH 
            Specifies the location of INN's NEWSLIB directory. By default,
            looks for INN in a few common places. It is only necessary for
            "configure" to find INN if you are going to export newsgroups
            using IMAP. 

    --with-tcl=PATH 
    --without-tcl 
            Specifies the path to the Tcl (version 7.5 or 7.6) library and
            header file (optional). By default, looks in "/usr/local" and
            then in the compiler's default link path. The Tcl library is
            necessary to compile "cyradm", the administrative client. If
            compiling without Tcl, it is necessary to give configure the
            "--disable-cyradm" switch. 

    --with-lock=METHOD 
            Specifies the locking method to use. Currently implemented
            locking methods are: 

            flock   flock() locking 
            fcntl   fcntl() locking 

            By default, uses "flock" if the "flock()" function exists,
            "fcntl" otherwise. 

    --disable-sieve 
            By default, Sieve support is enabled. Use --disable-sieve to
            disable compiling the Sieve library and to disable all Sieve
            support.

    --disable-cyradm 
            Do not compile the cyradm administrative client.

    --disable-server 
            Do not compile the IMAP server programs.

    "configure" ignores any other arguments that you give it. 

    Some systems require unusual options for compilation or linking that
    the "configure" script does not know about. You can give "configure"
    initial values for variables by setting them in the environment. Using
    a Bourne-compatible shell, you can do that on the command line like
    this: 

       CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure

    Or on systems that have the "env" program, you can do it like this: 

       env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure

    The "make" variables that you might want to override with environment
    variables when running "configure" are: 

    CC      C compiler program.
            Default is "cc", or "gcc" if "gcc" is in your PATH.
            (For "CC", any value given in the environment overrides the
            value that "configure" would choose.) 
    CFLAGS  Debugging and optimization options for the C compiler.
    CPPFLAGS 
            Header file search directory ("-IDIR") and any other
            miscellaneous options for the C preprocessor and compiler. If
            it is not set in the environment when "configure" runs, the
            default value is empty.
    LDFLAGS Stripping ("-s") and any other miscellaneous options for the
            linker. If it is not set in the environment when "configure"
            runs, the default value is empty. 
    DEFS    Configuration options, in the form "-Dfoo -Dbar ..."
    LIBS    Libraries to link with, in the form "-lfoo -lbar ..."
            (For "DEFS" and "LIBS", any value given in the environment is
            added to the value that "configure" chooses.) 

    If you need to do unusual things to compile the package, we encourage
    you to figure out how "configure" could check whether to do them. After
    doing so, please send us a patch! Instructions for doing so can be
    found on the feedback page. 

    The file "configure.in" is used as a template to create "configure" by
    a program called "autoconf". You will only need it if you want to
    regenerate "configure" using a newer version of "autoconf". 

    Once you have successfully run "configure", execute the following
    commands: 

       make depend
       make all CFLAGS=-O

    If you want, you can override the "make" variables CFLAGS and LDFLAGS
    by entering the following: 

       make all CFLAGS=-O2 LDFLAGS=-s

