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

85 lines
2.5 KiB
Diff
Raw Normal View History

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