diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/configure.in b/configure.in index 581d0d9b557..0c302019157 100644 --- a/configure.in +++ b/configure.in @@ -1186,27 +1186,25 @@ if test "$with_libxslt" = yes ; then AC_CHECK_LIB(xslt, xsltCleanupGlobals, [], [AC_MSG_ERROR([library 'xslt' is required for XSLT support])]) fi -# Note: We can test for libldap_r only after we know PTHREAD_LIBS +# Note: We can test for libldap_r only after we know PTHREAD_LIBS; +# also, on AIX, we may need to have openssl in LIBS for this step. if test "$with_ldap" = yes ; then _LIBS="$LIBS" if test "$PORTNAME" != "win32"; then + AC_CHECK_LIB(ldap, ldap_bind, [], + [AC_MSG_ERROR([library 'ldap' is required for LDAP])], + [$EXTRA_LDAP_LIBS]) + LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS" if test "$enable_thread_safety" = yes; then # Use ldap_r for FE if available, else assume ldap is thread-safe. - # If ldap_r does exist, assume without checking that ldap does too. - # On some platforms ldap_r fails to link without PTHREAD_LIBS; - # also, on AIX we must probe ldap_simple_bind not ldap_bind. - LIBS="" - AC_SEARCH_LIBS(ldap_simple_bind, [ldap_r ldap], [], - [AC_MSG_ERROR([library 'ldap' is required for LDAP])], - [$PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS]) - LDAP_LIBS_FE="$LIBS $EXTRA_LDAP_LIBS" - LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS" + # On some platforms ldap_r fails to link without PTHREAD_LIBS. + LIBS="$_LIBS" + AC_CHECK_LIB(ldap_r, ldap_bind, + [LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"], + [LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"], + [$PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS]) else - AC_CHECK_LIB(ldap, ldap_bind, [], - [AC_MSG_ERROR([library 'ldap' is required for LDAP])], - [$EXTRA_LDAP_LIBS]) LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS" - LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS" fi else AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32' is required for LDAP])]) |