From: Ruben Kerkhof Date: Mon, 6 Jan 2014 13:04:40 +0000 (+0100) Subject: Move verbose logging check to separate macro X-Git-Tag: rec-3.6.0-rc1~264^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ffe1c5515d840bb2ab9f3a26f7b84e2b1fc4977;p=pdns Move verbose logging check to separate macro --- diff --git a/configure.ac b/configure.ac index f304b65c1..367ec9e62 100644 --- a/configure.ac +++ b/configure.ac @@ -144,14 +144,7 @@ AC_SUBST(THREADFLAGS) AC_SUBST(DYNLINKFLAGS) -AC_MSG_CHECKING(whether we will be doing verbose logging) -AC_ARG_ENABLE(verbose-logging, - AS_HELP_STRING([--enable-verbose-logging],[do verbose logging]), [enable_verbose_logging=yes], [enable_verbose_logging=no]) - -if test $enable_verbose_logging = yes; then AC_DEFINE(VERBOSELOG, 1, [If verbose logging should be enabled]) -fi -AC_MSG_RESULT($enable_verbose_logging) - +PDNS_ENABLE_VERBOSE_LOGGING PDNS_WITH_SYSTEM_POLARSSL PDNS_ENABLE_BOTAN PDNS_WITH_CRYPTOPP diff --git a/m4/pdns_enable_verbose_logging.m4 b/m4/pdns_enable_verbose_logging.m4 new file mode 100644 index 000000000..fe3cd9b78 --- /dev/null +++ b/m4/pdns_enable_verbose_logging.m4 @@ -0,0 +1,17 @@ +AC_DEFUN([PDNS_ENABLE_VERBOSE_LOGGING],[ + AC_MSG_CHECKING([whether to enable verbose logging]) + + AC_ARG_ENABLE([verbose-logging], + AS_HELP_STRING([--enable-verbose-logging], + [enable verbose logging @<:@default=no@:>@] + ), + [enable_verbose_logging=yes], + [enable_verbose_logging=no] + ) + + AS_IF([test "x$enable_verbose_logging" = "xyes"], + [AC_DEFINE([VERBOSELOG], [1], [Define to 1 if verbose logging is enabled])] + ) + + AC_MSG_RESULT([$enable_verbose_logging]) +])