diff options
Diffstat (limited to 'ext/mysql/config.m4')
| -rw-r--r-- | ext/mysql/config.m4 | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/ext/mysql/config.m4 b/ext/mysql/config.m4 index 5870be02e1..f5ed71c6c5 100644 --- a/ext/mysql/config.m4 +++ b/ext/mysql/config.m4 @@ -40,7 +40,8 @@ AC_DEFUN([PHP_MYSQL_SOCKET_SEARCH], [ PHP_ARG_WITH(mysql, for MySQL support, -[ --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base directory]) +[ --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base directory. + If mysqlnd is passed as DIR, the MySQL native driver will be used]) PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket, [ --with-mysql-sock[=DIR] MySQL: Location of the MySQL unix socket pointer. @@ -51,9 +52,11 @@ if test -z "$PHP_ZLIB_DIR"; then [ --with-zlib-dir[=DIR] MySQL: Set the path to libz install prefix], no, no) fi +if test "$PHP_MYSQL" = "mysqlnd"; then + dnl enables build of mysqnd library + PHP_MYSQLND_ENABLED=yes -if test "$PHP_MYSQL" != "no"; then - AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL]) +elif test "$PHP_MYSQL" != "no"; then AC_MSG_CHECKING([for MySQL UNIX socket location]) if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then @@ -137,14 +140,22 @@ Note that the MySQL client library is not bundled anymore!]) PHP_ADD_LIBRARY_WITH_PATH($MYSQL_LIBNAME, $MYSQL_LIB_DIR, MYSQL_SHARED_LIBADD) PHP_ADD_INCLUDE($MYSQL_INC_DIR) - PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared) - MYSQL_MODULE_TYPE=external MYSQL_LIBS="-L$MYSQL_LIB_DIR -l$MYSQL_LIBNAME $MYSQL_LIBS" MYSQL_INCLUDE=-I$MYSQL_INC_DIR - PHP_SUBST(MYSQL_SHARED_LIBADD) PHP_SUBST_OLD(MYSQL_MODULE_TYPE) PHP_SUBST_OLD(MYSQL_LIBS) PHP_SUBST_OLD(MYSQL_INCLUDE) fi + +dnl Enable extension +if test "$PHP_MYSQL" != "no"; then + AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL]) + PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared) + PHP_SUBST(MYSQL_SHARED_LIBADD) + + if test "$PHP_MYSQLI" = "mysqlnd"; then + PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd) + fi +fi |
