configure.in revision 73a552a9ed06cd6017ad4ee4b252a8b38c8ac42d
c25356d5978632df6203437e1953bcb29e0c736fTimo SirainenAC_PREREQ([2.59])
c25356d5978632df6203437e1953bcb29e0c736fTimo SirainenAC_INIT([dovecot],[1.1.UNSTABLE],[dovecot@dovecot.org])
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo SirainenAC_CONFIG_SRCDIR([src])
c5e62353a11087958ea4e619660e084a613e1a37Timo SirainenAM_INIT_AUTOMAKE
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAM_MAINTAINER_MODE
decb23442f9e6cd5c4845a9cb162029b8c6d5f0fTimo SirainenAC_PROG_CXX # lucene plugin needs this
2f7c73483ff5474a74a83a646f82e1b60f687680Aki TuomiAC_HEADER_STDC
cd94aeaa294f7cc507206b4b2075852f00e14d61Timo SirainenAC_PROG_LIBTOOL
decb23442f9e6cd5c4845a9cb162029b8c6d5f0fTimo SirainenAC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h \
cd94aeaa294f7cc507206b4b2075852f00e14d61Timo Sirainen sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \
cd94aeaa294f7cc507206b4b2075852f00e14d61Timo Sirainen sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h \
decb23442f9e6cd5c4845a9cb162029b8c6d5f0fTimo Sirainen mntent.h sys/mnttab.h sys/event.h sys/time.h sys/mkdev.h linux/dqblk_xfs.h \
b55f914c0ade77252cfd798ea8eb9a84bda56315Timo Sirainen xfs/xqm.h sasl.h sasl/sasl.h execinfo.h ucontext.h)
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAC_ARG_ENABLE(ipv6,
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen[ --enable-ipv6 Enable IPv6 support (default)],
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test x$enableval = xno; then
7fa573e6ea36024f618492e7d3649a69c1b41028Timo Sirainen want_ipv6=yes
5a9e240ebf8d0daaf029973973b52e415148070bTimo Sirainen want_ipv6=yes)
d99107ddf4d9bccb710994482daf65276a9d6321Timo SirainenAC_ARG_ENABLE(debug,
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen[ --enable-debug Enable some extra expensive checks for developers],
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test x$enableval = xyes; then
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen AC_DEFINE(DEBUG,, Build with extra debugging checks)
cd94aeaa294f7cc507206b4b2075852f00e14d61Timo SirainenAC_ARG_ENABLE(asserts,
a05fec120ecd8c4ed6331c42100cba42adf22893Stephan Bosch[ --enable-asserts Enable asserts (default)],
a05fec120ecd8c4ed6331c42100cba42adf22893Stephan Bosch if test x$enableval = xno; then
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen AC_DEFINE(DISABLE_ASSERTS,, Disable asserts)
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo SirainenAC_ARG_WITH(file-offset-size,
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen[ --with-file-offset-size=BITS Set size of file offsets. Usually 32 or 64.
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen (default: 64 if available)],
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen preferred_off_t_bits=$withval,
36b072d84a9076c3c483bf710444a716e987ccc3Stephan Bosch preferred_off_t_bits=64)
36b072d84a9076c3c483bf710444a716e987ccc3Stephan BoschAC_ARG_WITH(mem-align,
36b072d84a9076c3c483bf710444a716e987ccc3Stephan Bosch[ --with-mem-align=BYTES Set the memory alignment (default: 8)],
36b072d84a9076c3c483bf710444a716e987ccc3Stephan Bosch mem_align=$withval,
f32d0295c90ed810889504cdfa5e1a25a415f65fStephan BoschAC_ARG_WITH(ioloop,
04eb0abcf8f8b0c014499b5c5bae89484553613fStephan Bosch[ --with-ioloop=IOLOOP Specify the I/O loop method to use
04eb0abcf8f8b0c014499b5c5bae89484553613fStephan Bosch (epoll, kqueue, poll; best for the fastest available;
36b072d84a9076c3c483bf710444a716e987ccc3Stephan Bosch default is poll)],
36b072d84a9076c3c483bf710444a716e987ccc3Stephan Bosch ioloop=$withval,
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo SirainenAC_ARG_WITH(notify,
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen[ --with-notify=NOTIFY Specify the file system notification method to use
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen (inotify, kqueue, dnotify, none;
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen default is detected in the above order)],
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen notify=$withval,
529944a3554da75c2e6231a25fe489d815519b22Stephan BoschAC_ARG_WITH(linux-quota,
f32d0295c90ed810889504cdfa5e1a25a415f65fStephan Bosch[ --with-linux-quota=n Linux quota version to use (default: system's)],
8ac6623677005256bf99ab33a2ed98c69c1d656cStephan Bosch AC_DEFINE_UNQUOTED(_LINUX_QUOTA_VERSION, $withval,
f32d0295c90ed810889504cdfa5e1a25a415f65fStephan Bosch [Linux quota version to use])
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAC_ARG_WITH(passwd,
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen[ --with-passwd Build with /etc/passwd support (default)],
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test x$withval = xno; then
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_passwd=no
36b072d84a9076c3c483bf710444a716e987ccc3Stephan Bosch want_passwd=yes
d694a52bce62c52080c3f87a56dcf77030fd2712Timo Sirainen want_passwd=yes)
009217abb57a24a4076092e8e4e165545747839eStephan BoschAC_ARG_WITH(passwd-file,
2598b2f36365b52d9754b9348a5be29569293e46Timo Sirainen[ --with-passwd-file Build with passwd-like file support (default)],
6303191abcb37164f435ccdc56e9dbddf1288851Timo Sirainen if test x$withval = xno; then
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_passwd_file=no
fd3d068169c6ec587c9c446f2ee45560a444334aTimo Sirainen want_passwd_file=yes
fd3d068169c6ec587c9c446f2ee45560a444334aTimo Sirainen want_passwd_file=yes)
0dffa25d211be541ee3c953b23566a1a990789dfTimo SirainenAC_ARG_WITH(shadow,
6d24551e169c0808695db35d7a228f1970a84c75Timo Sirainen[ --with-shadow Build with shadow password support (default)],
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen if test x$withval = xno; then
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_shadow=no
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_shadow=yes
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen want_shadow=yes)
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo SirainenAC_ARG_WITH(pam,
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen[ --with-pam Build with PAM support (default)],
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen if test x$withval = xno; then
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen want_pam=yes)
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAC_ARG_WITH(checkpassword,
46ec792dd4ccf6c34706c4774228301fafde6aa9Timo Sirainen[ --with-checkpassword Build with checkpassword support (default)],
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen if test x$withval = xno; then
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen want_checkpassword=no
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen want_checkpassword=yes
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_checkpassword=yes)
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo SirainenAC_ARG_WITH(bsdauth,
2b96880f2d789d125aff6a95eaa7b51f558a6a1cTimo Sirainen[ --with-bsdauth Build with BSD authentication support (default)],
ae797f3368ebb86e7786ca25d7c9c703f672b9f5Timo Sirainen if test x$withval = xno; then
ae797f3368ebb86e7786ca25d7c9c703f672b9f5Timo Sirainen want_bsdauth=no
b84eff65e25ae86dfd6f798386577209b94838c6Timo Sirainen want_bsdauth=yes
00fa8dcbc66f56daa737487c9dec7166c37de79eTimo Sirainen want_bsdauth=yes)
ad004e44be109684521494b5af2ad1da39b8bb27Timo SirainenAC_ARG_WITH(gssapi,
97db4761382024093f441e4bc78ba8b6a056504dTimo Sirainen[ --with-gssapi Build with GSSAPI authentication support],
b045b66988bfbaa2795791e42ee724fae6f0db1cAki Tuomi if test x$withval = xno; then
b045b66988bfbaa2795791e42ee724fae6f0db1cAki Tuomi want_gssapi=no
c5e62353a11087958ea4e619660e084a613e1a37Timo Sirainen want_gssapi=yes
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_gssapi=no)
ad004e44be109684521494b5af2ad1da39b8bb27Timo SirainenAC_ARG_WITH(sia,
64e244defe74f513ce94f33d000a048ddbe2ea23Timo Sirainen[ --with-sia Build with Tru64 SIA support],
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen if test x$withval = xno; then
8ce3071e80b9973230048ecadfcb073fb82cc69fTimo SirainenAC_ARG_WITH(ldap,
fe791e96fdf796f7d8997ee0515b163dc5eddd72Aki Tuomi[ --with-ldap Build with LDAP support],
a8dac1be6a0c3adbbce5887ca395f418194c6c06Aki Tuomi if test x$withval = xno; then
53f97800b16ab3a8d263c5331132dec1e8fea9a0Aki Tuomi want_ldap=no
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen want_ldap=yes
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_ldap=no)
660b99a7059824676b2b8d6f79b8e15d47df25a2Timo SirainenAC_ARG_WITH(vpopmail,
5a9e240ebf8d0daaf029973973b52e415148070bTimo Sirainen[ --with-vpopmail Build with vpopmail support (default)],
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test x$withval = xno; then
bbba7d0fce1b6ce5baa2d7ef946eb1b63e2ab518Timo Sirainen want_vpopmail=no
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen want_vpopmail=yes
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_vpopmail=yes)
de754cb78f75e8b3b994cddafe41c9ed1467c33dTimo SirainenAC_ARG_WITH(static-userdb,
ddbdc644a15f56f4b43596f1b8c0fc196c101445Timo Sirainen[ --with-static-userdb Build with static userdb support (default)],
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test x$withval = xno; then
c49a19168dab6fda80aee16ad799a8a56d3bc18fTimo Sirainen want_static_userdb=no
a75907609d7c410c9e17beedfafbf28b4439fa8aTimo Sirainen want_static_userdb=yes
aebfda1f6e3a924c31e8f54237b81fabf4b2264cTimo Sirainen want_static_userdb=yes)
c49a19168dab6fda80aee16ad799a8a56d3bc18fTimo SirainenAC_ARG_WITH(prefetch-userdb,
38cb3d139aefb7c65919cf4aba5ded7b5fd50e6fTimo Sirainen[ --with-prefetch-userdb Build with prefetch userdb support (default)],
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen if test x$withval = xno; then
c49a19168dab6fda80aee16ad799a8a56d3bc18fTimo Sirainen want_prefetch_userdb=no
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_prefetch_userdb=yes
36b072d84a9076c3c483bf710444a716e987ccc3Stephan Bosch want_prefetch_userdb=yes)
02ccba3d3be96444abd15b5254864c9151bbeb30Timo SirainenAC_ARG_WITH(db,
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen[ --with-db Build with Berkeley DB support],
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen if test x$withval = xno; then
ce1a6c9b82117d253df9acd77e54ac84dd8a247eTimo Sirainendnl The --with-sql is useful only if Dovecot is being built with all the SQL
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainendnl drivers as modules. If any SQL driver is built-in, this option is ignored.
0dffa25d211be541ee3c953b23566a1a990789dfTimo SirainenAC_ARG_WITH(sql,
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen[ --with-sql Build with generic SQL support],
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen if test x$withval = xno; then
0dffa25d211be541ee3c953b23566a1a990789dfTimo SirainenAC_ARG_WITH(pgsql,
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen[ --with-pgsql Build with PostgreSQL driver support],
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen if test x$withval = xno; then
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen want_pgsql=no
6d24551e169c0808695db35d7a228f1970a84c75Timo Sirainen want_pgsql=yes
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen want_pgsql=no)
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo SirainenAC_ARG_WITH(mysql,
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen[ --with-mysql Build with MySQL driver support],
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen if test x$withval = xno; then
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen want_mysql=no
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen want_mysql=yes
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen want_mysql=no)
c5e62353a11087958ea4e619660e084a613e1a37Timo SirainenAC_ARG_WITH(sqlite,
c5e62353a11087958ea4e619660e084a613e1a37Timo Sirainen[ --with-sqlite Build with SQLite3 driver support],
c5e62353a11087958ea4e619660e084a613e1a37Timo Sirainen if test x$withval = xno; then
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen want_sqlite=no
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen want_sqlite=yes
c5e62353a11087958ea4e619660e084a613e1a37Timo Sirainen want_sqlite=no)
c5e62353a11087958ea4e619660e084a613e1a37Timo SirainenAC_ARG_WITH(lucene,
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen[ --with-lucene Build with CLucene full text search support],
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen if test x$withval = xno; then
f059a046515f4b2b15a6c2a10a6f12f6166e39a5Timo Sirainen want_lucene=no
f29756821a4c6b12b73e4a2a3e1c230117a43773Timo Sirainen want_lucene=yes
a05fec120ecd8c4ed6331c42100cba42adf22893Stephan Bosch want_lucene=no)
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAM_CONDITIONAL(BUILD_LUCENE, test "$want_lucene" = "yes")
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAC_ARG_WITH(ssl,
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen[ --with-ssl=[gnutls|openssl] Build with GNUTLS or OpenSSL (default)],
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test x$withval = xno; then
b66d803de86bfb411165b3465b0d9ef64ecfe2a1Timo Sirainen want_gnutls=no
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_openssl=no
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen elif test x$withval = xgnutls; then
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen want_gnutls=yes
68a4946b12583b88fa802e52ebee45cd96056772Timo Sirainen want_openssl=no
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen elif test x$withval = xopenssl; then
c4ec7cb598805b1387dc3aab59ec8f32d8cc24e1Timo Sirainen want_gnutls=no
c4ec7cb598805b1387dc3aab59ec8f32d8cc24e1Timo Sirainen want_openssl=yes
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_gnutls=no
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_openssl=yes
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen want_gnutls=no
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen want_openssl=yes
6a9e034441607c0c5a61858ff559af4615ac31caTimo SirainenAC_ARG_WITH(ssldir,
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen[ --with-ssldir=DIR SSL base directory for certificates (/etc/ssl)],
b55f914c0ade77252cfd798ea8eb9a84bda56315Timo Sirainen ssldir="$withval",
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAC_SUBST(ssldir)
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo SirainenAC_ARG_WITH(rundir,
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen[ --with-rundir=DIR Runtime data directory (LOCALSTATEDIR/run/dovecot)],
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen rundir="$withval",
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo Sirainen rundir=$localstatedir/run/$PACKAGE_NAME
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo SirainenAC_SUBST(rundir)
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAC_ARG_WITH(statedir,
ae797f3368ebb86e7786ca25d7c9c703f672b9f5Timo Sirainen[ --with-statedir=DIR Permanent data directory (LOCALSTATEDIR/lib/dovecot)],
ae797f3368ebb86e7786ca25d7c9c703f672b9f5Timo Sirainen statedir="$withval",
b84eff65e25ae86dfd6f798386577209b94838c6Timo Sirainen statedir=$localstatedir/lib/$PACKAGE_NAME
e248fe370c4047cee921a91b48edc37944ab0526Timo SirainenAC_SUBST(statedir)
9f627b360ed38fdc54cb02ec5e67246c3f0d5b0fTimo SirainenAC_ARG_WITH(gc,
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen[ --with-gc Use Boehm garbage collector],
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test x$withval = xyes; then
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen if test "x$withval" = xno; then
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo SirainenAC_ARG_WITH(pop3d,
717bb0dbaf4bd3f745669570647845e6d493bfe0Timo Sirainen[ --with-pop3d Build POP3 server (default)],
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen if test x$withval = xno; then
c5e62353a11087958ea4e619660e084a613e1a37Timo Sirainen want_pop3d=no
c5e62353a11087958ea4e619660e084a613e1a37Timo Sirainen want_pop3d=yes
moduledir=$libdir/dovecot
CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast"
#include <sys/epoll.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <sys/inotify.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
AC_DEFINE(PREAD_WRAPPERS,, Define if pread/pwrite needs _XOPEN_SOURCE 500)
#include <sys/types.h>
#include <stdio.h>
#include <sys/types.h>
dnl * older autoconfs don't include sys/types.h, so do it manually
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
d.d_type = DT_DIR;
#include <limits.h>
#include <sys/types.h>
#include <sys/types.h>
echo "..ignoring as requested.."
#include <sys/types.h>
dnl some systems don't have stdint.h, but still have some of the types
AC_CHECK_HEADER(stdint.h, [
stdint_include="#include <stdint.h>"
AC_CHECKTYPE2(socklen_t, [#include <sys/socket.h>])
AC_MSG_CHECKING([for /dev/urandom])
AC_DEFINE(HAVE_DEV_URANDOM,, Define if you have /dev/urandom)
AC_CHECK_HEADER(openssl/rand.h, [
AC_DEFINE(HAVE_OPENSSL_RAND_H,, Define if you have openssl/rand.h)
#include <time.h>]],
#include <stdio.h>
#include <time.h>
f = fopen("conftest.temp", "w");
max_bits=`cat conftest.temp`
rm -f conftest.temp
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>]],
#include <sys/types.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC);
unlink("conftest.mmap");
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include "fdpass.h"
send_fd = open("conftest.fdpass", O_CREAT|O_WRONLY);
unlink("conftest.fdpass");
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sendfile.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
dnl * Check for crypt() if unistd.h compiles with _XOPEN_SOURCE + _XPG6
#include <unistd.h>
AC_MSG_CHECKING([if statvfs.f_mntfromname exists])
#include <sys/types.h>
#include <sys/statvfs.h>
char *p = buf.f_mntfromname;
AC_DEFINE(HAVE_STATVFS_MNTFROMNAME,, Define if you have statvfs.f_mntfromname)
AC_MSG_CHECKING([if statvfs.f_mntfromname exists])
#include <sys/types.h>
#include <sys/statvfs.h>
char *p = buf.f_mntfromname;
AC_DEFINE(HAVE_STATVFS_MNTFROMNAME,, Define if you have statvfs.f_mntfromname)
AC_MSG_CHECKING([if statfs.f_mntfromname exists])
#include <sys/param.h>
#include <sys/mount.h>
char *p = buf.f_mntfromname;
AC_DEFINE(HAVE_STATFS_MNTFROMNAME,, Define if you have statfs.f_mntfromname)
dnl * Check if we have struct dqblk.dqb_curblocks
AC_MSG_CHECKING([if struct dqblk.dqb_curblocks exists])
#include <sys/types.h>
#include "$srcdir/src/plugins/quota/quota-fs.h"
unsigned int x = dqblk.dqb_curblocks;
AC_DEFINE(HAVE_STRUCT_DQBLK_CURBLOCKS,, Define if struct sqblk.dqb_curblocks exists)
dnl * Check if we have struct dqblk.dqb_curspace
AC_MSG_CHECKING([if struct dqblk.dqb_curspace exists])
#include <sys/types.h>
#include "$srcdir/src/plugins/quota/quota-fs.h"
unsigned int x = dqblk.dqb_curspace;
AC_DEFINE(HAVE_STRUCT_DQBLK_CURSPACE,, Define if struct sqblk.dqb_curspace exists)
#include <sys/types.h>
#include <sys/fs/ufs_quota.h>
#include <stdarg.h>
#include <stdarg.h>
#include <stdarg.h>
if pkg-config --exists openssl 2>/dev/null; then
AC_CHECK_HEADERS(gnutls/gnutls.h, [
AC_DEFINE(HAVE_SSL,, Build with SSL/TLS support)
AC_CHECK_HEADER(shadow.h, [
AC_CHECK_HEADER(security/pam_appl.h, [
Define if you have security/pam_appl.h)
AC_CHECK_HEADER(pam/pam_appl.h, [
Define if you have pam/pam_appl.h)
# have gssapi.h
AC_CHECK_HEADER([gssapi/gssapi.h], [
AC_DEFINE(HAVE_GSSAPI_GSSAPI_H,, GSSAPI headers in gssapi/gssapi.h)
AC_CHECK_HEADER([gssapi.h], [
AC_DEFINE(HAVE_GSSAPI_H,, GSSAPI headers in gssapi.h)
AC_CHECK_HEADER(ldap.h, [
#include <db.h>
AC_CHECK_HEADER(db.h, [
if test -r "$i/$j/libpq-fe.h"; then
AC_CHECK_HEADER(libpq-fe.h, [
for j in include include/mysql ""; do
if test -r "$i/$j/mysql.h"; then
AC_CHECK_HEADER(mysql.h, [
#include <mysql.h>
AC_CHECK_HEADER(sqlite3.h, [
vpop_libdeps="$vpopmail_home/etc/lib_deps"
AUTH_CFLAGS="$AUTH_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>]],
maildir_libs='$(top_builddir)/src/lib-storage/index/maildir/libstorage_maildir.a'
mbox_libs='$(top_builddir)/src/lib-storage/index/mbox/libstorage_mbox.a'
dbox_libs='$(top_builddir)/src/lib-storage/index/dbox/libstorage_dbox.a'
index_libs='$(top_builddir)/src/lib-storage/index/libstorage_index.a $(top_builddir)/src/lib-index/libindex.a'
AC_CHECK_HEADER(zlib.h, [
capability="IMAP4rev1 SASL-IR SORT THREAD=REFERENCES THREAD=X-REFERENCES2 MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS"
AC_CONFIG_HEADERS([config.h])