mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
@ 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:
parent
0cd40c2808
commit
00779e5fa3
1 changed files with 35 additions and 16 deletions
|
@ -17,21 +17,37 @@ AC_DEFUN(MYSQL_LIB_CHK,[
|
||||||
done
|
done
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN(PHP_MYSQL_SOCK,[
|
PHP_ARG_WITH(mysql-sock, Location of the MySQL Socket pointer,
|
||||||
AC_MSG_CHECKING(for MySQL UNIX socket)
|
[ --with-mysql-sock[=DIR] Optionally reference the pointer to the MySQL Socket.
|
||||||
MYSQL_SOCK=/tmp/mysql.sock
|
If unspecified, it will search default locations for the socket.], no)
|
||||||
for i in \
|
|
||||||
/var/run/mysqld/mysqld.sock \
|
if test "$PHP_MYSQL_SOCK" != "no"; then
|
||||||
/var/tmp/mysql.sock \
|
AC_MSG_CHECKING($PHP_MYSQL_SOCK)
|
||||||
/var/run/mysql/mysql.sock \
|
MYSQL_SOCK=$PHP_MYSQL_SOCK
|
||||||
/var/lib/mysql/mysql.sock \
|
AC_MSG_CHECKING(for specified MySQL UNIX socket)
|
||||||
/var/mysql/mysql.sock \
|
AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
|
||||||
/Private/tmp/mysql.sock \
|
AC_MSG_RESULT($MYSQL_SOCK)
|
||||||
; do
|
fi
|
||||||
if test -r $i; then
|
|
||||||
MYSQL_SOCK=$i
|
AC_DEFUN(PHP_MYSQL_SOCK,[
|
||||||
fi
|
AC_MSG_CHECKING(for MySQL UNIX socket)
|
||||||
done
|
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_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
|
||||||
AC_MSG_RESULT($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 unspecified, the bundled MySQL library will be used.], yes)
|
||||||
|
|
||||||
if test "$PHP_MYSQL" != "no"; then
|
if test "$PHP_MYSQL" != "no"; then
|
||||||
|
$PHP_MYSQL_SOCK
|
||||||
|
if test "$PHP_MYSQL_SOCK" = "no"; then
|
||||||
PHP_MYSQL_SOCK
|
PHP_MYSQL_SOCK
|
||||||
|
fi
|
||||||
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
|
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue