]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
build: restore --disable-debug
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 14 Dec 2014 19:59:16 +0000 (20:59 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 15 Dec 2014 12:07:51 +0000 (13:07 +0100)
Fix fallout from the automake conversion. Display after configuration
if it is enabled or not.

Reported-by: Steven Barth <cyrus@openwrt.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac
src/Makefile.am

index 1525ac4d4395e9fa99b3dd5fe37365fb04249956..b55b2b1c24376820a7e4b8b18fbc24fda7b56829 100644 (file)
@@ -24,9 +24,10 @@ AC_DEFINE([_STDC_FORMAT_MACROS], [], [printf-style format macros])
 
 AC_ARG_ENABLE([debug],
              AS_HELP_STRING([--enable-debug], [Enable debugging]),
-             [CONFIG_DEBUG="$(echo $enableval | cut -b1)"],
-             [CONFIG_DEBUG="y"])
-AC_SUBST([CONFIG_DEBUG])
+             [with_debug=no],
+             [with_debug=yes])
+AC_SUBST(with_debug)
+AM_CONDITIONAL([BUILD_DEBUG], [test "x$with_debug" != xno])
 
 # Checks for programs.
 AC_PROG_CC
@@ -128,4 +129,5 @@ AC_OUTPUT
 
 echo "
 nft configuration:
-  cli support:                 ${with_cli}"
+  cli support:                 ${with_cli}
+  enable debugging:            ${with_debug}"
index d53c347d6c1011e7d0b9202fcb4df85c04165f0e..378424dbe7774d356171b71f2b9a70ecbcd73a45 100644 (file)
@@ -3,8 +3,11 @@ sbin_PROGRAMS = nft
 CLEANFILES = scanner.c parser_bison.c
 
 AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CPPFLAGS += -DDEFAULT_INCLUDE_PATH="\"${sysconfdir}\"" -DDEBUG \
+AM_CPPFLAGS += -DDEFAULT_INCLUDE_PATH="\"${sysconfdir}\"" \
                ${LIBMNL_CFLAGS} ${LIBNFTNL_CFLAGS}
+if BUILD_DEBUG
+AM_CPPFLAGS += -g -DDEBUG
+endif
 
 AM_CFLAGS = -Wall                                                              \
            -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations     \