[evolution-patches] 64 bit library fixes for the Connector



Attached is a patch for 64-bit builds for the connector's acinclude.m4
that I'm applying to Fedora packages.

It sets multilibsubdir and libsubdir based on the results of 
gcc -print-multi-os-directory

Dave
diff -up ximian-connector-2.0.1-pristine/acinclude.m4 ximian-connector-2.0.1-64bit_fix/acinclude.m4
--- ximian-connector-2.0.1-pristine/acinclude.m4	2004-08-13 14:16:45.000000000 -0400
+++ ximian-connector-2.0.1-64bit_fix/acinclude.m4	2004-09-30 22:24:55.919037667 -0400
@@ -34,6 +34,18 @@ AC_DEFUN([EVO_LDAP_CHECK], [
 	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:=$default}")
+
+	AC_MSG_CHECKING(for multilib subdirectory)
+	if test "$GCC" = "yes" ; then
+		multilibsubdir=`$CC -print-multi-os-directory 2> /dev/null`
+	fi
+	multilibsubdir=${multilibsubdir:-.}
+	AC_MSG_RESULT($multilibsubdir)
+	AC_MSG_CHECKING(for lib subdirectory)
+	libsubdir=`echo lib/${multilibsubdir} | sed -re 's,lib/../([[^/]]*),\1,g'`
+	libsubdir=${libsubdir:-lib}
+	AC_MSG_RESULT($libsubdir)
+
 	case $ac_cv_with_openldap in
 	no|"")
 		with_openldap=no
@@ -44,7 +56,7 @@ AC_DEFUN([EVO_LDAP_CHECK], [
 	*)
 		with_openldap=$ac_cv_with_openldap
 		LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
-		LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
+		LDAP_LDFLAGS="-L$ac_cv_with_openldap/$libsubdir"
 		;;
 	esac
 
@@ -80,20 +92,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/lib/liblber.a $LDAP_LIBS"
+				LDAP_LIBS="$with_openldap/$libsubdir/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 -f $with_openldap/$libsubdir/libldap.la; then
+					LDAP_LIBS="`. $with_openldap/$libsubdir/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/lib/libldap.a $LDAP_LIBS"
+						LDAP_LIBS="$with_openldap/$libsubdir/libldap.a $LDAP_LIBS"
 					else
 						LDAP_LIBS="-lldap $LDAP_LIBS"
 					fi],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]