]> granicus.if.org Git - php/commitdiff
- Don't add libcrypt if the crypt() function is provided already.
authorfoobar <sniper@php.net>
Fri, 14 Feb 2003 01:27:15 +0000 (01:27 +0000)
committerfoobar <sniper@php.net>
Fri, 14 Feb 2003 01:27:15 +0000 (01:27 +0000)
  (by libc, like in HP-UX)

configure.in
ext/standard/config.m4

index 373a5009462ff72e1c44aac2abea59f994f722da..78e0507166de7759f17a805630259268087e7689 100644 (file)
@@ -734,13 +734,6 @@ if test "$PHP_OPENSSL" != "no"; then
   PHP_SETUP_OPENSSL
 fi
 
-
-AC_CHECK_LIB(crypt, crypt, [
-  PHP_ADD_LIBRARY(crypt)
-  PHP_ADD_LIBRARY(crypt, 1)
-  AC_DEFINE(HAVE_CRYPT,1,[ ]) 
-])
-
 divert(5)
 
 dnl ## In diversion 5 we check which extensions should be compiled.
@@ -821,6 +814,13 @@ esac
 PHP_REGEX
 
 EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
+
+dnl this has to be here to prevent the openssl crypt() from
+dnl overriding the system provided crypt().
+if test "$ac_cv_lib_crypt_crypt" = "yes"; then
+  EXTRA_LIBS="-lcrypt $EXTRA_LIBS -lcrypt"
+fi
+
 unset LIBS LDFLAGS
 
 dnl Configuring Zend and TSRM.
index 683dc6e1ce0bd295e8be904a97960c848843bcc6..47ea5843ac51dd160ba839109110f3ded86f6c60 100644 (file)
@@ -58,6 +58,13 @@ dnl Check for crypt() capabilities
 dnl
 AC_DEFUN(AC_CRYPT_CAP,[
 
+  if test "$ac_cv_func_crypt" = "no"; then
+  AC_CHECK_LIB(crypt, crypt, [
+    LIBS="-lcrypt $LIBS -lcrypt"
+    AC_DEFINE(HAVE_CRYPT, 1, [ ])
+  ])
+  fi
+  
   AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
   AC_TRY_RUN([
 #if HAVE_CRYPT_H
@@ -185,10 +192,6 @@ main() {
   AC_DEFINE_UNQUOTED(PHP_BLOWFISH_CRYPT, $ac_result, [Whether the system supports BlowFish salt])
 ])
 
-dnl AC_CHECK_LIB(pam, pam_start, [
-dnl   EXTRA_LIBS="$EXTRA_LIBS -lpam"
-dnl   AC_DEFINE(HAVE_LIBPAM,1,[ ]) ], []) 
-
 AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot)
 
 AC_CRYPT_CAP