]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
configure: fix --enable-debug
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 7 Jul 2015 12:32:21 +0000 (14:32 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 14 Jul 2015 16:07:19 +0000 (18:07 +0200)
As the documentation indicates "The most common mistake for this macro is to
consider the two actions as action-if-enabled and action-if-disabled."

Use AS_IF in the action-if-present to check the real argument that we're
getting from the user.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac

index d8f949a23c15937821f310f7e95ee431f68f0769..931dbe1ddf514b3e51d8f635a8a346571e66228e 100644 (file)
@@ -23,8 +23,8 @@ AC_DEFINE([_GNU_SOURCE], [], [Enable various GNU extensions])
 AC_DEFINE([_STDC_FORMAT_MACROS], [], [printf-style format macros])
 
 AC_ARG_ENABLE([debug],
-             AS_HELP_STRING([--enable-debug], [Enable debugging]),
-             [with_debug=no],
+             AS_HELP_STRING([--enable-debug], [Disable debugging]),
+             AS_IF([test "x$enable_debug" = "xno"], [with_debug=no], [with_debug=yes]),
              [with_debug=yes])
 AC_SUBST(with_debug)
 AM_CONDITIONAL([BUILD_DEBUG], [test "x$with_debug" != xno])