Adam Tkac e93ead
diff -up bind-9.5.0a5/contrib/dlz/config.dlz.in.64bit bind-9.5.0a5/contrib/dlz/config.dlz.in
Adam Tkac e93ead
--- bind-9.5.0a5/contrib/dlz/config.dlz.in.64bit	2006-06-07 04:21:50.000000000 +0200
Adam Tkac e93ead
+++ bind-9.5.0a5/contrib/dlz/config.dlz.in	2007-07-23 11:18:54.000000000 +0200
Adam Tkac e93ead
@@ -17,6 +17,13 @@
Adam Tkac e93ead
 #
Adam Tkac e93ead
 dlzdir='${DLZ_DRIVER_DIR}'
Adam Tkac e93ead
 
Adam Tkac e93ead
+AC_MSG_CHECKING([for target libdir])
Adam Tkac e93ead
+AC_RUN_IFELSE([int main(void) {exit((sizeof(void *) == 8) ? 0 : 1);}],
Adam Tkac e93ead
+	[target_lib=lib64],
Adam Tkac e93ead
+	[target_lib=lib],
Adam Tkac e93ead
+)
Adam Tkac e93ead
+AC_MSG_RESULT(["$target_lib"])
Adam Tkac e93ead
+
Adam Tkac e93ead
 #
Adam Tkac e93ead
 # Private autoconf macro to simplify configuring drivers:
Adam Tkac e93ead
 #
Adam Tkac e93ead
@@ -83,7 +90,7 @@ then
Adam Tkac e93ead
 		if test -f $d/include/libpq-fe.h
Adam Tkac e93ead
 		then
Adam Tkac e93ead
 			use_dlz_postgres=$d/include
Adam Tkac e93ead
-			use_dlz_postgres_lib=$d/lib
Adam Tkac e93ead
+			use_dlz_postgres_lib=$d/${target_lib}
Adam Tkac e93ead
 			break
Adam Tkac e93ead
 		fi
Adam Tkac e93ead
 	done
Adam Tkac e93ead
@@ -151,10 +158,10 @@ case "$use_dlz_mysql" in
Adam Tkac e93ead
 	*)
Adam Tkac e93ead
 		DLZ_ADD_DRIVER(MYSQL, dlz_mysql_driver,
Adam Tkac e93ead
 				[-I$use_dlz_mysql/include/mysql],
Adam Tkac e93ead
-				[-L$use_dlz_mysql/lib/mysql -lmysqlclient -lz -lcrypt -lm])
Adam Tkac e93ead
+				[-L$use_dlz_mysql/${target_lib}/mysql -lmysqlclient -lz -lcrypt -lm])
Adam Tkac e93ead
 
Adam Tkac e93ead
 		AC_MSG_RESULT(
Adam Tkac e93ead
-[using mysql from $use_dlz_mysql/lib/mysql and $use_dlz_mysql/include/mysql])
Adam Tkac e93ead
+[using mysql from $use_dlz_mysql/${target_lib}/mysql and $use_dlz_mysql/include/mysql])
Adam Tkac e93ead
 		;;
Adam Tkac e93ead
 esac
Adam Tkac e93ead
 
Adam Tkac e93ead
@@ -232,11 +239,11 @@ case "$use_dlz_bdb" in
Adam Tkac e93ead
 			bdb_libnames="db42 db-4.2 db41 db-4.1 db"
Adam Tkac e93ead
 			for d in $bdb_libnames
Adam Tkac e93ead
 			do
Adam Tkac e93ead
-				if test -f "$dd/lib/lib${d}.so"
Adam Tkac e93ead
+				if test -f "$dd/${target_lib}/lib${d}.so"
Adam Tkac e93ead
 				then
Adam Tkac e93ead
 					if test "$dd" != "/usr"
Adam Tkac e93ead
 					then
Adam Tkac e93ead
-						dlz_bdb_libs="-L${dd}/lib "
Adam Tkac e93ead
+						dlz_bdb_libs="-L${dd}/${target_lib} "
Adam Tkac e93ead
 					else
Adam Tkac e93ead
 						dlz_bdb_libs=""
Adam Tkac e93ead
 					fi
Adam Tkac e93ead
@@ -341,10 +348,10 @@ case "$use_dlz_ldap" in
Adam Tkac e93ead
 	*)
Adam Tkac e93ead
 		DLZ_ADD_DRIVER(LDAP, dlz_ldap_driver,
Adam Tkac e93ead
 				[-I$use_dlz_ldap/include],
Adam Tkac e93ead
-				[-L$use_dlz_ldap/lib -lldap -llber])
Adam Tkac e93ead
+				[-L$use_dlz_ldap/${target_lib} -lldap -llber])
Adam Tkac e93ead
 
Adam Tkac e93ead
 		AC_MSG_RESULT(
Adam Tkac e93ead
-[using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include])
Adam Tkac e93ead
+[using LDAP from $use_dlz_ldap/${target_lib} and $use_dlz_ldap/include])
Adam Tkac e93ead
 		;;
Adam Tkac e93ead
 esac
Adam Tkac e93ead
 
Adam Tkac e93ead
@@ -365,7 +372,7 @@ then
Adam Tkac e93ead
 	odbcdirs="/usr /usr/local /usr/pkg"
Adam Tkac e93ead
 	for d in $odbcdirs
Adam Tkac e93ead
 	do
Adam Tkac e93ead
-		if test -f $d/include/sql.h -a -f $d/lib/libodbc.a
Adam Tkac e93ead
+		if test -f $d/include/sql.h -a -f $d/${target_lib}/libodbc.a
Adam Tkac e93ead
 		then
Adam Tkac e93ead
 			use_dlz_odbc=$d
Adam Tkac e93ead
 			break
Adam Tkac e93ead
@@ -385,7 +392,7 @@ case "$use_dlz_odbc" in
Adam Tkac e93ead
 	*)
Adam Tkac e93ead
 		DLZ_ADD_DRIVER(ODBC, dlz_odbc_driver,
Adam Tkac e93ead
 				[-I$use_dlz_odbc/include],
Adam Tkac e93ead
-				[-L$use_dlz_odbc/lib -lodbc])
Adam Tkac e93ead
+				[-L$use_dlz_odbc/${target_lib} -lodbc])
Adam Tkac e93ead
 
Adam Tkac e93ead
 		AC_MSG_RESULT([using ODBC from $use_dlz_odbc])
Adam Tkac e93ead
 		;;