| 1 |
diff -up evolution-exchange-2.29.90/m4/evo_ldap_check.m4.fix-64bit-acinclude evolution-exchange-2.29.90/m4/evo_ldap_check.m4
|
| 2 |
--- evolution-exchange-2.29.90/m4/evo_ldap_check.m4.fix-64bit-acinclude 2010-01-12 21:47:55.000000000 +0100
|
| 3 |
+++ evolution-exchange-2.29.90/m4/evo_ldap_check.m4 2010-02-10 12:04:47.000000000 +0100
|
| 4 |
@@ -14,6 +14,18 @@ AC_DEFUN([EVO_LDAP_CHECK],[
|
| 5 |
[AS_HELP_STRING([--with-static-ldap],
|
| 6 |
[Link LDAP support statically into evolution])])
|
| 7 |
AC_CACHE_CHECK([for OpenLDAP], [ac_cv_with_openldap], [ac_cv_with_openldap="${with_openldap:=$default}"])
|
| 8 |
+
|
| 9 |
+ AC_MSG_CHECKING(for multilib subdirectory)
|
| 10 |
+ if test "$GCC" = "yes" ; then
|
| 11 |
+ multilibsubdir=`$CC -print-multi-os-directory 2> /dev/null`
|
| 12 |
+ fi
|
| 13 |
+ multilibsubdir=${multilibsubdir:-.}
|
| 14 |
+ AC_MSG_RESULT($multilibsubdir)
|
| 15 |
+ AC_MSG_CHECKING(for lib subdirectory)
|
| 16 |
+ libsubdir=`echo lib/${multilibsubdir} | sed -re 's,lib/../([[^/]]*),\1,g'`
|
| 17 |
+ libsubdir=${libsubdir:-lib}
|
| 18 |
+ AC_MSG_RESULT($libsubdir)
|
| 19 |
+
|
| 20 |
case $ac_cv_with_openldap in
|
| 21 |
no|"")
|
| 22 |
with_openldap=no
|
| 23 |
@@ -24,7 +36,7 @@ AC_DEFUN([EVO_LDAP_CHECK],[
|
| 24 |
*)
|
| 25 |
with_openldap=$ac_cv_with_openldap
|
| 26 |
LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
|
| 27 |
- LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
|
| 28 |
+ LDAP_LDFLAGS="-L$ac_cv_with_openldap/$libsubdir"
|
| 29 |
;;
|
| 30 |
esac
|
| 31 |
|
| 32 |
@@ -55,25 +67,25 @@ AC_DEFUN([EVO_LDAP_CHECK],[
|
| 33 |
AC_MSG_ERROR([evolution requires OpenLDAP version >= 2])
|
| 34 |
fi
|
| 35 |
|
| 36 |
- AC_CHECK_LIB(resolv, res_query, [LDAP_LIBS="-lresolv"])
|
| 37 |
+ LDAP_LIBS="-lresolv"
|
| 38 |
AC_CHECK_LIB(socket, bind, [LDAP_LIBS="$LDAP_LIBS -lsocket"])
|
| 39 |
AC_CHECK_LIB(nsl, gethostbyaddr, [LDAP_LIBS="$LDAP_LIBS -lnsl"])
|
| 40 |
AC_CHECK_LIB(lber, ber_get_tag, [
|
| 41 |
if test "$with_static_ldap" = "yes"; then
|
| 42 |
- LDAP_LIBS="$with_openldap/lib/liblber.a $LDAP_LIBS"
|
| 43 |
+ LDAP_LIBS="$with_openldap/$libsubdir/liblber.a $LDAP_LIBS"
|
| 44 |
|
| 45 |
# libldap might depend on OpenSSL... We need to pull
|
| 46 |
# in the dependency libs explicitly here since we're
|
| 47 |
# not using libtool for the configure test.
|
| 48 |
- if test -f $with_openldap/lib/libldap.la; then
|
| 49 |
- LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS"
|
| 50 |
+ if test -f $with_openldap/$libsubdir/libldap.la; then
|
| 51 |
+ LDAP_LIBS="`. $with_openldap/$libsubdir/libldap.la; echo $dependency_libs` $LDAP_LIBS"
|
| 52 |
fi
|
| 53 |
else
|
| 54 |
LDAP_LIBS="-llber $LDAP_LIBS"
|
| 55 |
fi
|
| 56 |
AC_CHECK_LIB(ldap, ldap_open, [
|
| 57 |
if test $with_static_ldap = "yes"; then
|
| 58 |
- LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS"
|
| 59 |
+ LDAP_LIBS="$with_openldap/$libsubdir/libldap.a $LDAP_LIBS"
|
| 60 |
else
|
| 61 |
LDAP_LIBS="-lldap $LDAP_LIBS"
|
| 62 |
fi],
|