@ added support for --with-mysql-sock so people can specify it (eg, NFS compiles, etc)

changed the default mysql.sock location to use the one from the RPM. Added /usr/local
  locations to the search list. (imajes)
This commit is contained in:
James Cox 2002-06-08 11:37:20 +00:00
parent 0cd40c2808
commit 00779e5fa3

View file

@ -16,22 +16,38 @@ AC_DEFUN(MYSQL_LIB_CHK,[
fi
done
])
AC_DEFUN(PHP_MYSQL_SOCK,[
AC_MSG_CHECKING(for MySQL UNIX socket)
MYSQL_SOCK=/tmp/mysql.sock
for i in \
/var/run/mysqld/mysqld.sock \
/var/tmp/mysql.sock \
/var/run/mysql/mysql.sock \
/var/lib/mysql/mysql.sock \
/var/mysql/mysql.sock \
/Private/tmp/mysql.sock \
; do
if test -r $i; then
MYSQL_SOCK=$i
fi
done
PHP_ARG_WITH(mysql-sock, Location of the MySQL Socket pointer,
[ --with-mysql-sock[=DIR] Optionally reference the pointer to the MySQL Socket.
If unspecified, it will search default locations for the socket.], no)
if test "$PHP_MYSQL_SOCK" != "no"; then
AC_MSG_CHECKING($PHP_MYSQL_SOCK)
MYSQL_SOCK=$PHP_MYSQL_SOCK
AC_MSG_CHECKING(for specified MySQL UNIX socket)
AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
AC_MSG_RESULT($MYSQL_SOCK)
fi
AC_DEFUN(PHP_MYSQL_SOCK,[
AC_MSG_CHECKING(for MySQL UNIX socket)
for i in \
/var/run/mysqld/mysqld.sock \
/var/tmp/mysql.sock \
/var/run/mysql/mysql.sock \
/var/lib/mysql/mysql.sock \
/var/mysql/mysql.sock \
/usr/local/mysql/var/mysql.sock \
/Private/tmp/mysql.sock \
/tmp/mysql.sock \
; do
if test -r $i; then
MYSQL_SOCK=$i
else
MYSQL_SOCK=/var/lib/mysql/mysql.sock
fi
done
AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
AC_MSG_RESULT($MYSQL_SOCK)
])
@ -41,7 +57,10 @@ PHP_ARG_WITH(mysql, for MySQL support,
If unspecified, the bundled MySQL library will be used.], yes)
if test "$PHP_MYSQL" != "no"; then
$PHP_MYSQL_SOCK
if test "$PHP_MYSQL_SOCK" = "no"; then
PHP_MYSQL_SOCK
fi
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
fi