1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Un-break AIX build.

In commit d0a02bdb8, I'd supposed that uniformly probing for
ldap_bind would make the intent clearer.  However, that seems
not to work on AIX, for obscure reasons (maybe it's a macro
there?).  Revert to the former behavior of probing
ldap_simple_bind for thread-safe cases and ldap_bind otherwise.

Per buildfarm member hoverfly.

Discussion: https://postgr.es/m/17083-a19190d9591946a7@postgresql.org
This commit is contained in:
Tom Lane
2021-07-09 14:15:41 -04:00
parent d23ac62afa
commit 31e8cfac58
2 changed files with 17 additions and 15 deletions

View File

@ -1292,9 +1292,10 @@ if test "$with_ldap" = yes ; then
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
# 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_bind, [ldap_r ldap], [],
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"