aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-08-11 02:26:58 +0800
committerChris Toshok <toshok@src.gnome.org>2001-08-11 02:26:58 +0800
commit43ba58102065575dd352f4ee58f262ef295f150f (patch)
tree5bc20745e3fd3ccf7c06e6c85316870ea086f869
parent854fb9e9b0d6a603f4167b7fafe2a59854bdbec5 (diff)
downloadgsoc2013-evolution-43ba58102065575dd352f4ee58f262ef295f150f.tar
gsoc2013-evolution-43ba58102065575dd352f4ee58f262ef295f150f.tar.gz
gsoc2013-evolution-43ba58102065575dd352f4ee58f262ef295f150f.tar.bz2
gsoc2013-evolution-43ba58102065575dd352f4ee58f262ef295f150f.tar.lz
gsoc2013-evolution-43ba58102065575dd352f4ee58f262ef295f150f.tar.xz
gsoc2013-evolution-43ba58102065575dd352f4ee58f262ef295f150f.tar.zst
gsoc2013-evolution-43ba58102065575dd352f4ee58f262ef295f150f.zip
if libldap.la is there, default to static linking of openldap. if it's
2001-08-10 Chris Toshok <toshok@ximian.com> * configure.in: if libldap.la is there, default to static linking of openldap. if it's not, default to dynamic. also, provide --with-static-ldap for users that want to override these defaults. svn path=/trunk/; revision=11888
-rw-r--r--ChangeLog6
-rw-r--r--configure.in51
2 files changed, 47 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 59046d2734..a39b69ca94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-10 Chris Toshok <toshok@ximian.com>
+
+ * configure.in: if libldap.la is there, default to static linking
+ of openldap. if it's not, default to dynamic. also, provide
+ --with-static-ldap for users that want to override these defaults.
+
2001-08-09 Chris Toshok <toshok@ximian.com>
* configure.in: link statically with OpenLDAP.
diff --git a/configure.in b/configure.in
index d07d6a27d2..8806029d88 100644
--- a/configure.in
+++ b/configure.in
@@ -369,7 +369,8 @@ LIBS="$LIBS_save"
dnl **************************************************
dnl * ldap related stuff.
dnl **************************************************
-AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution])
+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 ])
AC_CACHE_CHECK([for OpenLDAP], ac_cv_with_openldap, ac_cv_with_openldap="${with_openldap:=no}")
case $ac_cv_with_openldap in
no|"")
@@ -388,7 +389,27 @@ yes)
esac
if test "$msg_ldap" = yes; then
+
AC_DEFINE(HAVE_LDAP)
+
+ if test -f $with_openldap/lib/libldap.la; then
+ msg_ldap_linktype="(static)"
+ else
+ msg_ldap_linktype="(dynamic)"
+ fi
+
+
+ if test "${with_static_ldap+set}" = set; then
+ case $with_static_ldap in
+ no|"")
+ msg_ldap_linktype="(dynamic)"
+ ;;
+ *)
+ msg_ldap_linktype="(static)"
+ ;;
+ esac
+ fi
+
AC_CACHE_CHECK(if OpenLDAP is version 2.x, ac_cv_openldap_version2, [
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LDAP_CFLAGS"
@@ -406,21 +427,31 @@ if test "$msg_ldap" = yes; then
AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="-lresolv")
AC_CHECK_LIB(lber, ber_get_tag, [
- 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/lib/libldap.la; then
- LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS"
+ if test "$msg_ldap_linktype" = "(static)"; then
+ 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/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, LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS",
+ AC_CHECK_LIB(ldap, ldap_open, [
+ if test $msg_ldap_linktype = "(static)"; then
+ LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS",
+ else
+ LDAP_LIBS="-lldap $LDAP_LIBS"
+ fi],
LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
LDAP_LIBS="$LDAP_LDFLAGS $LDAP_LIBS"
], LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
if test -z "$LDAP_LIBS"; then
AC_MSG_ERROR(could not find OpenLDAP libraries)
- else
+ elif test "$msg_ldap_linktype" = "(static)"; then
LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic"
fi
@@ -1114,7 +1145,7 @@ fi
echo "
Mail Directory: $system_mail_dir, $system_mail_perm
- LDAP support: $msg_ldap
+ LDAP support: $msg_ldap $msg_ldap_linktype
NNTP support: $msg_nntp
Pilot conduits: $msg_pilot
Kerberos 4/5: $msg_krb4/$msg_krb5