]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
build: fail in configure on missing dependency with --enable-bpf-compiler
authorWillem de Bruijn <willemb@google.com>
Mon, 22 Jul 2013 00:02:38 +0000 (20:02 -0400)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 26 Jul 2013 14:27:44 +0000 (16:27 +0200)
The build of utils/nfbpf_compile depends on libpcap. If configure is
run with --enable-bpf-compiler, the script succeeds, but make fails.

This small patch adds a test for the dependency (libpcap) in configure
and fails hard if not found.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac

index 5ed51654d7cee047bc747eea2987a368cb9685aa..70f4eba3b09ad9e66af6b159d3c5a96faf1f683d 100644 (file)
@@ -103,6 +103,10 @@ AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
 AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
 AM_CONDITIONAL([ENABLE_BPFC], [test "$enable_bpfc" = "yes"])
 
+if test "x$enable_bpfc" = "xyes"; then
+       AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler))
+fi
+
 PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
        [nfnetlink=1], [nfnetlink=0])
 AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])