nftables: mini-bump and patch cleanup
[openwrt/staging/chunkeey.git] / package / network / utils / nftables / patches / 101-build-restore-disable-debug.patch
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
5
6 Fix fallout from the automake conversion. Display after configuration
7 if it is enabled or not.
8
9 Reported-by: Steven Barth <cyrus@openwrt.org>
10 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
11 ---
12 configure.ac | 10 ++++++----
13 src/Makefile.am | 5 ++++-
14 2 files changed, 10 insertions(+), 5 deletions(-)
15
16 diff --git a/configure.ac b/configure.ac
17 index 1525ac4..b55b2b1 100644
18 --- a/configure.ac
19 +++ b/configure.ac
20 @@ -24,9 +24,10 @@ AC_DEFINE([_STDC_FORMAT_MACROS], [], [printf-style format macros])
21
22 AC_ARG_ENABLE([debug],
23 AS_HELP_STRING([--enable-debug], [Enable debugging]),
24 - [CONFIG_DEBUG="$(echo $enableval | cut -b1)"],
25 - [CONFIG_DEBUG="y"])
26 -AC_SUBST([CONFIG_DEBUG])
27 + [with_debug=no],
28 + [with_debug=yes])
29 +AC_SUBST(with_debug)
30 +AM_CONDITIONAL([BUILD_DEBUG], [test "x$with_debug" != xno])
31
32 # Checks for programs.
33 AC_PROG_CC
34 @@ -128,4 +129,5 @@ AC_OUTPUT
35
36 echo "
37 nft configuration:
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
43 --- a/src/Makefile.am
44 +++ b/src/Makefile.am
45 @@ -3,8 +3,11 @@ sbin_PROGRAMS = nft
46 CLEANFILES = scanner.c parser_bison.c
47
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}
52 +if BUILD_DEBUG
53 +AM_CPPFLAGS += -g -DDEBUG
54 +endif
55
56 AM_CFLAGS = -Wall \
57 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
58 --
59 2.1.3
60