configure.in revision 1d9f94199ff5c49cf9df18fd0c9eb85c0fb77a6c
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAM_CONFIG_HEADER(config.h)
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAM_INIT_AUTOMAKE(dovecot, 0.98.4)
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAM_MAINTAINER_MODE
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAC_STDC_HEADERS
538303a216166f3526c0ae9658c9978275cfa100Timo SirainenAC_ARG_PROGRAM
538303a216166f3526c0ae9658c9978275cfa100Timo SirainenAM_PROG_LIBTOOL
7ef3553585e556f35d5919589cfdc1de3329e4bbTimo SirainenAC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h)
538303a216166f3526c0ae9658c9978275cfa100Timo SirainenAC_CHECK_HEADERS(sys/uio.h sys/sendfile.h linux/mman.h)
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen# check posix headers
538303a216166f3526c0ae9658c9978275cfa100Timo SirainenAC_CHECK_HEADERS(sys/time.h)
538303a216166f3526c0ae9658c9978275cfa100Timo SirainenAC_ARG_ENABLE(ipv6,
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen[ --enable-ipv6 Enable IPv6 support (default)],
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen if test x$enableval = xno; then
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen want_ipv6=yes
538303a216166f3526c0ae9658c9978275cfa100Timo Sirainen want_ipv6=yes)
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAC_ARG_WITH(file-offset-size,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen[ --with-file-offset-size=BITS Set size of file offsets. Usually 32 or 64.
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen (default: 64 if available)],
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen preferred_off_t_bits=$withval,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen preferred_off_t_bits=64)
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAC_ARG_WITH(mem-align,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen[ --with-mem-align=BYTES Set the memory alignment (default: 8)],
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen mem_align=$withval,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAC_ARG_WITH(passwd,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen[ --with-passwd Build with /etc/passwd support (default)],
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen if test x$withval = xno; then
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_passwd=no
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_passwd=yes
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_passwd=yes)
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAC_ARG_WITH(passwd-file,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen[ --with-passwd-file Build with passwd-like file support (default)],
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen if test x$withval = xno; then
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_passwd_file=no
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_passwd_file=yes
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_passwd_file=yes)
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAC_ARG_WITH(shadow,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen[ --with-shadow Build with shadow password support (default)],
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen if test x$withval = xno; then
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_shadow=no
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_shadow=yes
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_shadow=yes)
23bdbb7b1831785c6ba6df190f6369da882d2b9dTimo SirainenAC_ARG_WITH(pam,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen[ --with-pam Build with PAM support (default)],
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen if test x$withval = xno; then
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_pam=yes)
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo SirainenAC_ARG_WITH(vpopmail,
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen[ --with-vpopmail Build with vpopmail support (default)],
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen if test x$withval = xno; then
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_vpopmail=no
eac60b7aef3924a611656b184412be1e80b2ed5bTimo Sirainen want_vpopmail=yes
eac60b7aef3924a611656b184412be1e80b2ed5bTimo Sirainen want_vpopmail=yes)
eac60b7aef3924a611656b184412be1e80b2ed5bTimo SirainenAC_ARG_WITH(gnutls,
eac60b7aef3924a611656b184412be1e80b2ed5bTimo Sirainen[ --with-gnutls Build with GNUTLS (default)],
eac60b7aef3924a611656b184412be1e80b2ed5bTimo Sirainen if test x$withval = xno; then
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_gnutls=no
e8bdf1be00aec45d0c6dd72ad9c8be02a3dfc778Timo Sirainen want_gnutls=yes
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen want_gnutls=yes)
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainendnl ** just some generic stuff...
65d89650662f7f1681a3431c585bfc9721a85149Timo SirainenAC_CHECK_FUNC(socket, [], [
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen AC_CHECK_LIB(socket, socket, [
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen LIBS="$LIBS -lsocket"
65d89650662f7f1681a3431c585bfc9721a85149Timo SirainenAC_CHECK_FUNC(inet_addr, [], [
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen AC_CHECK_LIB(nsl, inet_addr, [
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen LIBS="$LIBS -lnsl"
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainendnl * after -lsocket and -lnsl tests, inet_aton() may be in them
65d89650662f7f1681a3431c585bfc9721a85149Timo SirainenAC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise setreuid)
65d89650662f7f1681a3431c585bfc9721a85149Timo SirainenAC_CHECK_FUNCS(strcasecmp stricmp vsnprintf memmove vsyslog writev)
65d89650662f7f1681a3431c585bfc9721a85149Timo SirainenAC_CHECK_FUNC(poll, [
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen have_poll=yes
65d89650662f7f1681a3431c585bfc9721a85149Timo SirainenAM_CONDITIONAL(IOLOOP_POLL, test "$have_poll" = "yes")
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainendnl * gcc specific options
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainenif test "x$ac_cv_prog_gcc" = "xyes"; then
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen # -Wchar-subscripts -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen CFLAGS="$CFLAGS -Wall -W"
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainendnl * OS specific options
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainencase "$host_os" in
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainen CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
65d89650662f7f1681a3431c585bfc9721a85149Timo Sirainendnl * off_t checks, try to make it 64bit
65d89650662f7f1681a3431c585bfc9721a85149Timo SirainenAC_DEFINE_UNQUOTED(_FILE_OFFSET_BITS, $preferred_off_t_bits)
dnl * older autoconfs don't include sys/types.h, so do it manually
#include <stdio.h>
#include <sys/types.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/socket.h>],
AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
#include <time.h>],
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>],
#include <unistd.h>
#include <sys/mman.h>
dnl ** shadow/pam support
AC_CHECK_HEADER(security/pam_appl.h, [
vpop_libdeps="$vpopmail_home/etc/lib_deps"
VPOPMAIL_CFLAGS="`cat $vpopmail_home/etc/inc_deps` $CFLAGS"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>],
echo '#include "lib.h"' >> $file
echo '#include "mail-storage.h"' >> $file