From f2da15da75130a11676d3083b2d70458b6ab38c2 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 28 Jun 2013 14:40:28 +0200 Subject: configure: Improve check for libnl/libnl-genl Actually call some functions in the check program so they will need to get linked. Signed-off-by: Tobias Klauser --- configure | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index fd8211e..a5e8e21 100755 --- a/configure +++ b/configure @@ -89,10 +89,24 @@ check_libnl() # error incompatible libnl version #endif -void main(void) { } +void main(void) +{ + struct nl_sock *sock = nl_socket_alloc(); + struct nl_cache *nl_cache; + int ret = genl_connect(sock); + + ret = genl_ctrl_alloc_cache(sock, &nl_cache); +} EOF - $CC $(pkg-config --cflags libnl-3.0) -o $TMPDIR/libnltest $TMPDIR/libnltest.c >> $TMPDIR/config.log 2>&1 + $CC -W -Wall \ + $(pkg-config --cflags libnl-3.0) \ + $(pkg-config --cflags libnl-genl-3.0) \ + -o $TMPDIR/libnltest \ + $TMPDIR/libnltest.c \ + $(pkg-config --libs libnl-3.0) \ + $(pkg-config --libs libnl-genl-3.0) \ + >> $TMPDIR/config.log 2>&1 if [ ! -x $TMPDIR/libnltest ] ; then echo "[NO]" MISSING_DEFS=1 -- cgit v1.2.3-54-g00ecf