]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: add check for ldap_init_fd
authorDaniel Stenberg <daniel@haxx.se>
Thu, 22 Jun 2023 12:34:49 +0000 (14:34 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 23 Jun 2023 08:42:55 +0000 (10:42 +0200)
... as otherwise the configure script will say it is OpenLDAP in the
summary, but not set the USE_OPENLDAP define, therefor not using the
intended OpenLDAP code paths.

Regression since 4d7385446 (7.85.0)
Fixes #11372
Closes #11374
Reported-by: vlkl-sap on github
configure.ac

index 373e2e0cef6862527d323d625347e4cc7c1d9617..696a50505f37ab2f0b4237b2bea695a30c30d53c 100644 (file)
@@ -1706,16 +1706,19 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
 fi
 
 if test x$CURL_DISABLE_LDAP != x1 ; then
-  AC_CHECK_FUNCS([ldap_url_parse])
+  AC_CHECK_FUNCS([ldap_url_parse \
+                  ldap_init_fd])
 
   if test "$LDAPLIBNAME" = "wldap32"; then
     curl_ldap_msg="enabled (winldap)"
     AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
   else
-    curl_ldap_msg="enabled (OpenLDAP)"
     if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
+      curl_ldap_msg="enabled (OpenLDAP)"
       AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
       AC_SUBST(USE_OPENLDAP, [1])
+    else
+      curl_ldap_msg="enabled (ancient OpenLDAP)"
     fi
   fi
 fi