Blame SOURCES/bind-9.5-dlz-64bit.patch

b7523e
diff --git a/contrib/dlz/config.dlz.in b/contrib/dlz/config.dlz.in
b7523e
index 47525af..eefe3c3 100644
b7523e
--- a/contrib/dlz/config.dlz.in
b7523e
+++ b/contrib/dlz/config.dlz.in
b7523e
@@ -17,6 +17,13 @@
b7523e
 #
b7523e
 dlzdir='${DLZ_DRIVER_DIR}'
b7523e
 
b7523e
+AC_MSG_CHECKING([for target libdir])
b7523e
+AC_RUN_IFELSE([int main(void) {exit((sizeof(void *) == 8) ? 0 : 1);}],
b7523e
+	[target_lib=lib64],
b7523e
+	[target_lib=lib],
b7523e
+)
b7523e
+AC_MSG_RESULT(["$target_lib"])
b7523e
+
b7523e
 #
b7523e
 # Private autoconf macro to simplify configuring drivers:
b7523e
 #
b7523e
@@ -292,9 +299,9 @@ case "$use_dlz_bdb" in
b7523e
 					then
b7523e
 						break
b7523e
 					fi
b7523e
-				elif test -f "$dd/lib/lib${d}.so"
b7523e
+				elif test -f "$dd/${target_lib}/lib${d}.so"
b7523e
 				then
b7523e
-					dlz_bdb_libs="-L${dd}/lib -l${d}"
b7523e
+					dlz_bdb_libs="-L${dd}/${target_lib} -l${d}"
b7523e
 					break
b7523e
 				fi
b7523e
 			done
b7523e
@@ -396,7 +403,7 @@ case "$use_dlz_ldap" in
b7523e
 	*)
b7523e
 		DLZ_ADD_DRIVER(LDAP, dlz_ldap_driver,
b7523e
 				[-I$use_dlz_ldap/include],
b7523e
-				[-L$use_dlz_ldap/lib -lldap -llber])
b7523e
+				[-L$use_dlz_ldap/${target_lib} -lldap -llber])
b7523e
 
b7523e
 		AC_MSG_RESULT(
b7523e
 [using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include])
b7523e
@@ -432,11 +439,11 @@ then
b7523e
 		odbcdirs="/usr /usr/local /usr/pkg"
b7523e
 		for d in $odbcdirs
b7523e
 		do
b7523e
-			if test -f $d/include/sql.h -a -f $d/lib/libodbc.a
b7523e
+			if test -f $d/include/sql.h -a -f $d/${target_lib}/libodbc.a
b7523e
 			then
b7523e
 				use_dlz_odbc=$d
b7523e
 				dlz_odbc_include="-I$use_dlz_odbc/include"
b7523e
-				dlz_odbc_libs="-L$use_dlz_odbc/lib -lodbc"
b7523e
+				dlz_odbc_libs="-L$use_dlz_odbc/${target_lib} -lodbc"
b7523e
 				break
b7523e
 			fi
b7523e
 		done