From c8ac5a2281347d8df7a423885f68ed8039f26b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 16 Nov 2014 15:43:14 +0100 Subject: [PATCH] Fix setsockopt test to search for libnetwork as well Rewrite to use AC_SEARCH_LIBS. --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cb21af1..ca82038 100644 --- a/configure.ac +++ b/configure.ac @@ -263,9 +263,11 @@ AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP", # # Check for network libraries. They are needed for tests. # -AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt, - [NETLIBS="-lsocket $NETLIBS"])) +_save_libs="$LIBS" +AC_SEARCH_LIBS(setsockopt, network socket, [], [], [$NETLIBS]) +NETLIBS="$LIBS $NETLIBS" AC_SUBST(NETLIBS) +LIBS="$_save_libs" if test "$have_w32_system" = yes; then if test "$have_w32ce_system" = yes; then -- 1.8.3.4