From: wessels <> Date: Sat, 30 Jun 2007 12:33:05 +0000 (+0000) Subject: ./configure needs to use $CRYPTLIB when checking for crypt() X-Git-Tag: SQUID_3_0_PRE7~174 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d06d566f19d13fba44a782fcef3041bd16dab53c;p=thirdparty%2Fsquid.git ./configure needs to use $CRYPTLIB when checking for crypt() When ./configure checks for the crypt() function, it should have -lcrypt in $LIBS (if -lcrypt was found). Created a special AC_CHECK_FUNCS for crypt() that temporarily adds $CRYPTLIB to $LIBS. This became a problem when #if HAVE_CRYPT was added to helpers/basic_auth/NCSA/ncsa_auth.c. The crypt() function was always there, but not always surrounded by the #ifdef. --- diff --git a/configure.in b/configure.in index 6dba1c0242..836b3daefb 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Configuration input file for Squid dnl -dnl $Id: configure.in,v 1.461 2007/06/25 11:02:34 hno Exp $ +dnl $Id: configure.in,v 1.462 2007/06/30 06:33:05 wessels Exp $ dnl dnl dnl @@ -11,7 +11,7 @@ AM_CONFIG_HEADER(include/autoconf.h) AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE([tar-ustar]) -AC_REVISION($Revision: 1.461 $)dnl +AC_REVISION($Revision: 1.462 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -2562,7 +2562,6 @@ AC_CHECK_FUNCS(\ bswap_32 \ bswap16 \ bswap32 \ - crypt \ fchmod \ getdtablesize \ getpagesize \ @@ -2617,6 +2616,12 @@ AC_CHECK_FUNCS(\ vsnprintf \ ) +# check for crypt, may require -lcrypt +SAVED_LIBS="$LIBS" +LIBS="$LIBS $CRYPTLIB" +AC_CHECK_FUNCS(crypt) +LIBS="$SAVED_LIBS" + # Check for libepoll EPOLL_LIB= AC_CHECK_LIB(epoll, epoll_ctl, [EPOLL_LIBS="-lepoll"]) @@ -2713,6 +2718,7 @@ select) esac + dnl Yay! Another Linux brokenness. Its not good enough dnl to know that setresuid() exists, because RedHat 5.0 declares dnl setresuid() but doesn't implement it.