af9dc8
af9dc8
Use -lldap_r by default.
af9dc8
af9dc8
--- php-5.4.8/ext/ldap/config.m4.ldap_r
af9dc8
+++ php-5.4.8/ext/ldap/config.m4
af9dc8
@@ -95,7 +95,10 @@ if test "$PHP_LDAP" != "no"; then
af9dc8
     LDAP_PTHREAD=
af9dc8
   fi
af9dc8
 
af9dc8
-  if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then
af9dc8
+  if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then
af9dc8
+    PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
af9dc8
+    PHP_ADD_LIBRARY_WITH_PATH(ldap_r, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
af9dc8
+  elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then
af9dc8
     PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
af9dc8
     PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
af9dc8