]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ldap: avoid automake caching issues with LDAP library names
authorMax Dymond <cmeister2@gmail.com>
Thu, 10 Jul 2025 19:15:03 +0000 (20:15 +0100)
committerMax Dymond <cmeister2@gmail.com>
Tue, 15 Jul 2025 13:54:44 +0000 (14:54 +0100)
configure.ac

index a0e63d5dc37a922078e30bdac6761fda6297fb52..578b67b9bed066148f70af608e10acc5378c015d 100644 (file)
@@ -1675,8 +1675,8 @@ if test x$CURL_DISABLE_LDAP != x1 && test "$want_ldap" != "no"; then
       dnl Try LDAP first, then with LBER if needed
       AC_CHECK_LIB("$LDAPLIBNAME", ldap_init, [ldap_lib_ok=yes], [ldap_lib_ok=no])
       if test "$ldap_lib_ok" = "no"; then
-        dnl LDAP alone failed, try with LBER
-        AC_CHECK_LIB("$LDAPLIBNAME", ldap_init, [ldap_lib_ok=yes], [ldap_lib_ok=no], [-l$LBERLIBNAME])
+        dnl LDAP alone failed, try with LBER using a different function
+        AC_CHECK_LIB("$LDAPLIBNAME", ldap_unbind, [ldap_lib_ok=yes], [ldap_lib_ok=no], [-l$LBERLIBNAME])
         if test "$ldap_lib_ok" = "yes"; then
           dnl We need both libraries
           LIBS="-l$LDAPLIBNAME -l$LBERLIBNAME $LIBS"