netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe Longo <giuseppelng@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Giuseppe Longo <giuseppelng@gmail.com>
Subject: [iptables PATCH] configure: exit if libnftnl is not found
Date: Sun, 27 Mar 2016 12:05:46 +0200	[thread overview]
Message-ID: <1459073146-11576-1-git-send-email-giuseppelng@gmail.com> (raw)

iptables building is broken if libnftnl is not installed
on the system, raising up the following errors:

nft-shared.c:25:27: fatal error: libnftnl/rule.h: No such file or directory
 #include <libnftnl/rule.h>
                           ^
compilation terminated.
nft.c:41:28: fatal error: libnftnl/table.h: No such file or directory
 #include <libnftnl/table.h>
                            ^
compilation terminated.
mv -f .deps/xtables_multi-iptables-restore.Tpo .deps/xtables_multi-iptables-restore.Po
In file included from nft.h:5:0,
                 from nft-ipv6.c:25:
nft-shared.h:6:27: fatal error: libnftnl/rule.h: No such file or directory
 #include <libnftnl/rule.h>
                           ^
mv -f .deps/xtables_multi-xshared.Tpo .deps/xtables_multi-xshared.Po
compilation terminated.
In file included from nft.h:5:0,
                 from nft-ipv4.c:26:
nft-shared.h:6:27: fatal error: libnftnl/rule.h: No such file or directory
 #include <libnftnl/rule.h>

configure script checks if libnftnl is installed, but doesn't
exit if it is not.

Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 33a8f2d..b08ecca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,6 +128,13 @@ if test "x$enable_nftables" = "xyes"; then
 
 	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."
+		exit 1
+	fi
+
 	AM_PROG_LEX
 	AC_PROG_YACC
 
-- 
2.5.0


             reply	other threads:[~2016-03-27 10:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27 10:05 Giuseppe Longo [this message]
2016-03-27 12:51 ` [iptables PATCH] configure: exit if libnftnl is not found Jan Engelhardt
     [not found]   ` <CAFpD06TyVSe5_YvsNoJV9LFbHsFGaWhBPu-C=PtVcrVVZbzH4g@mail.gmail.com>
2016-03-27 20:29     ` Jan Engelhardt
2016-04-08 12:55 ` Pablo Neira Ayuso
2016-04-09  8:46   ` Giuseppe Longo
2016-04-12 23:27     ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459073146-11576-1-git-send-email-giuseppelng@gmail.com \
    --to=giuseppelng@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).