@@ -12456,22 +12456,18 @@ fi
12456
12456
12457
12457
fi
12458
12458
12459
- # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12459
+ # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
12460
+ # also, on AIX, we may need to have openssl in LIBS for this step.
12460
12461
if test "$with_ldap" = yes ; then
12461
12462
_LIBS="$LIBS"
12462
12463
if test "$PORTNAME" != "win32"; then
12463
- if test "$enable_thread_safety" = yes; then
12464
- # Use ldap_r for FE if available, else assume ldap is thread-safe.
12465
- # If ldap_r does exist, assume without checking that ldap does too.
12466
- # On some platforms ldap_r fails to link without PTHREAD_LIBS;
12467
- # also, on AIX we must probe ldap_simple_bind not ldap_bind.
12468
- LIBS=""
12469
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldap_simple_bind" >&5
12470
- $as_echo_n "checking for library containing ldap_simple_bind... " >&6; }
12471
- if ${ac_cv_search_ldap_simple_bind+:} false; then :
12464
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12465
+ $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12466
+ if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12472
12467
$as_echo_n "(cached) " >&6
12473
12468
else
12474
- ac_func_search_save_LIBS=$LIBS
12469
+ ac_check_lib_save_LIBS=$LIBS
12470
+ LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12475
12471
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12476
12472
/* end confdefs.h. */
12477
12473
@@ -12481,59 +12477,49 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12481
12477
#ifdef __cplusplus
12482
12478
extern "C"
12483
12479
#endif
12484
- char ldap_simple_bind ();
12480
+ char ldap_bind ();
12485
12481
int
12486
12482
main ()
12487
12483
{
12488
- return ldap_simple_bind ();
12484
+ return ldap_bind ();
12489
12485
;
12490
12486
return 0;
12491
12487
}
12492
12488
_ACEOF
12493
- for ac_lib in '' ldap_r ldap; do
12494
- if test -z "$ac_lib"; then
12495
- ac_res="none required"
12496
- else
12497
- ac_res=-l$ac_lib
12498
- LIBS="-l$ac_lib $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $ac_func_search_save_LIBS"
12499
- fi
12500
- if ac_fn_c_try_link "$LINENO"; then :
12501
- ac_cv_search_ldap_simple_bind=$ac_res
12489
+ if ac_fn_c_try_link "$LINENO"; then :
12490
+ ac_cv_lib_ldap_ldap_bind=yes
12491
+ else
12492
+ ac_cv_lib_ldap_ldap_bind=no
12502
12493
fi
12503
12494
rm -f core conftest.err conftest.$ac_objext \
12504
- conftest$ac_exeext
12505
- if ${ac_cv_search_ldap_simple_bind+:} false; then :
12506
- break
12495
+ conftest$ac_exeext conftest.$ac_ext
12496
+ LIBS=$ac_check_lib_save_LIBS
12507
12497
fi
12508
- done
12509
- if ${ac_cv_search_ldap_simple_bind+:} false; then :
12498
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12499
+ $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12500
+ if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12501
+ cat >>confdefs.h <<_ACEOF
12502
+ #define HAVE_LIBLDAP 1
12503
+ _ACEOF
12510
12504
12511
- else
12512
- ac_cv_search_ldap_simple_bind=no
12513
- fi
12514
- rm conftest.$ac_ext
12515
- LIBS=$ac_func_search_save_LIBS
12516
- fi
12517
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldap_simple_bind" >&5
12518
- $as_echo "$ac_cv_search_ldap_simple_bind" >&6; }
12519
- ac_res=$ac_cv_search_ldap_simple_bind
12520
- if test "$ac_res" != no; then :
12521
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12505
+ LIBS="-lldap $LIBS"
12522
12506
12523
12507
else
12524
12508
as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12525
12509
fi
12526
12510
12527
- LDAP_LIBS_FE="$LIBS $EXTRA_LDAP_LIBS"
12528
- LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12529
- else
12530
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12531
- $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12532
- if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12511
+ LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12512
+ if test "$enable_thread_safety" = yes; then
12513
+ # Use ldap_r for FE if available, else assume ldap is thread-safe.
12514
+ # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12515
+ LIBS="$_LIBS"
12516
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12517
+ $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12518
+ if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12533
12519
$as_echo_n "(cached) " >&6
12534
12520
else
12535
12521
ac_check_lib_save_LIBS=$LIBS
12536
- LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12522
+ LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12537
12523
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12538
12524
/* end confdefs.h. */
12539
12525
@@ -12553,29 +12539,24 @@ return ldap_bind ();
12553
12539
}
12554
12540
_ACEOF
12555
12541
if ac_fn_c_try_link "$LINENO"; then :
12556
- ac_cv_lib_ldap_ldap_bind =yes
12542
+ ac_cv_lib_ldap_r_ldap_bind =yes
12557
12543
else
12558
- ac_cv_lib_ldap_ldap_bind =no
12544
+ ac_cv_lib_ldap_r_ldap_bind =no
12559
12545
fi
12560
12546
rm -f core conftest.err conftest.$ac_objext \
12561
12547
conftest$ac_exeext conftest.$ac_ext
12562
12548
LIBS=$ac_check_lib_save_LIBS
12563
12549
fi
12564
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12565
- $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12566
- if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12567
- cat >>confdefs.h <<_ACEOF
12568
- #define HAVE_LIBLDAP 1
12569
- _ACEOF
12570
-
12571
- LIBS="-lldap $LIBS"
12572
-
12550
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12551
+ $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12552
+ if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12553
+ LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12573
12554
else
12574
- as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12555
+ LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12575
12556
fi
12576
12557
12558
+ else
12577
12559
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12578
- LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12579
12560
fi
12580
12561
for ac_func in ldap_initialize
12581
12562
do :
0 commit comments