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

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