diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-07-09 16:59:08 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-07-09 16:59:08 -0400 |
commit | 3c612d9f66385f95d6e7a33e77ffac7bf6156a85 (patch) | |
tree | 6bab9d63b356e3ce45f346a6585554d43f1bfa2e /configure.in | |
parent | 8c9c208990b588c652c13b019fb15d9da55d6306 (diff) |
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
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])]) |