From: Ruben Kerkhof Date: Mon, 14 Jul 2014 21:32:48 +0000 (+0200) Subject: Handle --disable-foo properly X-Git-Tag: auth-3.4.0-rc1~76^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd9b086fb78126779416f611ecc1b5205505bae3;p=pdns Handle --disable-foo properly Fixes #1253 --- diff --git a/configure.ac b/configure.ac index 64db4a28c..3f1c8d993 100644 --- a/configure.ac +++ b/configure.ac @@ -238,7 +238,7 @@ AC_ARG_ENABLE([tools], ) AC_MSG_RESULT([$enable_tools]) -AM_CONDITIONAL([TOOLS],[test "x$enable_tools" = "xyes"]) +AM_CONDITIONAL([TOOLS],[test "x$enable_tools" != "xno"]) for a in $modules $dynmodules; do case "$a" in diff --git a/m4/pdns_enable_botan.m4 b/m4/pdns_enable_botan.m4 index 7a034d4f6..c4fe7757f 100644 --- a/m4/pdns_enable_botan.m4 +++ b/m4/pdns_enable_botan.m4 @@ -2,29 +2,29 @@ AC_DEFUN([PDNS_ENABLE_BOTAN],[ AC_MSG_CHECKING([whether we will be linking in Botan 1.10]) AC_ARG_ENABLE([botan1.10], [AS_HELP_STRING([--enable-botan1.10],[use Botan 1.10 @<:@default=no@:>@])], - [enable_botan110=yes], + [enable_botan110=$enableval], [enable_botan110=no] ) AC_MSG_RESULT([$enable_botan110]) - AM_CONDITIONAL(BOTAN110, [test "x$enable_botan110" = "xyes"]) + AM_CONDITIONAL(BOTAN110, [test "x$enable_botan110" != "xno"]) AC_MSG_CHECKING([whether we will be linking in Botan 1.8]) AC_ARG_ENABLE([botan1.8], [AS_HELP_STRING([--enable-botan1.8],[use Botan 1.8 @<:@default=no@:>@])], - [enable_botan18=yes], + [enable_botan18=$enableval], [enable_botan18=no] ) AC_MSG_RESULT([$enable_botan18]) - AM_CONDITIONAL([BOTAN18], [test "x$enable_botan18" = "xyes"]) + AM_CONDITIONAL([BOTAN18], [test "x$enable_botan18" != "xno"]) - AS_IF([test "x$enable_botan110" = "xyes"], [ + AS_IF([test "x$enable_botan110" != "xno"], [ PKG_CHECK_MODULES([BOTAN110], [botan-1.10], [AC_DEFINE([HAVE_BOTAN110],[1],[Define to 1 if you have botan 1.10])], [AC_MSG_ERROR([Could not find botan 1.10])] )] ) - AS_IF([test "x$enable_botan18" = "xyes"], [ + AS_IF([test "x$enable_botan18" != "xno"], [ PKG_CHECK_MODULES([BOTAN18], [botan-1.8], [AC_DEFINE([HAVE_BOTAN18], [1], [Define to 1 if you have botan 1.10])], [AC_MSG_ERROR([Could not find botan 1.8])] diff --git a/m4/pdns_enable_p11kit.m4 b/m4/pdns_enable_p11kit.m4 index cce64ebce..316e9173f 100644 --- a/m4/pdns_enable_p11kit.m4 +++ b/m4/pdns_enable_p11kit.m4 @@ -2,13 +2,13 @@ AC_DEFUN([PDNS_ENABLE_PKCS11],[ AC_MSG_CHECKING([whether to enable PKCS11 support]) AC_ARG_ENABLE([experimental-pkcs11], [AS_HELP_STRING([--enable-experimental-pkcs11],[enable experimental PKCS11 support @<:@default=no@:>@])], - [enable_pkcs11=yes], + [enable_pkcs11=$enableval], [enable_pkcs11=no] ) AC_MSG_RESULT([$enable_pkcs11]) - AM_CONDITIONAL([PKCS11], [test "x$enable_pkcs11" = "xyes"]) + AM_CONDITIONAL([PKCS11], [test "x$enable_pkcs11" != "xno"]) - AS_IF([test "x$enable_pkcs11" = "xyes"], [ + AS_IF([test "x$enable_pkcs11" != "xno"], [ PKG_CHECK_MODULES([P11KIT1], [p11-kit-1], [AC_DEFINE([HAVE_P11KIT1],[1],[Define to 1 if you have p11-kit-1])], [AC_MSG_ERROR([Could not find p11-kit-1])] diff --git a/m4/pdns_enable_remotebackend_zeromq.m4 b/m4/pdns_enable_remotebackend_zeromq.m4 index ff6ce931a..751c62baa 100644 --- a/m4/pdns_enable_remotebackend_zeromq.m4 +++ b/m4/pdns_enable_remotebackend_zeromq.m4 @@ -4,15 +4,15 @@ AC_DEFUN([PDNS_ENABLE_REMOTEBACKEND_ZEROMQ],[ AS_HELP_STRING([--enable-remotebackend-zeromq], [enable ZeroMQ connector for remotebackend @<:@default=no@:>@] ), - [enable_remotebackend_zeromq=yes], + [enable_remotebackend_zeromq=$enableval], [enable_remotebackend_zeromq=no] ) AC_MSG_RESULT([$enable_remotebackend_zeromq]) - AM_CONDITIONAL([REMOTEBACKEND_HTTP],[test "x$enable_remotebackend_zeromq" = "xyes"]) + AM_CONDITIONAL([REMOTEBACKEND_HTTP],[test "x$enable_remotebackend_zeromq" != "xno"]) AC_SUBST(REMOTEBACKEND_ZEROMQ) - AS_IF([test "x$enable_remotebackend_zeromq" = "xyes"], + AS_IF([test "x$enable_remotebackend_zeromq" != "xno"], [PKG_CHECK_MODULES([LIBZMQ], [libzmq], [ AC_DEFINE([HAVE_LIBZMQ], [1], [Define to 1 if you have libzmq]) diff --git a/m4/pdns_enable_unit_tests.m4 b/m4/pdns_enable_unit_tests.m4 index 36c4ca145..9853a361a 100644 --- a/m4/pdns_enable_unit_tests.m4 +++ b/m4/pdns_enable_unit_tests.m4 @@ -3,11 +3,11 @@ AC_DEFUN([PDNS_ENABLE_UNIT_TESTS], [ AC_ARG_ENABLE([unit-tests], AS_HELP_STRING([--enable-unit-tests], [enable unit test building @<:@default=no@:>@]), - [enable_unit_tests=yes], + [enable_unit_tests=$enableval], [enable_unit_tests=no] ) AC_MSG_RESULT([$enable_unit_tests]) - AS_IF([test "x$enable_unit_tests" = "xyes"], [ + AS_IF([test "x$enable_unit_tests" != "xno"], [ BOOST_TEST([mt]) ]) ]) diff --git a/m4/pdns_enable_verbose_logging.m4 b/m4/pdns_enable_verbose_logging.m4 index fe3cd9b78..0104f43c4 100644 --- a/m4/pdns_enable_verbose_logging.m4 +++ b/m4/pdns_enable_verbose_logging.m4 @@ -5,11 +5,11 @@ AC_DEFUN([PDNS_ENABLE_VERBOSE_LOGGING],[ AS_HELP_STRING([--enable-verbose-logging], [enable verbose logging @<:@default=no@:>@] ), - [enable_verbose_logging=yes], + [enable_verbose_logging=$enableval], [enable_verbose_logging=no] ) - AS_IF([test "x$enable_verbose_logging" = "xyes"], + AS_IF([test "x$enable_verbose_logging" != "xno"], [AC_DEFINE([VERBOSELOG], [1], [Define to 1 if verbose logging is enabled])] ) diff --git a/m4/pdns_with_cryptopp.m4 b/m4/pdns_with_cryptopp.m4 index 055ccb0f7..1e4cbefa4 100644 --- a/m4/pdns_with_cryptopp.m4 +++ b/m4/pdns_with_cryptopp.m4 @@ -2,13 +2,13 @@ AC_DEFUN([PDNS_WITH_CRYPTOPP],[ AC_MSG_CHECKING([whether we will be linking in Crypto++]) AC_ARG_ENABLE([cryptopp], [AS_HELP_STRING([--enable-cryptopp],[use Crypto++ @<:@default=no@:>@])], - [enable_cryptopp=yes], - [enable_cryptopp=no] + [enable_cryptopp=$enableval], + [enable_cryptopp=no], ) AC_MSG_RESULT([$enable_cryptopp]) - AM_CONDITIONAL([CRYPTOPP], [test "x$enable_cryptopp" = "xyes"]) + AM_CONDITIONAL([CRYPTOPP], [test "x$enable_cryptopp" != "xno"]) - AS_IF([test "x$enable_cryptopp" = "xyes"], + AS_IF([test "x$enable_cryptopp" != "xno"], [AC_DEFINE([HAVE_CRYPTOPP], [1], [Define to 1 if you have crypto++])] ) ])