netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] build: restore --disable-debug
@ 2014-12-14 20:04 Pablo Neira Ayuso
  0 siblings, 0 replies; only message in thread
From: Pablo Neira Ayuso @ 2014-12-14 20:04 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kaber, cyrus

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    |   10 ++++++----
 src/Makefile.am |    5 ++++-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1525ac4..b55b2b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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}"
diff --git a/src/Makefile.am b/src/Makefile.am
index d53c347..378424d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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	\
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-14 20:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-14 20:04 [PATCH nft] build: restore --disable-debug Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).