From 7728dadd907e9462159ed55c96c10bd6ce6983e9 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 21 Jun 2001 13:51:10 +0000 Subject: Fix the OpenLDAP check to default to "no" if you don't specify anything. * configure.in: Fix the OpenLDAP check to default to "no" if you don't specify anything. svn path=/trunk/; revision=10352 --- configure.in | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'configure.in') 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) -- cgit