dovecot-1.2: configure: Handle --with-*=* consistently and give ...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Dec 6 00:08:05 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/451e3cf38290
changeset: 8517:451e3cf38290
user: Timo Sirainen <tss at iki.fi>
date: Sat Dec 06 00:08:01 2008 +0200
description:
configure: Handle --with-*=* consistently and give better error messages.
diffstat:
1 file changed, 104 insertions(+), 190 deletions(-)
configure.in | 294 ++++++++++++++++++++--------------------------------------
diffs (truncated from 500 to 300 lines):
diff -r 101b206caa00 -r 451e3cf38290 configure.in
--- a/configure.in Fri Dec 05 21:16:15 2008 +0200
+++ b/configure.in Sat Dec 06 00:08:01 2008 +0200
@@ -6,21 +6,24 @@ AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
-AC_ISC_POSIX
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_CXX # lucene plugin needs this
-AC_HEADER_STDC
-AC_C_INLINE
-AC_PROG_LIBTOOL
-AM_ICONV
-
-AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \
- sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \
- sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h sys/fs/quota_common.h \
- mntent.h sys/mnttab.h sys/event.h sys/time.h sys/mkdev.h linux/dqblk_xfs.h \
- xfs/xqm.h sasl.h sasl/sasl.h execinfo.h ucontext.h malloc_np.h sys/utsname.h \
- sys/vmount.h sys/utsname.h)
+dnl TEST_WITH(name, value, [plugin])
+AC_DEFUN([TEST_WITH], [
+ want=want_`echo $1|sed s/-/_/g`
+ if test $2 = yes || test $2 = no || test $2 = auto; then
+ eval $want=$2
+ elif test $2 = plugin; then
+ if test "$3" = plugin; then
+ eval $want=plugin
+ else
+ AC_ERROR([--with-$1=plugin not supported])
+ fi
+ elif `echo $2|grep '^/' >/dev/null`; then
+ AC_ERROR([--with-$1=path not supported. You may want to use instead:
+CPPFLAGS=-I$2/include LDFLAGS=-L$2/lib ./configure --with-$1])
+ else
+ AC_ERROR([--with-$1: Unknown value: $2])
+ fi
+])
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6 Enable IPv6 support (auto)],
@@ -70,103 +73,53 @@ AC_ARG_WITH(linux-quota,
AC_ARG_WITH(passwd,
[ --with-passwd Build with /etc/passwd support (default)],
- if test x$withval = xno || test x$withval = xauto; then
- want_passwd=$withval
- else
- want_passwd=yes
- fi,
- want_passwd=yes)
+ TEST_WITH(passwd, $withval),
+ want_passwd=yes)
AC_ARG_WITH(nss,
[ --with-nss Build with NSS module support (auto)],
- if test x$withval = xno || test x$withval = xauto; then
- want_nss=$withval
- else
- want_nss=yes
- fi,
- want_nss=auto)
+ TEST_WITH(nss, $withval),
+ want_nss=auto)
AC_ARG_WITH(passwd-file,
[ --with-passwd-file Build with passwd-like file support (default)],
- if test x$withval = xno || test x$withval = xauto; then
- want_passwd_file=$withval
- else
- want_passwd_file=yes
- fi,
- want_passwd_file=yes)
+ TEST_WITH(passwd-file, $withval),
+ want_passwd_file=yes)
AC_ARG_WITH(shadow,
[ --with-shadow Build with shadow password support (auto)],
- if test x$withval = xno || test x$withval = xauto; then
- want_shadow=$withval
- else
- want_shadow=yes
- fi,
- want_shadow=auto)
+ TEST_WITH(shadow, $withval),
+ want_shadow=auto)
AC_ARG_WITH(pam,
[ --with-pam Build with PAM support (auto)],
- if test x$withval = xno || test x$withval = xauto; then
- want_pam=$withval
- else
- want_pam=yes
- fi,
- want_pam=auto)
+ TEST_WITH(pam, $withval),
+ want_pam=auto)
AC_ARG_WITH(checkpassword,
[ --with-checkpassword Build with checkpassword support (default)],
- if test x$withval = xno || test x$withval = xauto; then
- want_checkpassword=$withval
- else
- want_checkpassword=yes
- fi,
- want_checkpassword=yes)
+ TEST_WITH(checkpassword, $withval),
+ want_checkpassword=yes)
AC_ARG_WITH(bsdauth,
[ --with-bsdauth Build with BSD authentication support (auto)],
- if test x$withval = xno || test x$withval = xauto; then
- want_bsdauth=$withval
- else
- want_bsdauth=yes
- fi,
- want_bsdauth=auto)
+ TEST_WITH(bsdauth, $withval),
+ want_bsdauth=auto)
AC_ARG_WITH(gssapi,
[ --with-gssapi=yes|plugin Build with GSSAPI authentication support],
- if test x$withval = xno || test x$withval = xauto; then
- want_gssapi=$withval
- want_gssapi_plugin=no
- elif test x$withval = xplugin; then
- want_gssapi=yes
- want_gssapi_plugin=yes
- else
- want_gssapi=yes
- want_gssapi_plugin=no
- fi,
- want_gssapi=no)
+ TEST_WITH(gssapi, $withval, plugin),
+ want_gssapi=no)
AC_ARG_WITH(sia,
[ --with-sia Build with Tru64 SIA support],
- if test x$withval = xno || test x$withval = xauto; then
- want_sia=$withval
- else
- want_sia=yes
- fi,
- want_sia=no)
+ TEST_WITH(sia, $withval),
+ want_sia=no)
AC_ARG_WITH(ldap,
[ --with-ldap=yes|plugin Build with LDAP support],
- if test x$withval = xno || test x$withval = xauto; then
- want_ldap=$withval
- want_ldap_plugin=no
- elif test x$withval = xplugin; then
- want_ldap=yes
- want_ldap_plugin=yes
- else
- want_ldap=yes
- want_ldap_plugin=no
- fi,
- want_ldap=no)
+ TEST_WITH(ldap, $withval, plugin),
+ want_ldap=no)
AC_ARG_WITH(vpopmail,
[ --with-vpopmail Build with vpopmail support (auto)],
@@ -187,109 +140,61 @@ AC_ARG_WITH(vpopmail,
AC_ARG_WITH(static-userdb,
[ --with-static-userdb Build with static userdb support (default)],
- if test x$withval = xno; then
- want_static_userdb=no
- else
- want_static_userdb=yes
- fi,
- want_static_userdb=yes)
+ TEST_WITH(static-userdb, $withval),
+ want_static_userdb=yes)
AC_ARG_WITH(prefetch-userdb,
[ --with-prefetch-userdb Build with prefetch userdb support (default)],
- if test x$withval = xno; then
- want_prefetch_userdb=no
- else
- want_prefetch_userdb=yes
- fi,
- want_prefetch_userdb=yes)
+ TEST_WITH(prefetch-userdb, $withval),
+ want_prefetch_userdb=yes)
AC_ARG_WITH(db,
[ --with-db Build with Berkeley DB support],
- if test x$withval = xno || test x$withval = xauto; then
- want_db=$withval
- else
- want_db=yes
- fi,
- want_db=no)
+ TEST_WITH(db, $withval),
+ want_db=no)
dnl The --with-sql is useful only if Dovecot is being built with all the SQL
dnl drivers as modules. If any SQL driver is built-in, this option is ignored.
AC_ARG_WITH(sql,
[ --with-sql=yes|plugin Build with generic SQL support],
- if test x$withval = xno; then
- want_sql=no
- elif test x$withval = xplugin; then
- want_sql=yes
- want_sql_plugins=yes
- else
- want_sql=yes
- want_sql_plugins=no
- fi,
- want_sql=no)
+ TEST_WITH(sql, $withval, plugin),
+ want_sql=no)
AC_ARG_WITH(pgsql,
[ --with-pgsql Build with PostgreSQL driver support],
- if test x$withval = xno || test x$withval = xauto; then
- want_pgsql=$withval
- else
- want_pgsql=yes
- fi,
- want_pgsql=no)
+ TEST_WITH(pgsql, $withval),
+ want_pgsql=no)
AC_ARG_WITH(mysql,
[ --with-mysql Build with MySQL driver support],
- if test x$withval = xno || test x$withval = xauto; then
- want_mysql=$withval
- else
- want_mysql=yes
- fi,
- want_mysql=no)
+ TEST_WITH(mysql, $withval),
+ want_mysql=no)
AC_ARG_WITH(sqlite,
[ --with-sqlite Build with SQLite3 driver support],
- if test x$withval = xno || test x$withval = xauto; then
- want_sqlite=$withval
- else
- want_sqlite=yes
- fi,
- want_sqlite=no)
+ TEST_WITH(sqlite, $withval),
+ want_sqlite=no)
AC_ARG_WITH(lucene,
[ --with-lucene Build with CLucene full text search support],
- if test x$withval = xno || test x$withval = xauto; then
- want_lucene=$withval
- else
- want_lucene=yes
- fi,
- want_lucene=no)
+ TEST_WITH(lucene, $withval),
+ want_lucene=no)
AM_CONDITIONAL(BUILD_LUCENE, test "$want_lucene" = "yes")
AC_ARG_WITH(solr,
[ --with-solr Build with Solr full text search support],
- if test x$withval = xno || test x$withval = xauto; then
- want_solr=$withval
- else
- want_solr=yes
- fi,
- want_solr=no)
+ TEST_WITH(solr, $withval),
+ want_solr=no)
AC_ARG_WITH(zlib,
[ --with-zlib Build with zlib compression support],
- if test x$withval = xno || test x$withval = xauto; then
- want_zlib=$withval
- else
- want_zlib=yes
- fi,
- want_zlib=auto)
+ TEST_WITH(zlib, $withval),
+ want_zlib=auto)
AC_ARG_WITH(bzlib,
[ --with-bzlib Build with bzlib compression support],
- if test x$withval = xno || test x$withval = xauto; then
- want_bzlib=$withval
- else
- want_bzlib=yes
- fi,
- want_bzlib=auto)
+ TEST_WITH(bzlib, $withval),
+ want_bzlib=auto)
AC_ARG_WITH(ssl,
[ --with-ssl=gnutls|openssl Build with GNUTLS or OpenSSL (default)],
@@ -302,9 +207,11 @@ AC_ARG_WITH(ssl,
More information about the dovecot-cvs
mailing list