mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Un-break AIX build, take 2.
I incorrectly diagnosed the reason why hoverfly is unhappy. Looking closer, it appears that it fails to link libldap unless libssl is also present; so the problem was my idea of clearing LIBS before making the check. Revert to essentially the original coding, except that instead of failing when libldap_r isn't there, use libldap. Per buildfarm member hoverfly. Discussion: https://postgr.es/m/17083-a19190d9591946a7@postgresql.org
This commit is contained in:
26
configure.in
26
configure.in
@ -1266,27 +1266,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
|
||||
AC_CHECK_FUNCS([ldap_initialize])
|
||||
else
|
||||
|
Reference in New Issue
Block a user