Commit def499ab authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Kazuhiko

update m4 files.

parent c825e3d9
......@@ -87,8 +87,7 @@ AC_DEFUN([AX_LIB_MYSQL],
MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
MYSQL_VERSION=`$MYSQL_CONFIG --version`
if test `$MYSQL_CONFIG | /usr/bin/awk '{if ($1 == "--plugindir") print 1}'` == "1"; then
if $MYSQL_CONFIG --plugindir > /dev/null; then
MYSQL_PLUGINDIR=`$MYSQL_CONFIG --plugindir`
fi
......
......@@ -30,22 +30,22 @@ AC_DEFUN([AX_MYSQL_BIN], [
[withmysqladmin="yes"]
)
AC_ARG_WITH(mysqlinclude,
[[ --with-mysqlinclude[=PATH] path to mysql header files.]],
[withmysqlinclude="$withval"],
[withmysqlinclude="yes"]
)
AC_ARG_WITH(mysqltest,
[[ --with-mysqltest[=CMD] command to run mysqltest.]],
[withmysqltest="$withval"],
[withmysqltest="yes"]
)
if test -f /etc/mysql/debian.cnf ; then
MYSQL_ARGS="--defaults-file=/etc/mysql/debian.cnf"
else
MYSQL_ARGS="-p"
fi
if test -z "$withmysqlbin" -o "$withmysqlbin" = "yes"; then
for i in /usr/bin /usr/local/bin ; do
for i in `dirname $(which mysql)` /usr/bin /usr/local/bin ; do
if test -f "$i/mysql" ; then
MYSQL="$i/mysql $MYSQL_ARGS"
MYSQL="$i/mysql"
fi
done
elif test "$withmysqlbin" != "no"; then
......@@ -53,7 +53,16 @@ AC_DEFUN([AX_MYSQL_BIN], [
fi
if test -n "$MYSQL" ; then
MYSQLBIN_PATH = `dirname "$MYSQL"`
MYSQLBIN_PATH=`dirname "$MYSQL"`
if test -f /etc/mysql/debian.cnf ; then
MYSQL_ARGS="--defaults-file=/etc/mysql/debian.cnf"
else
${MYSQL} </dev/null || {
MYSQL_ARGS="-p"
}
MYSQL="${MYSQL} ${MYSQL_ARGS}"
fi
fi
if test -z "$withmysqladmin" -o "$withmysqladmin" = "yes"; then
......@@ -66,8 +75,12 @@ AC_DEFUN([AX_MYSQL_BIN], [
MYSQLADMIN="$withmysqladmin"
fi
if test "$withmysqlinclude" != "no"; then
MYSQL_HEADERS="-I $withmysqlinclude"
fi
if test -z "$withmysqltest" -o "$withmysqltest" = "yes"; then
for i in "$MYSQLBIN_PATH" /usr/bin /usr/local/bin ; do
for i in "$MYSQLBIN_PATH" `dirname $(which mysqltest)` /usr/bin /usr/local/bin ; do
if test -n "$i" -a -f "$i/mysqltest" ; then
MYSQLTEST="$i/mysqltest $MYSQL_ARGS"
fi
......@@ -77,6 +90,7 @@ AC_DEFUN([AX_MYSQL_BIN], [
fi
AC_SUBST(MYSQL)
AC_SUBST(MYSQL_HEADERS)
AC_SUBST(MYSQLADMIN)
AC_SUBST(MYSQLTEST)
])
\ No newline at end of file
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