From: Francesco Chemolli Date: Tue, 17 Nov 2009 09:00:52 +0000 (+0100) Subject: Improved some libraries detection logic X-Git-Tag: SQUID_3_2_0_1~572 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54c95954004ad573a340c5ce98913ff92b4d6708;p=thirdparty%2Fsquid.git Improved some libraries detection logic autoconf AC_SEARCH_LIBS offers more functionality than AC_CHECK_LIB --- diff --git a/configure.in b/configure.in index cd910676ca..50b765ed46 100644 --- a/configure.in +++ b/configure.in @@ -2885,9 +2885,11 @@ AC_CHECK_TYPE(mtyp_t,AC_DEFINE(HAVE_MTYP_T,1,[mtyp_t is defined by the system he #include ]) dnl Check for needed libraries -AC_CHECK_LIB(nsl, main) -AC_CHECK_LIB(socket, main) -AC_CHECK_LIB(opcom_stack,main) +AC_SEARCH_LIBS([gethostbyname],[nsl resolv bind]) +AC_SEARCH_LIBS([res_init],[resolv]) +AC_SEARCH_LIBS([bind],[socket]) +AC_SEARCH_LIBS([opcom_stack_trace],[opcom_stack]) +AC_SEARCH_LIBS([strlcpy], [bsd]) dnl Check for Winsock only on MinGW, on Cygwin we must use emulated BSD socket API case "$host_os" in mingw|mingw32) @@ -2957,19 +2959,7 @@ dnl end rip esac fi -AC_CHECK_LIB(bsd, main) AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"]) -AC_CHECK_LIB(bind, gethostbyname) -if test $ac_cv_lib_bind_gethostbyname = "no" ; then - case "$host" in - i386-*-freebsd*) - AC_MSG_NOTICE([skipping libresolv checks for $host]) - ;; - *) - AC_CHECK_LIB(resolv, main) - ;; - esac -fi case "$host_os" in mingw|mingw32) AC_MSG_NOTICE([Use MSVCRT for math functions.])