Skip to content

Commit 8d169e4

Browse files
author
Gwynne Raskind
committed
socket location needs to be checked before mysqlnd in order for --with-mysql-sock to work with mysqlnd
1 parent 21a6e1f commit 8d169e4

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

ext/mysql/config.m4

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,24 @@ if test -z "$PHP_ZLIB_DIR"; then
5353
[ --with-zlib-dir[=DIR] MySQL: Set the path to libz install prefix], no, no)
5454
fi
5555

56+
AC_MSG_CHECKING([for MySQL UNIX socket location])
57+
if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
58+
MYSQL_SOCK=$PHP_MYSQL_SOCK
59+
AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
60+
AC_MSG_RESULT([$MYSQL_SOCK])
61+
elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
62+
PHP_MYSQL_SOCKET_SEARCH
63+
else
64+
AC_MSG_RESULT([no])
65+
fi
66+
67+
5668
if test "$PHP_MYSQL" = "mysqlnd"; then
5769
dnl enables build of mysqnd library
5870
PHP_MYSQLND_ENABLED=yes
5971

6072
elif test "$PHP_MYSQL" != "no"; then
6173

62-
AC_MSG_CHECKING([for MySQL UNIX socket location])
63-
if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
64-
MYSQL_SOCK=$PHP_MYSQL_SOCK
65-
AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
66-
AC_MSG_RESULT([$MYSQL_SOCK])
67-
elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
68-
PHP_MYSQL_SOCKET_SEARCH
69-
else
70-
AC_MSG_RESULT([no])
71-
fi
72-
7374
MYSQL_DIR=
7475
MYSQL_INC_DIR=
7576

0 commit comments

Comments
 (0)