From 8ffe1c5515d840bb2ab9f3a26f7b84e2b1fc4977 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Mon, 6 Jan 2014 14:04:40 +0100 Subject: [PATCH] Move verbose logging check to separate macro --- configure.ac | 9 +-------- m4/pdns_enable_verbose_logging.m4 | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 m4/pdns_enable_verbose_logging.m4 diff --git a/configure.ac b/configure.ac index f304b65c10..367ec9e621 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 0000000000..fe3cd9b783 --- /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]) +]) -- 2.47.3