From e6556d7736ff65de5ebd8e984ab7b5615731ee29 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Fri, 6 Nov 2015 16:46:16 +0200 Subject: build: configure: Check for libnl-route libnl-route is used in netsniff-ng to dump nlmsg flags. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- configure | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 5bf898a..edb10fd 100755 --- a/configure +++ b/configure @@ -201,6 +201,41 @@ EOF fi } +check_libnl_route() +{ + echo -n "[*] Checking libnl-route ... " + + cat > $TMPDIR/libnlroutetest.c << EOF +#include +#include + +int main(void) +{ + char str[100]; + + rtnl_addr_flags2str(1, str, sizeof(str)); + rtnl_link_flags2str(1, str, sizeof(str)); + rtnl_link_operstate2str(1, str, sizeof(str)); + + return 0; +} +EOF + + $CC \ + $($PKG_CONFIG --cflags libnl-route-3.0 2>> config.log) \ + -o $TMPDIR/libnlroutetest \ + $TMPDIR/libnlroutetest.c \ + $($PKG_CONFIG --libs libnl-route-3.0 2>> config.log) \ + >> config.log 2>&1 + if [ ! -x $TMPDIR/libnlroutetest ] ; then + echo "[NO]" + MISSING_DEFS=1 + tools_remove "netsniff-ng" + else + echo "[YES]" + fi +} + check_tpacket_v3() { echo -n "[*] Checking tpacket_v3 ... " @@ -613,6 +648,7 @@ check_flex check_bison check_nacl check_libnl +check_libnl_route check_tpacket_v2 check_tpacket_v3 check_libnf_ct -- cgit v1.2.3-54-g00ecf