@@ -13369,6 +13369,17 @@ fi
13369
13369
13370
13370
fi
13371
13371
13372
+ # PGAC_LDAP_SAFE
13373
+ # --------------
13374
+ # PostgreSQL sometimes loads libldap_r and plain libldap into the same
13375
+ # process. Check for OpenLDAP versions known not to tolerate doing so; assume
13376
+ # non-OpenLDAP implementations are safe. The dblink test suite exercises the
13377
+ # hazardous interaction directly.
13378
+
13379
+
13380
+
13381
+
13382
+
13372
13383
if test "$with_ldap" = yes ; then
13373
13384
if test "$PORTNAME" != "win32"; then
13374
13385
@@ -13526,6 +13537,72 @@ fi
13526
13537
13527
13538
done
13528
13539
13540
+ { $as_echo "$as_me:$LINENO: checking for compatible LDAP implementation" >&5
13541
+ $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13542
+ if test "${pgac_cv_ldap_safe+set}" = set; then
13543
+ $as_echo_n "(cached) " >&6
13544
+ else
13545
+ cat >conftest.$ac_ext <<_ACEOF
13546
+ /* confdefs.h. */
13547
+ _ACEOF
13548
+ cat confdefs.h >>conftest.$ac_ext
13549
+ cat >>conftest.$ac_ext <<_ACEOF
13550
+ /* end confdefs.h. */
13551
+ #include <ldap.h>
13552
+ #if !defined(LDAP_VENDOR_VERSION) || \
13553
+ (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13554
+ LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13555
+ choke me
13556
+ #endif
13557
+ int
13558
+ main ()
13559
+ {
13560
+
13561
+ ;
13562
+ return 0;
13563
+ }
13564
+ _ACEOF
13565
+ rm -f conftest.$ac_objext
13566
+ if { (ac_try="$ac_compile"
13567
+ case "(($ac_try" in
13568
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13569
+ *) ac_try_echo=$ac_try;;
13570
+ esac
13571
+ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13572
+ $as_echo "$ac_try_echo") >&5
13573
+ (eval "$ac_compile") 2>conftest.er1
13574
+ ac_status=$?
13575
+ grep -v '^ *+' conftest.er1 >conftest.err
13576
+ rm -f conftest.er1
13577
+ cat conftest.err >&5
13578
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579
+ (exit $ac_status); } && {
13580
+ test -z "$ac_c_werror_flag" ||
13581
+ test ! -s conftest.err
13582
+ } && test -s conftest.$ac_objext; then
13583
+ pgac_cv_ldap_safe=yes
13584
+ else
13585
+ $as_echo "$as_me: failed program was:" >&5
13586
+ sed 's/^/| /' conftest.$ac_ext >&5
13587
+
13588
+ pgac_cv_ldap_safe=no
13589
+ fi
13590
+
13591
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592
+ fi
13593
+ { $as_echo "$as_me:$LINENO: result: $pgac_cv_ldap_safe" >&5
13594
+ $as_echo "$pgac_cv_ldap_safe" >&6; }
13595
+
13596
+ if test "$pgac_cv_ldap_safe" != yes; then
13597
+ { $as_echo "$as_me:$LINENO: WARNING:
13598
+ *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13599
+ *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13600
+ *** also uses LDAP will crash on exit." >&5
13601
+ $as_echo "$as_me: WARNING:
13602
+ *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13603
+ *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13604
+ *** also uses LDAP will crash on exit." >&2;}
13605
+ fi
13529
13606
else
13530
13607
13531
13608
for ac_header in winldap.h
0 commit comments