]> granicus.if.org Git - php/commitdiff
Fixed bug #24025 (Can not build with shared ldap support)
authorfoobar <sniper@php.net>
Tue, 1 Jul 2003 00:02:13 +0000 (00:02 +0000)
committerfoobar <sniper@php.net>
Tue, 1 Jul 2003 00:02:13 +0000 (00:02 +0000)
ext/ldap/config.m4

index 39fac5a2d7cd4ee46efd8d26a0cefa9820772563..2eb00971b8781ad5b5061809c2924fecd994c363 100644 (file)
@@ -157,6 +157,7 @@ if test "$PHP_LDAP" != "no"; then
 
   dnl Check for 3 arg ldap_set_rebind_proc
   _SAVE_CPPFLAGS=$CPPFLAGS
+  _SAVE_LDFLAGS=$LDFLAGS
   CPPFLAGS="$CPPFLAGS -I$LDAP_INCDIR"
   AC_CACHE_CHECK([for 3 arg ldap_set_rebind_proc], ac_cv_3arg_setrebindproc,
   [AC_TRY_COMPILE([#include <ldap.h>], [ldap_set_rebind_proc(0,0,0)],
@@ -169,7 +170,8 @@ if test "$PHP_LDAP" != "no"; then
   dnl Solaris 2.8 claims to be 2004 API, but doesn't have
   dnl ldap_parse_reference() nor ldap_start_tls_s()
   AC_CHECK_FUNCS([ldap_parse_reference ldap_start_tls_s])
-
+  LDFLAGS=$_SAVE_LDFLAGS
+  
   dnl
   dnl SASL check
   dnl
@@ -180,7 +182,10 @@ if test "$PHP_LDAP" != "no"; then
   dnl
   dnl Sanity check
   dnl 
+  _SAVE_LDFLAGS=$LDFLAGS
+  LDFLAGS="$LDFLAGS $LDAP_SHARED_LIBADD"
   AC_CHECK_FUNC(ldap_bind_s, [], [
     AC_MSG_ERROR([LDAP build check failed. Please check config.log for more information.]) 
   ])
+  LDFLAGS=$_SAVE_LDFLAGS
 fi