diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-07-09 14:15:41 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-07-09 14:15:41 -0400 |
commit | 83a8bf24ea9a4bef21f5c52e52ceb5ba1edd85d3 (patch) | |
tree | 5d7f0525972c4578d0dbc64dc03de5e5d1e4a200 | |
parent | a5377e7f7557439fbe17a3f90596bb07de30c06d (diff) | |
download | postgresql-83a8bf24ea9a4bef21f5c52e52ceb5ba1edd85d3.tar.gz postgresql-83a8bf24ea9a4bef21f5c52e52ceb5ba1edd85d3.zip |
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
-rwxr-xr-x | configure | 27 | ||||
-rw-r--r-- | configure.in | 5 |
2 files changed, 17 insertions, 15 deletions
diff --git a/configure b/configure index bb780f3659d..d7830a4383c 100755 --- a/configure +++ b/configure @@ -12463,11 +12463,12 @@ 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="" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldap_bind" >&5 -$as_echo_n "checking for library containing ldap_bind... " >&6; } -if ${ac_cv_search_ldap_bind+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldap_simple_bind" >&5 +$as_echo_n "checking for library containing ldap_simple_bind... " >&6; } +if ${ac_cv_search_ldap_simple_bind+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -12480,11 +12481,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char ldap_bind (); +char ldap_simple_bind (); int main () { -return ldap_bind (); +return ldap_simple_bind (); ; return 0; } @@ -12497,25 +12498,25 @@ for ac_lib in '' ldap_r ldap; do LIBS="-l$ac_lib $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_ldap_bind=$ac_res + ac_cv_search_ldap_simple_bind=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_ldap_bind+:} false; then : + if ${ac_cv_search_ldap_simple_bind+:} false; then : break fi done -if ${ac_cv_search_ldap_bind+:} false; then : +if ${ac_cv_search_ldap_simple_bind+:} false; then : else - ac_cv_search_ldap_bind=no + ac_cv_search_ldap_simple_bind=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldap_bind" >&5 -$as_echo "$ac_cv_search_ldap_bind" >&6; } -ac_res=$ac_cv_search_ldap_bind +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldap_simple_bind" >&5 +$as_echo "$ac_cv_search_ldap_simple_bind" >&6; } +ac_res=$ac_cv_search_ldap_simple_bind if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" diff --git a/configure.in b/configure.in index 2dfcd6844db..bfdc4502adc 100644 --- a/configure.in +++ b/configure.in @@ -1273,9 +1273,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" |