2018-02-15 13:31:19 +00:00
|
|
|
diff --git a/contrib/dlz/config.dlz.in b/contrib/dlz/config.dlz.in
|
|
|
|
index 5d65a85..2677b26 100644
|
|
|
|
--- a/contrib/dlz/config.dlz.in
|
|
|
|
+++ b/contrib/dlz/config.dlz.in
|
2007-07-23 14:27:48 +00:00
|
|
|
@@ -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:
|
|
|
|
#
|
2018-02-15 13:31:19 +00:00
|
|
|
@@ -152,23 +159,11 @@ then
|
2008-07-11 10:16:21 +00:00
|
|
|
then
|
2018-02-15 13:31:19 +00:00
|
|
|
use_dlz_mysql=$d
|
|
|
|
mysql_include=$d/include/mysql
|
|
|
|
- if test -d $d/lib/mysql
|
|
|
|
- then
|
2008-07-11 10:16:21 +00:00
|
|
|
- mysql_lib=$d/lib/mysql
|
2018-02-15 13:31:19 +00:00
|
|
|
- else
|
|
|
|
- mysql_lib=$d/lib
|
|
|
|
- fi
|
|
|
|
break
|
|
|
|
elif test -f $d/include/mysql.h
|
|
|
|
then
|
|
|
|
use_dlz_mysql=$d
|
|
|
|
mysql_include=$d/include
|
|
|
|
- if test -d $d/lib/mysql
|
|
|
|
- then
|
|
|
|
- mysql_lib=$d/lib/mysql
|
|
|
|
- else
|
|
|
|
- mysql_lib=$d/lib
|
|
|
|
- fi
|
|
|
|
break
|
2008-07-11 10:16:21 +00:00
|
|
|
fi
|
2018-02-15 13:31:19 +00:00
|
|
|
done
|
|
|
|
@@ -179,21 +174,9 @@ then
|
|
|
|
if test -f $d/include/mysql/mysql.h
|
|
|
|
then
|
|
|
|
mysql_include=$d/include/mysql
|
|
|
|
- if test -d $d/lib/mysql
|
|
|
|
- then
|
|
|
|
- mysql_lib=$d/lib/mysql
|
|
|
|
- else
|
|
|
|
- mysql_lib=$d/lib
|
|
|
|
- fi
|
|
|
|
elif test -f $d/include/mysql.h
|
|
|
|
then
|
|
|
|
mysql_include=$d/include
|
|
|
|
- if test -d $d/lib/mysql
|
|
|
|
- then
|
|
|
|
- mysql_lib=$d/lib/mysql
|
|
|
|
- else
|
|
|
|
- mysql_lib=$d/lib
|
|
|
|
- fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
@@ -217,6 +200,12 @@ case "$use_dlz_mysql" in
|
|
|
|
[using mysql with libs ${mysql_lib} and includes ${mysql_include}])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
+ if test -d $use_dlz_mysql/${target_lib}/mysql
|
|
|
|
+ then
|
|
|
|
+ mysql_lib=$use_dlz_mysql/${target_lib}/mysql
|
|
|
|
+ else
|
|
|
|
+ mysql_lib=$use_dlz_mysql/${target_lib}
|
|
|
|
+ fi
|
|
|
|
DLZ_ADD_DRIVER(MYSQL, dlz_mysql_driver,
|
|
|
|
[-I${mysql_include}],
|
|
|
|
[-L${mysql_lib} -lmysqlclient -lz -lcrypt -lm])
|
|
|
|
@@ -310,9 +299,9 @@ case "$use_dlz_bdb" in
|
2012-04-24 12:59:30 +00:00
|
|
|
then
|
2014-10-02 12:14:01 +00:00
|
|
|
break
|
2012-04-24 12:59:30 +00:00
|
|
|
fi
|
2014-10-02 12:14:01 +00:00
|
|
|
- elif test -f "$dd/lib/lib${d}.so"
|
|
|
|
+ elif test -f "$dd/${target_lib}/lib${d}.so"
|
|
|
|
then
|
|
|
|
- dlz_bdb_libs="-L${dd}/lib -l${d}"
|
|
|
|
+ dlz_bdb_libs="-L${dd}/${target_lib} -l${d}"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2018-02-15 13:31:19 +00:00
|
|
|
@@ -414,7 +403,7 @@ case "$use_dlz_ldap" in
|
2007-07-23 14:27:48 +00:00
|
|
|
*)
|
|
|
|
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(
|
2008-07-11 10:16:21 +00:00
|
|
|
[using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include])
|
2018-02-15 13:31:19 +00:00
|
|
|
@@ -450,11 +439,11 @@ then
|
2014-10-02 12:14:01 +00:00
|
|
|
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
|
|
|
|
dlz_odbc_include="-I$use_dlz_odbc/include"
|
|
|
|
- dlz_odbc_libs="-L$use_dlz_odbc/lib -lodbc"
|
|
|
|
+ dlz_odbc_libs="-L$use_dlz_odbc/${target_lib} -lodbc"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|