Fix busted test for ldap_initialize.
Sigh ... I was expecting AC_CHECK_LIB to do something it didn't, namely update LIBS. This led to not finding ldap_initialize. Fix by moving the probe for ldap_initialize. In some sense this is more correct anyway, since (at least for now) we care about whether ldap_initialize exists in libldap not libldap_r. Per buildfarm member elver and local testing. Discussion: https://postgr.es/m/17083-a19190d9591946a7@postgresql.org
This commit is contained in:
parent
44bd0126c7
commit
9f6be2e79f
23
configure
vendored
23
configure
vendored
@ -12929,6 +12929,18 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
|
LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
|
||||||
|
# This test is carried out against libldap.
|
||||||
|
for ac_func in ldap_initialize
|
||||||
|
do :
|
||||||
|
ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
|
||||||
|
if test "x$ac_cv_func_ldap_initialize" = xyes; then :
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_LDAP_INITIALIZE 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if test "$enable_thread_safety" = yes; then
|
if test "$enable_thread_safety" = yes; then
|
||||||
# Use ldap_r for FE if available, else assume ldap is thread-safe.
|
# Use ldap_r for FE if available, else assume ldap is thread-safe.
|
||||||
# On some platforms ldap_r fails to link without PTHREAD_LIBS.
|
# On some platforms ldap_r fails to link without PTHREAD_LIBS.
|
||||||
@ -12978,17 +12990,6 @@ fi
|
|||||||
else
|
else
|
||||||
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
|
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
|
||||||
fi
|
fi
|
||||||
for ac_func in ldap_initialize
|
|
||||||
do :
|
|
||||||
ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
|
|
||||||
if test "x$ac_cv_func_ldap_initialize" = xyes; then :
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define HAVE_LDAP_INITIALIZE 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
|
||||||
$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
|
$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
|
||||||
|
@ -1294,6 +1294,8 @@ if test "$with_ldap" = yes ; then
|
|||||||
[AC_MSG_ERROR([library 'ldap' is required for LDAP])],
|
[AC_MSG_ERROR([library 'ldap' is required for LDAP])],
|
||||||
[$EXTRA_LDAP_LIBS])
|
[$EXTRA_LDAP_LIBS])
|
||||||
LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
|
LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
|
||||||
|
# This test is carried out against libldap.
|
||||||
|
AC_CHECK_FUNCS([ldap_initialize])
|
||||||
if test "$enable_thread_safety" = yes; then
|
if test "$enable_thread_safety" = yes; then
|
||||||
# Use ldap_r for FE if available, else assume ldap is thread-safe.
|
# Use ldap_r for FE if available, else assume ldap is thread-safe.
|
||||||
# On some platforms ldap_r fails to link without PTHREAD_LIBS.
|
# On some platforms ldap_r fails to link without PTHREAD_LIBS.
|
||||||
@ -1305,7 +1307,6 @@ if test "$with_ldap" = yes ; then
|
|||||||
else
|
else
|
||||||
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
|
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_FUNCS([ldap_initialize])
|
|
||||||
else
|
else
|
||||||
AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32' is required for LDAP])])
|
AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32' is required for LDAP])])
|
||||||
LDAP_LIBS_FE="-lwldap32"
|
LDAP_LIBS_FE="-lwldap32"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user