]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
./configure needs to use $CRYPTLIB when checking for crypt()
authorwessels <>
Sat, 30 Jun 2007 12:33:05 +0000 (12:33 +0000)
committerwessels <>
Sat, 30 Jun 2007 12:33:05 +0000 (12:33 +0000)
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.

configure.in

index 6dba1c0242c83e173f65a786e1e6a4e299bf5690..836b3daefb3c26064bdf31f78017f084974a276e 100644 (file)
@@ -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.