]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
configure: make libmnl and libnftnl hard requirements
authorGiuseppe Longo <giuseppelng@gmail.com>
Tue, 26 Apr 2016 19:27:58 +0000 (21:27 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 27 Apr 2016 17:16:59 +0000 (19:16 +0200)
Iptables building is broken if either libmnl or libnftnl
is not installed on the system.

Configure script actually checks if libmnl and libnftnl are installed,
but doesn't exit if they are not.

Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac

index 12bffa90e091751483185224be5b4e3f8fafa59a..b170addfd4681e2cfbad8eee8fc4d2f438326502 100644 (file)
@@ -122,8 +122,26 @@ AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
 if test "x$enable_nftables" = "xyes"; then
        PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
 
+       if test "$mnl" = 0;
+       then
+               echo "*** Error: No suitable libmnl found. ***"
+               echo "    Please install the 'libmnl' package"
+               echo "    Or consider --disable-nftables to skip"
+               echo "    iptables-compat over nftables support."
+               exit 1
+       fi
+
        PKG_CHECK_MODULES([libnftnl], [libnftnl >= 1.0.5], [nftables=1], [nftables=0])
 
+       if test "$nftables" = 0;
+       then
+               echo "*** Error: no suitable libnftnl found. ***"
+               echo "    Please install the 'libnftnl' package"
+               echo "    Or consider --disable-nftables to skip"
+               echo "    iptables-compat over nftables support."
+               exit 1
+       fi
+
        AM_PROG_LEX
        AC_PROG_YACC