summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-08 18:16:53 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-08 18:16:53 +0200
commitc0b0ce5413bca3de5bc5550c5a2b092231db839a (patch)
tree8f968ebecdc435e54980b3fba5f72384a42930b8
parent3b88c76df6ef9d183125defd802a8625bb61b6e5 (diff)
configure: two fixes on dependencies
1) netsniff-ng is also dependant on libnl (e.g. for raw 802.11 devices) 2) Only netsniff-ng depends on tpacket_v3, trafgen on tpacket_v2. Thus, add checks for both. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rwxr-xr-xconfigure41
1 files changed, 35 insertions, 6 deletions
diff --git a/configure b/configure
index 9884233..fb2d6ec 100755
--- a/configure
+++ b/configure
@@ -134,16 +134,17 @@ EOF
echo "[NO]"
MISSING_DEFS=1
tools_remove "trafgen"
+ tools_remove "netsniff-ng"
else
echo "[YES]"
fi
}
-check_tpacket()
+check_tpacket_v3()
{
- echo -n "[*] Checking tpacket ... "
+ echo -n "[*] Checking tpacket_v3 ... "
- cat > $TMPDIR/tpackettest.c << EOF
+ cat > $TMPDIR/tpacketv3test.c << EOF
#include <stdio.h>
#include <linux/if_packet.h>
@@ -155,8 +156,34 @@ void main(void)
}
EOF
- $CC -o $TMPDIR/tpackettest $TMPDIR/tpackettest.c >> $TMPDIR/config.log 2>&1
- if [ ! -x $TMPDIR/tpackettest ] ; then
+ $CC -o $TMPDIR/tpacketv3test $TMPDIR/tpacketv3test.c >> $TMPDIR/config.log 2>&1
+ if [ ! -x $TMPDIR/tpacketv3test ] ; then
+ echo "[NO]"
+ MISSING_DEFS=1
+ tools_remove "netsniff-ng"
+ else
+ echo "[YES]"
+ fi
+}
+
+check_tpacket_v2()
+{
+ echo -n "[*] Checking tpacket_v2 ... "
+
+ cat > $TMPDIR/tpacketv2test.c << EOF
+#include <stdio.h>
+#include <linux/if_packet.h>
+
+struct tpacket2_hdr *hdr;
+
+void main(void)
+{
+ printf("%d\n", hdr->tp_status);
+}
+EOF
+
+ $CC -o $TMPDIR/tpacketv2test $TMPDIR/tpacketv2test.c >> $TMPDIR/config.log 2>&1
+ if [ ! -x $TMPDIR/tpacketv2test ] ; then
echo "[NO]"
MISSING_DEFS=1
tools_remove "netsniff-ng"
@@ -166,6 +193,7 @@ EOF
fi
}
+
check_ncurses()
{
echo -n "[*] Checking ncurses ... "
@@ -387,7 +415,8 @@ fi
check_ccache
check_nacl
check_libnl
-check_tpacket
+check_tpacket_v2
+check_tpacket_v3
check_libnf_ct
check_ncurses
check_libgeoip