1 From c46db7c2e1f63ec525835553587e70c635565310 Mon Sep 17 00:00:00 2001
2 From: "Maxin B. John" <maxin.john@intel.com>
3 Date: Tue, 21 Feb 2017 11:16:31 +0200
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 Upstream-Status: Pending
11 Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 Signed-off-by: Maxin B. John <maxin.john@intel.com>
14 configure.ac | 10 +++++++---
15 1 file changed, 7 insertions(+), 3 deletions(-)
17 diff --git a/configure.ac b/configure.ac
18 index eda7871..03ddc50 100644
21 @@ -63,6 +63,9 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
22 AC_ARG_ENABLE([nftables],
23 AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]),
24 [enable_nftables="$enableval"], [enable_nftables="yes"])
25 +AC_ARG_ENABLE([libnfnetlink],
26 + AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
27 + [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
28 AC_ARG_ENABLE([connlabel],
29 AS_HELP_STRING([--disable-connlabel],
30 [Do not build libnetfilter_conntrack]),
31 @@ -115,9 +118,10 @@ if test "x$enable_bpfc" = "xyes" || test "x$enable_nfsynproxy" = "xyes"; then
32 AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool))
35 -PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
36 - [nfnetlink=1], [nfnetlink=0])
37 -AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
38 +AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
39 + PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
41 +AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"])
43 if test "x$enable_nftables" = "xyes"; then
44 PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])