diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | acinclude.m4 | 29 | ||||
| -rw-r--r-- | configure.in | 4 |
3 files changed, 26 insertions, 12 deletions
@@ -1,5 +1,10 @@ 2004-08-13 Rodney Dawes <dobey@novell.com> + * acinclude.m4: Revert previous EVO_LDAP_CHECK changes, aren't working + as well as expceted and determined in testing + +2004-08-13 Rodney Dawes <dobey@novell.com> + * acinclude.m4: Remove EVO_CHECK_LIB Update EVO_LDAP_CHECK to support --with-openldap-{libs,includes} diff --git a/acinclude.m4 b/acinclude.m4 index 72f77d3d3..d3f83734d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -31,13 +31,22 @@ AC_DEFUN([EVO_PURIFY_SUPPORT], [ AC_DEFUN([EVO_LDAP_CHECK], [ default="$1" - AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution], with_openldap="$withval", with_openldap="/usr") - AC_ARG_WITH(openldap-libs,[ --with-openldap-libs=DIR Location of openldap libraries to link with], with_openldap_libs="$withval", with_openldap_libs="$with_openldap/lib") - AC_ARG_WITH(openldap-includes,[ --with-openldap-includes=DIR Location of openldap libraries to link with], with_openldap_includes="$withval", with_openldap_includes="$with_openldap/include") + AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution]) AC_ARG_WITH(static-ldap, [ --with-static-ldap=[no/yes] Link LDAP support statically into evolution ]) - - LDAP_CFLAGS="-I$with_openldap_includes" - LDAP_LDFLAGS="-L$with_openldap_libs" + AC_CACHE_CHECK([for OpenLDAP], ac_cv_with_openldap, ac_cv_with_openldap="${with_openldap:=$default}") + case $ac_cv_with_openldap in + no|"") + with_openldap=no + ;; + yes) + with_openldap=/usr + ;; + *) + with_openldap=$ac_cv_with_openldap + LDAP_CFLAGS="-I$ac_cv_with_openldap/include" + LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib" + ;; + esac if test "$with_openldap" != no; then AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support]) @@ -71,20 +80,20 @@ AC_DEFUN([EVO_LDAP_CHECK], [ AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl") AC_CHECK_LIB(lber, ber_get_tag, [ if test "$with_static_ldap" = "yes"; then - LDAP_LIBS="$with_openldap_libs/liblber.a $LDAP_LIBS" + LDAP_LIBS="$with_openldap/lib/liblber.a $LDAP_LIBS" # libldap might depend on OpenSSL... We need to pull # in the dependency libs explicitly here since we're # not using libtool for the configure test. - if test -f $with_openldap_libs/libldap.la; then - LDAP_LIBS="`. $with_openldap_libs/libldap.la; echo $dependency_libs` $LDAP_LIBS" + if test -f $with_openldap/lib/libldap.la; then + LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS" fi else LDAP_LIBS="-llber $LDAP_LIBS" fi AC_CHECK_LIB(ldap, ldap_open, [ if test $with_static_ldap = "yes"; then - LDAP_LIBS="$with_openldap_libs/libldap.a $LDAP_LIBS" + LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS" else LDAP_LIBS="-lldap $LDAP_LIBS" fi], diff --git a/configure.in b/configure.in index 3746e598a..a8273d709 100644 --- a/configure.in +++ b/configure.in @@ -121,10 +121,10 @@ no) *) case $with_static_ldap in yes) - msg_ldap="yes (static)" + msg_ldap="$with_openldap (static)" ;; *) - msg_ldap="yes (dynamic)" + msg_ldap="$with_openldap (dynamic)" ;; esac esac |
