From: Amos Jeffries Date: Sat, 21 Nov 2009 01:50:55 +0000 (+1300) Subject: Author: Francesco Chemolli X-Git-Tag: SQUID_3_1_0_15~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11127ac6812949390a7cf7c7b1fb1ee0456068f3;p=thirdparty%2Fsquid.git Author: Francesco Chemolli Improved some libraries detection logic autoconf AC_SEARCH_LIBS offers more functionality than AC_CHECK_LIB Also, add support and detection of NSS nis libraries. --- diff --git a/configure.in b/configure.in index 03601d0c0f..f943bced07 100644 --- a/configure.in +++ b/configure.in @@ -2542,9 +2542,12 @@ 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]) +AC_SEARCH_LIBS([yp_match], [nsl nss_nis nss_nisplus]) dnl Check for Winsock only on MinGW, on Cygwin we must use emulated BSD socket API case "$host_os" in mingw|mingw32) @@ -2614,19 +2617,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.])