[Dovecot] [PATCH] allow disabling libcap support although it's installed
see subject :) patch is in hg export format -- Mierswa, Daniel If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do. --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22 # HG changeset patch # User Daniel Mierswa <impulze@impulze.org> # Date 1245757676 -7200 # Branch HEAD # Node ID 343390a32894c654c8646650eba2cf130ca480d2 # Parent d77225a6412873528b3c94abe8268436df5dbe82 do not automagically depend on libcap if it's installed diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -196,6 +196,11 @@ 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)], if test x$withval = xno; then @@ -358,11 +363,13 @@ 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) +fi AC_DEFINE(PACKAGE_WEBPAGE, "http://www.dovecot.org/", Support URL)
Second attempt, now also error out if libcap support was explicitly requested but not found to match current dovecot behaviour. -- Mierswa, Daniel If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do. --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22 # HG changeset patch # User Daniel Mierswa <impulze@impulze.org> # Date 1246141364 -7200 # Branch HEAD # Node ID dc0b04ce6df3aab99d9c0f4cd6d00df8efd433da # Parent d14e8b8df025fc6581321e7bea6e74e3a2021f48 do not automagically depend on libcap if it's installed diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -196,6 +196,11 @@ 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)], if test x$withval = xno; then @@ -358,11 +363,17 @@ 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)
On Sun, 2009-06-28 at 00:57 +0200, Daniel Mierswa wrote:
Second attempt, now also error out if libcap support was explicitly requested but not found to match current dovecot behaviour.
Committed.
participants (2)
-
Daniel Mierswa
-
Timo Sirainen