1 From 3c30c8b6fd2ea715eb4bdaa5a6d4e1623f28834c Mon Sep 17 00:00:00 2001
2 From: Pablo Neira Ayuso <pablo@netfilter.org>
3 Date: Sun, 14 Dec 2014 21:04:49 +0100
4 Subject: [PATCH 1/3] build: restore --disable-debug
6 Fix fallout from the automake conversion. Display after configuration
7 if it is enabled or not.
9 Reported-by: Steven Barth <cyrus@openwrt.org>
10 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 configure.ac | 10 ++++++----
13 src/Makefile.am | 5 ++++-
14 2 files changed, 10 insertions(+), 5 deletions(-)
16 diff --git a/configure.ac b/configure.ac
17 index 1525ac4..b55b2b1 100644
20 @@ -24,9 +24,10 @@ AC_DEFINE([_STDC_FORMAT_MACROS], [], [printf-style format macros])
22 AC_ARG_ENABLE([debug],
23 AS_HELP_STRING([--enable-debug], [Enable debugging]),
24 - [CONFIG_DEBUG="$(echo $enableval | cut -b1)"],
26 -AC_SUBST([CONFIG_DEBUG])
30 +AM_CONDITIONAL([BUILD_DEBUG], [test "x$with_debug" != xno])
32 # Checks for programs.
34 @@ -128,4 +129,5 @@ AC_OUTPUT
38 - cli support: ${with_cli}"
39 + cli support: ${with_cli}
40 + enable debugging: ${with_debug}"
41 diff --git a/src/Makefile.am b/src/Makefile.am
42 index d53c347..378424d 100644
45 @@ -3,8 +3,11 @@ sbin_PROGRAMS = nft
46 CLEANFILES = scanner.c parser_bison.c
48 AM_CPPFLAGS = -I$(top_srcdir)/include
49 -AM_CPPFLAGS += -DDEFAULT_INCLUDE_PATH="\"${sysconfdir}\"" -DDEBUG \
50 +AM_CPPFLAGS += -DDEFAULT_INCLUDE_PATH="\"${sysconfdir}\"" \
51 ${LIBMNL_CFLAGS} ${LIBNFTNL_CFLAGS}
53 +AM_CPPFLAGS += -g -DDEBUG
57 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \