Commit b7c85ff8 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5567] --with-pgsql,--with-mysql are now more robust

parent 722abaec
...@@ -637,6 +637,10 @@ AC_ARG_WITH([benchmark], ...@@ -637,6 +637,10 @@ AC_ARG_WITH([benchmark],
# sets variables CRYPTO_* # sets variables CRYPTO_*
AX_CRYPTO AX_CRYPTO
# List of directories, where tools like mysql_config or pgsql_config will be
# searched for
defaultdirs="/usr /usr/local /usr/pkg /opt /opt/local"
# Check for MySql. The path to the mysql_config program is given with # Check for MySql. The path to the mysql_config program is given with
# the --with-mysql-config (default to /usr/bin/mysql-config). By default, # the --with-mysql-config (default to /usr/bin/mysql-config). By default,
# the software is not built with MySQL support enabled. # the software is not built with MySQL support enabled.
...@@ -655,7 +659,13 @@ if test "${deprec_msg}" = "yes" ; then ...@@ -655,7 +659,13 @@ if test "${deprec_msg}" = "yes" ; then
fi fi
if test "${mysql_config}" = "yes" ; then if test "${mysql_config}" = "yes" ; then
MYSQL_CONFIG="/usr/bin/mysql_config" for d in $defaultdirs
do
if test -f $d/bin/mysql_config; then
MYSQL_CONFIG="$d/bin/mysql_config"
break
fi
done
elif test "${mysql_config}" != "no" ; then elif test "${mysql_config}" != "no" ; then
MYSQL_CONFIG="${withval}" MYSQL_CONFIG="${withval}"
fi fi
...@@ -717,7 +727,13 @@ if test "${deprec_msg}" = "yes" ; then ...@@ -717,7 +727,13 @@ if test "${deprec_msg}" = "yes" ; then
fi fi
if test "${pg_config}" = "yes" ; then if test "${pg_config}" = "yes" ; then
PG_CONFIG="/usr/bin/pg_config" for d in $defaultdirs
do
if test -f $d/bin/pg_config; then
PG_CONFIG="$d/bin/pg_config"
break
fi
done
elif test "${pg_config}" != "no" ; then elif test "${pg_config}" != "no" ; then
PG_CONFIG="${withval}" PG_CONFIG="${withval}"
fi fi
...@@ -832,8 +848,7 @@ elif test "${log4cplus_path}" != "yes" ; then ...@@ -832,8 +848,7 @@ elif test "${log4cplus_path}" != "yes" ; then
LOG4CPLUS_LIBS="-L${log4cplus_path}/lib" LOG4CPLUS_LIBS="-L${log4cplus_path}/lib"
else else
# If not specified, try some common paths. # If not specified, try some common paths.
log4cplusdirs="/usr /usr/local /usr/pkg /opt /opt/local" for d in $defaultdirs
for d in $log4cplusdirs
do do
if test -f $d/include/log4cplus/logger.h; then if test -f $d/include/log4cplus/logger.h; then
LOG4CPLUS_INCLUDES="-I$d/include" LOG4CPLUS_INCLUDES="-I$d/include"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment