summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-05-12 11:15:51 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-05-13 11:52:17 +0200
commitdae382a1a1481a94b708c82d5aa9fa7253084160 (patch)
treeeda06b66fb7bd25de2deab786d5eb434bac29d13 /configure.ac
parentbf0feae7768d9214e2e7b52dc96fc80f88be730d (diff)
downloadcurl-dae382a1a1481a94b708c82d5aa9fa7253084160.tar.gz
configure: if asked for, fail if ldap is not found
Reported-by: Jakub Zakrzewski Fixes #7053 Closes #7055
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8b3ff904c..5c697618b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -552,6 +552,10 @@ AS_HELP_STRING([--disable-ldap],[Disable LDAP support]),
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])
;;
+ yes)
+ ldap_askedfor="yes"
+ AC_MSG_RESULT(yes)
+ ;;
*)
AC_MSG_RESULT(yes)
;;
@@ -1356,6 +1360,9 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
if test "$LDAPLIBNAME" ; then
AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
+ if test -n "$ldap_askedfor"; then
+ AC_MSG_ERROR([couldn't detect the LDAP libraries])
+ fi
AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])
@@ -1366,6 +1373,9 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
CURL_CHECK_LIBS_LDAP
case X-"$curl_cv_ldap_LIBS" in
X-unknown)
+ if test -n "$ldap_askedfor"; then
+ AC_MSG_ERROR([couldn't detect the LDAP libraries])
+ fi
AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])