summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure b/configure
index 2c9142d..4ebe013 100755
--- a/configure
+++ b/configure
@@ -272,6 +272,29 @@ EOF
fi
}
+check_libpcap()
+{
+ echo -n "[*] Checking libpcap ... "
+
+ cat > $TMPDIR/pcaptest.c << EOF
+#include <pcap.h>
+
+void main(void)
+{
+ struct bpf_program bpf;
+ int ret = pcap_compile_nopcap(65535, 1, &bpf, "foo.bpf", 1, 0xffffffff);
+}
+EOF
+
+ $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> $TMPDIR/config.log 2>&1
+ if [ ! -x $TMPDIR/pcaptest ] ; then
+ echo "[NO]"
+ MISSING_DEFS=1
+ else
+ echo "[YES]"
+ fi
+}
+
echo "# This file is autogenerated by the configure script" > Config
check_pkg_config
@@ -289,6 +312,7 @@ check_ncurses
check_libgeoip
check_zlib
check_urcu
+check_libpcap
if [ "$MISSING_DEFS" == "1" ] ; then
echo "[!] Some libraries or header definitions are missing or too old."