The detection for extra libs fails in my environment. According to config.log:
configure:12586: checking whether libnl requires additional libraries configure:12608: gcc -o conftest -g -O2 conftest.c -lnl-3 >&5 /tmp/ccfZXCbJ.o: In function `main': /home/jengelh/obs/zu/home/jengelh/dev/lowpan-tools/lowpan-tools/ conftest.c:35: undefined reference to `genl_connect' collect2: ld returned 1 exit status This happens because lowpan-tools forgot that genl_connect is in its own library in libnl2 and up. Furthermore, any dependent libraries of libnl* is listed in the .so, or in case of static archives, .la files, rendering the -lm check redundant. Signed-off-by: Jan Engelhardt <jeng...@inai.de> --- configure.ac | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/configure.ac b/configure.ac index 6037905..84f9355 100644 --- a/configure.ac +++ b/configure.ac @@ -81,32 +81,7 @@ AM_PATH_PYTHON(,, [:]) AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) # Checks for libraries. -PKG_CHECK_MODULES([NL], [libnl-3.0]) - -AC_MSG_CHECKING([whether libnl requires additional libraries]) -_libnl_save_libs="$LIBS" -LIBS="$NL_LIBS $LIBS" -AC_LINK_IFELSE([AC_LANG_CALL([], [genl_connect])], libnl_add="none" , libnl_add="fail") -if test "$libnl_add" = fail -then -LIBS="$NL_LIBS -lm $_libnl_save_libs" -AC_LINK_IFELSE([AC_LANG_CALL([], [genl_connect])], libnl_add="-lm" , libnl_add="fail") -fi -LIBS="$_libnl_save_libs" -if test "$libnl_add" = fail -then - AC_MSG_RESULT(failure) -dnl AC_MSG_RESULT([failed]) - AC_MSG_FAILURE([failed to link program with libnl]) -else if test "$libnl_add" = none -then - AC_MSG_RESULT([none required]) -else - AC_MSG_RESULT([$libnl_add]) - NL_LIBS="$NL_LIBS $libnl_add" -fi -fi - +PKG_CHECK_MODULES([NL], [libnl-3.0 libnl-genl-3.0]) # Checks for header files. AC_HEADER_STDC -- 1.7.10.4 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel