1 From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Sun, 17 Mar 2013 11:21:35 -0700
4 Subject: [PATCH] configure: Add option to enable/disable libnfnetlink
6 This changes the configure behaviour from autodetecting
7 for libnfnetlink to having an option to disable it explicitly
9 Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 Upstream-Status: Pending
13 configure.ac | 11 ++++++++---
14 1 file changed, 8 insertions(+), 3 deletions(-)
16 diff --git a/configure.ac b/configure.ac
17 index ba616ab..ce2d315 100644
20 @@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq],
21 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
22 [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
23 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
24 +AC_ARG_ENABLE([libnfnetlink],
25 + AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
26 + [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
29 AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed],
30 @@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"])
31 AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
32 AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
34 -PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
35 - [nfnetlink=1], [nfnetlink=0])
36 -AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
37 +AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
38 + PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
41 +AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"])
43 regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
44 -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \