summaryrefslogtreecommitdiff
path: root/ext/ldap/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ldap/config.m4')
-rw-r--r--ext/ldap/config.m418
1 files changed, 14 insertions, 4 deletions
diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4
index 7555f43ccb..28dd19491d 100644
--- a/ext/ldap/config.m4
+++ b/ext/ldap/config.m4
@@ -99,7 +99,9 @@ if test "$PHP_LDAP" != "no"; then
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_ORALDAP,1,[ ])
-
+ if test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
+ AC_DEFINE(HAVE_ORALDAP_10,1,[ ])
+ fi
else
AC_MSG_ERROR(Cannot find ldap libraries in $LDAP_LIBDIR.)
fi
@@ -112,8 +114,6 @@ if test "$PHP_LDAP" != "no"; then
_SAVE_CPPFLAGS=$CPPFLAGS
_SAVE_LDFLAGS=$LDFLAGS
CPPFLAGS="$CPPFLAGS -I$LDAP_INCDIR"
- LDFLAGS="$LDFLAGS $LDAP_SHARED_LIBADD"
-
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)],
ac_cv_3arg_setrebindproc=yes, ac_cv_3arg_setrebindproc=no)])
@@ -124,6 +124,16 @@ 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])
+ AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s])
+ LDFLAGS=$_SAVE_LDFLAGS
+
+ 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