dovecot: --with-package=yes now fails if package can't be used. ...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Dec 9 14:16:00 EET 2007
details: http://hg.dovecot.org/dovecot/rev/ec6cc297dd82
changeset: 6974:ec6cc297dd82
user: Timo Sirainen <tss at iki.fi>
date: Sun Dec 09 14:15:56 2007 +0200
description:
--with-package=yes now fails if package can't be used. --with-package=auto
(which is also used by default) uses the package if it can.
diffstat:
1 file changed, 218 insertions(+), 116 deletions(-)
configure.in | 334 +++++++++++++++++++++++++++++++++++++---------------------
diffs (truncated from 692 to 300 lines):
diff -r 123a1c8120cd -r ec6cc297dd82 configure.in
--- a/configure.in Sun Dec 09 13:28:54 2007 +0200
+++ b/configure.in Sun Dec 09 14:15:56 2007 +0200
@@ -22,13 +22,13 @@ AC_CHECK_HEADERS(strings.h stdint.h unis
xfs/xqm.h sasl.h sasl/sasl.h execinfo.h ucontext.h)
AC_ARG_ENABLE(ipv6,
-[ --enable-ipv6 Enable IPv6 support (default)],
- if test x$enableval = xno; then
- want_ipv6=no
+[ --enable-ipv6 Enable IPv6 support (auto)],
+ if test x$withval = xno || test x$withval = xauto; then
+ want_ipv6=$withval
else
want_ipv6=yes
fi,
- want_ipv6=yes)
+ want_ipv6=auto)
AC_ARG_ENABLE(debug,
[ --enable-debug Enable some extra expensive checks for developers],
@@ -69,71 +69,72 @@ AC_ARG_WITH(linux-quota,
AC_ARG_WITH(passwd,
[ --with-passwd Build with /etc/passwd support (default)],
- if test x$withval = xno; then
- want_passwd=no
+ if test x$withval = xno || test x$withval = xauto; then
+ want_passwd=$withval
else
want_passwd=yes
fi,
want_passwd=yes)
AC_ARG_WITH(nss,
-[ --with-nss Build with NSS module support (default)],
- if test x$withval = xno; then
- want_nss=no
+[ --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=yes)
+ want_nss=auto)
AC_ARG_WITH(passwd-file,
[ --with-passwd-file Build with passwd-like file support (default)],
- if test x$withval = xno; then
- want_passwd_file=no
+ if test x$withval = xno || test x$withval = xauto; then
+ want_passwd_file=$withval
else
want_passwd_file=yes
fi,
want_passwd_file=yes)
AC_ARG_WITH(shadow,
-[ --with-shadow Build with shadow password support (default)],
- if test x$withval = xno; then
- want_shadow=no
+[ --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=yes)
+ want_shadow=auto)
AC_ARG_WITH(pam,
-[ --with-pam Build with PAM support (default)],
- if test x$withval = xno; then
- want_pam=no
+[ --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=yes)
+ want_pam=auto)
AC_ARG_WITH(checkpassword,
[ --with-checkpassword Build with checkpassword support (default)],
- if test x$withval = xno; then
- want_checkpassword=no
+ if test x$withval = xno || test x$withval = xauto; then
+ want_checkpassword=$withval
else
want_checkpassword=yes
fi,
want_checkpassword=yes)
AC_ARG_WITH(bsdauth,
-[ --with-bsdauth Build with BSD authentication support (default)],
- if test x$withval = xno; then
- want_bsdauth=no
+[ --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=yes)
+ want_bsdauth=auto)
AC_ARG_WITH(gssapi,
[ --with-gssapi=yes|plugin Build with GSSAPI authentication support],
- if test x$withval = xno; then
- want_gssapi=no
+ 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
@@ -145,17 +146,18 @@ AC_ARG_WITH(gssapi,
AC_ARG_WITH(sia,
[ --with-sia Build with Tru64 SIA support],
- if test x$withval = xno; then
- want_sia=no
- else
- want_sia=yes
- fi,
- want_sia=no)
+ if test x$withval = xno || test x$withval = xauto; then
+ want_sia=$withval
+ else
+ want_sia=yes
+ fi,
+ want_sia=no)
AC_ARG_WITH(ldap,
[ --with-ldap=yes|plugin Build with LDAP support],
- if test x$withval = xno; then
- want_ldap=no
+ 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
@@ -166,18 +168,19 @@ AC_ARG_WITH(ldap,
want_ldap=no)
AC_ARG_WITH(vpopmail,
-[ --with-vpopmail Build with vpopmail support (default)],
+[ --with-vpopmail Build with vpopmail support (auto)],
if test x$withval = xno; then
want_vpopmail=no
else
- want_vpopmail=yes
- if test x$withval = xyes; then
+ if test x$withval = xyes || test x$withval = xauto; then
vpopmail_home="`echo ~vpopmail`"
+ want_vpopmail=$withval
else
vpopmail_home="$withval"
+ want_vpopmail=yes
fi
fi, [
- want_vpopmail=yes
+ want_vpopmail=auto
vpopmail_home="`echo ~vpopmail`"
])
@@ -201,8 +204,8 @@ AC_ARG_WITH(prefetch-userdb,
AC_ARG_WITH(db,
[ --with-db Build with Berkeley DB support],
- if test x$withval = xno; then
- want_db=no
+ if test x$withval = xno || test x$withval = xauto; then
+ want_db=$withval
else
want_db=yes
fi,
@@ -225,8 +228,8 @@ AC_ARG_WITH(sql,
AC_ARG_WITH(pgsql,
[ --with-pgsql Build with PostgreSQL driver support],
- if test x$withval = xno; then
- want_pgsql=no
+ if test x$withval = xno || test x$withval = xauto; then
+ want_pgsql=$withval
else
want_pgsql=yes
fi,
@@ -234,8 +237,8 @@ AC_ARG_WITH(pgsql,
AC_ARG_WITH(mysql,
[ --with-mysql Build with MySQL driver support],
- if test x$withval = xno; then
- want_mysql=no
+ if test x$withval = xno || test x$withval = xauto; then
+ want_mysql=$withval
else
want_mysql=yes
fi,
@@ -243,17 +246,17 @@ AC_ARG_WITH(mysql,
AC_ARG_WITH(sqlite,
[ --with-sqlite Build with SQLite3 driver support],
- if test x$withval = xno; then
- want_sqlite=no
- else
- want_sqlite=yes
+ if test x$withval = xno || test x$withval = xauto; then
+ want_sqlite=$withval
+ else
+ want_sqlite=yes
fi,
want_sqlite=no)
AC_ARG_WITH(lucene,
[ --with-lucene Build with CLucene full text search support],
- if test x$withval = xno; then
- want_lucene=no
+ if test x$withval = xno || test x$withval = xauto; then
+ want_lucene=$withval
else
want_lucene=yes
fi,
@@ -276,7 +279,7 @@ AC_ARG_WITH(ssl,
want_openssl=yes
fi, [
want_gnutls=no
- want_openssl=yes
+ want_openssl=auto
])
AC_ARG_WITH(ssldir,
@@ -302,14 +305,10 @@ AC_SUBST(statedir)
AC_ARG_WITH(gc,
[ --with-gc Use Boehm garbage collector],
- if test x$withval = xyes; then
+ if test x$withval = xno || test x$withval = xauto; then
+ want_gc=$withval
+ else
want_gc=yes
- else
- if test "x$withval" = xno; then
- want_gc=no
- else
- want_gc=yes
- fi
fi,
want_gc=no)
@@ -1429,7 +1428,7 @@ dnl **
have_ssl=no
-if test "$want_openssl" = "yes" && test "$have_ssl" = "no"; then
+if test $want_openssl != no && test $have_ssl = no; then
if pkg-config --exists openssl 2>/dev/null; then
PKG_CHECK_MODULES(SSL, openssl)
CFLAGS="$CFLAGS $SSL_CFLAGS"
@@ -1440,8 +1439,16 @@ if test "$want_openssl" = "yes" && test
SSL_LIBS="-lssl -lcrypto"
AC_SUBST(SSL_LIBS)
have_openssl=yes
+ ], [
+ if test $want_openssl = yes; then
+ AC_ERROR([Can't build with OpenSSL: openssl/ssl.h or openssl/err.h not found])
+ fi
])
- ],, -lcrypto)
+ ], [
+ if test $want_openssl = yes; then
+ AC_ERROR([Can't build with OpenSSL: libssl not found])
+ fi
+ ], -lcrypto)
fi
if test "$have_openssl" = "yes"; then
AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support)
@@ -1449,16 +1456,24 @@ if test "$want_openssl" = "yes" && test
fi
fi
-if test $want_gnutls = yes && test "$have_ssl" = no; then
- AC_CHECK_LIB(gnutls, gnutls_global_init, [
- AC_CHECK_HEADERS(gnutls/gnutls.h, [
- AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support)
- SSL_LIBS="-lgnutls -lgcrypt"
- AC_SUBST(SSL_LIBS)
- have_ssl="yes (GNUTLS)"
- have_gnutls=yes
- ])
- ],, -lgcrypt)
+if test $want_gnutls != no && test $have_ssl = no; then
+ AC_CHECK_LIB(gnutls, gnutls_global_init, [
+ AC_CHECK_HEADER(gnutls/gnutls.h, [
+ AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support)
+ SSL_LIBS="-lgnutls -lgcrypt"
+ AC_SUBST(SSL_LIBS)
More information about the dovecot-cvs
mailing list