diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/configure b/configure index 7a97bdc2ce0..beb65ebffaa 100755 --- a/configure +++ b/configure @@ -9475,6 +9475,17 @@ fi fi +# PGAC_LDAP_SAFE +# -------------- +# PostgreSQL sometimes loads libldap_r and plain libldap into the same +# process. Check for OpenLDAP versions known not to tolerate doing so; assume +# non-OpenLDAP implementations are safe. The dblink test suite exercises the +# hazardous interaction directly. + + + + + if test "$with_ldap" = yes ; then if test "$PORTNAME" != "win32"; then for ac_header in ldap.h @@ -9491,6 +9502,47 @@ fi done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5 +$as_echo_n "checking for compatible LDAP implementation... " >&6; } +if ${pgac_cv_ldap_safe+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ldap.h> +#if !defined(LDAP_VENDOR_VERSION) || \ + (defined(LDAP_API_FEATURE_X_OPENLDAP) && \ + LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431) +choke me +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + pgac_cv_ldap_safe=yes +else + pgac_cv_ldap_safe=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5 +$as_echo "$pgac_cv_ldap_safe" >&6; } + +if test "$pgac_cv_ldap_safe" != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend +*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and +*** also uses LDAP will crash on exit." >&5 +$as_echo "$as_me: WARNING: +*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend +*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and +*** also uses LDAP will crash on exit." >&2;} +fi else for ac_header in winldap.h do : |