diff options
author | Willem de Bruijn <willemb@google.com> | 2013-07-21 20:02:38 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-07-26 16:27:44 +0200 |
commit | c18f2ce7f61c7e7ae3bd207ef6337a1be0c7aff3 (patch) | |
tree | 85e51e50c29b657478515f0155b31951b5bf891c | |
parent | 59bbc59fd2fbbb7a51ed19945d82172890bc40f9 (diff) |
build: fail in configure on missing dependency with --enable-bpf-compiler
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>
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5ed51654..70f4eba3 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) |