diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2013-06-28 14:40:28 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2013-06-28 14:40:28 +0200 |
commit | f2da15da75130a11676d3083b2d70458b6ab38c2 (patch) | |
tree | df2595b559dbdbf63f2d21c754b467576d1f6958 /configure | |
parent | 7199a4fe1d6f66722158d73d4403f8dad8637bd1 (diff) |
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 <tklauser@distanz.ch>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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 |