aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in29
2 files changed, 22 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 88e11bb6e0..80eb4a0a6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-21 Dan Winship <danw@ximian.com>
+
+ * configure.in: Fix the OpenLDAP check to default to "no" if you
+ don't specify anything.
+
2001-06-20 Kevin Breit <battery841@mediaone.net>
* doc/C/config-setupassist.sgml: Updated for new UI.
diff --git a/configure.in b/configure.in
index 1adce69ddd..f8c4bcf7ed 100644
--- a/configure.in
+++ b/configure.in
@@ -366,18 +366,25 @@ dnl **************************************************
dnl * ldap related stuff.
dnl **************************************************
AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution])
-if test "$with_openldap" != no; then
- case $with_openldap in
- /*)
- LDAP_CFLAGS="-I$with_openldap/include"
- LDAP_LDFLAGS="-L$with_openldap/lib"
- ;;
- *)
- with_openldap=/usr
- esac
- AC_DEFINE(HAVE_LDAP)
+AC_CACHE_CHECK([for OpenLDAP], ac_cv_with_openldap, ac_cv_with_openldap="${with_openldap:=no}")
+case $ac_cv_with_openldap in
+no|"")
+ msg_ldap=no
+ ;;
+yes)
+ with_openldap=/usr
+ msg_ldap=yes
+ ;;
+*)
+ with_openldap=$ac_cv_with_openldap
+ LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
+ LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
msg_ldap=yes
+ ;;
+esac
+if test "$msg_ldap" = yes; then
+ AC_DEFINE(HAVE_LDAP)
AC_CACHE_CHECK(if OpenLDAP is version 2.x, ac_cv_openldap_version2, [
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LDAP_CFLAGS"
@@ -413,8 +420,6 @@ if test "$with_openldap" != no; then
AC_SUBST(LDAP_CFLAGS)
AC_SUBST(LDAP_LIBS)
-else
- msg_ldap=no
fi
AM_CONDITIONAL(ENABLE_LDAP, test $msg_ldap = yes)