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

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