mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fix shared build and made the logic of finding the socket location better.
This commit is contained in:
parent
728f2de442
commit
df9fc2bb51
@ -33,31 +33,36 @@ AC_DEFUN(PHP_MYSQL_SOCKET_SEARCH, [
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
|
||||
AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
|
||||
AC_MSG_RESULT([$MYSQL_SOCK])
|
||||
|
||||
if test -n "$MYSQL_SOCK"; then
|
||||
AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
|
||||
AC_MSG_RESULT([$MYSQL_SOCK])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
PHP_ARG_WITH(mysql, for MySQL support,
|
||||
[ --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base directory.
|
||||
If unspecified, the bundled MySQL library will be used.], yes)
|
||||
|
||||
PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket,
|
||||
[ --with-mysql-sock[=DIR] Location of the MySQL unix socket pointer.
|
||||
If unspecified, the default locations are searched.])
|
||||
|
||||
PHP_ARG_WITH(mysql, for MySQL support,
|
||||
[ --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base directory.
|
||||
If unspecified, the bundled MySQL library will be used.], yes)
|
||||
|
||||
if test "$PHP_MYSQL" != "no"; then
|
||||
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
|
||||
|
||||
AC_MSG_CHECKING(for MySQL UNIX socket location)
|
||||
if test "$PHP_MYSQL_SOCK" != "no"; then
|
||||
MYSQL_SOCK=$PHP_MYSQL_SOCK
|
||||
AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
|
||||
AC_MSG_RESULT([$MYSQL_SOCK])
|
||||
else
|
||||
if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
|
||||
MYSQL_SOCK=$PHP_MYSQL_SOCK
|
||||
AC_DEFINE_UNQUOTED(MYSQL_UNIX_ADDR, "$MYSQL_SOCK", [ ])
|
||||
AC_MSG_RESULT([$MYSQL_SOCK])
|
||||
elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
|
||||
PHP_MYSQL_SOCKET_SEARCH
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user