dovecot-1.2: Added --without-libcap configure option.

dovecot at dovecot.org dovecot at dovecot.org
Sun Jun 28 03:43:52 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/389148f79d49
changeset: 9169:389148f79d49
user:      Daniel Mierswa <impulze at impulze.org>
date:      Sun Jun 28 00:22:44 2009 +0200
description:
Added --without-libcap configure option.

diffstat:

1 file changed, 16 insertions(+), 5 deletions(-)
configure.in |   21 ++++++++++++++++-----

diffs (38 lines):

diff -r 2bbf175bb6d3 -r 389148f79d49 configure.in
--- a/configure.in	Sat Jun 27 20:39:30 2009 -0400
+++ b/configure.in	Sun Jun 28 00:22:44 2009 +0200
@@ -186,6 +186,11 @@ AC_ARG_WITH(bzlib,
 [  --with-bzlib            Build with bzlib compression support],
   TEST_WITH(bzlib, $withval),
   want_bzlib=auto)
+
+AC_ARG_WITH(libcap,
+[  --with-libcap           Build with libcap support (Dropping capabilities).],
+  TEST_WITH(libcap, $withval),
+  want_libcap=auto)
 
 AC_ARG_WITH(ssl,
 [  --with-ssl=gnutls|openssl Build with GNUTLS or OpenSSL (default)],
@@ -338,11 +343,17 @@ AC_SEARCH_LIBS(fdatasync, rt, [
   AC_DEFINE(HAVE_FDATASYNC,, Define if you have fdatasync())
 ])
 
-AC_CHECK_LIB(cap, cap_init, [
-  AC_DEFINE(HAVE_LIBCAP,, libcap is installed for cap_init())
-  LIBCAP="-lcap"
-])
-AC_SUBST(LIBCAP)
+if test $want_libcap != no; then
+  AC_CHECK_LIB(cap, cap_init, [
+    AC_DEFINE(HAVE_LIBCAP,, libcap is installed for cap_init())
+    LIBCAP="-lcap"
+    AC_SUBST(LIBCAP)
+  ], [
+    if test "$want_libcap" = "yes"; then
+      AC_ERROR([Can't build with libcap support: libcap not found])
+    fi
+  ])
+fi
 
 AC_DEFINE(PACKAGE_WEBPAGE, "http://www.dovecot.org/", Support URL)
 


More information about the dovecot-cvs mailing list