From b67df4299c18ba3f3fb30a2e3488873bd49d4153 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 20 Aug 2013 10:50:10 +0200 Subject: configure: allow trafgen build when only TPACKET_V2 is available On machines like RHEL6 that do not have support for TPACKET_V3, we should still allow at least trafgen to be built for network testing. Thus, do something useful with the TPACKET_V3 configure check and comment out in ring.h relevant structures. Signed-off-by: Daniel Borkmann --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 4d6b284..b8d1374 100755 --- a/configure +++ b/configure @@ -16,6 +16,7 @@ HAVE_LIBPCAP=0 HAVE_HWTSTAMP=0 HAVE_LIBGEOIP=0 HAVE_LIBZ=0 +HAVE_TPACKET3=0 [ -z $CC ] && CC=cc @@ -203,6 +204,7 @@ EOF tools_remove "netsniff-ng" else echo "[YES]" + HAVE_TPACKET3=1 fi } @@ -528,6 +530,7 @@ gen_config_hdr() local _have_libgeoip="" local _have_libz="" local _have_hwts="" + local _have_tp3="" echo "[*] Generating config.h ... " @@ -554,6 +557,10 @@ gen_config_hdr() _have_libz="#define HAVE_LIBZ 1" fi + if [ "$HAVE_TPACKET3" == "1" ] ; then + _have_tp3="#define HAVE_TPACKET3 1" + fi + cat > config.h << EOF #ifndef CONFIG_H #define CONFIG_H @@ -567,6 +574,7 @@ $_have_libpcap $_have_libgeoip $_have_libz $_have_hwts +$_have_tp3 #endif /* CONFIG_H */ EOF } -- cgit v1.2.3-54-g00ecf