--- embedaddon/php/ext/mysql/config.m4 2012/02/21 23:47:58 1.1.1.1 +++ embedaddon/php/ext/mysql/config.m4 2013/10/14 08:02:25 1.1.1.4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.1.1.1 2012/02/21 23:47:58 misho Exp $ +dnl $Id: config.m4,v 1.1.1.4 2013/10/14 08:02:25 misho Exp $ dnl AC_DEFUN([MYSQL_LIB_CHK], [ @@ -41,11 +41,11 @@ 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. If mysqlnd is passed as DIR, - the MySQL native driver will be used [/usr/local]]) + directory, if no DIR is passed or the value is + mysqlnd 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/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer. +[ --with-mysql-sock[=SOCKPATH] MySQL/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer. If unspecified, the default locations are searched], no, no) if test -z "$PHP_ZLIB_DIR"; then @@ -53,7 +53,7 @@ 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 +if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then dnl enables build of mysqnd library PHP_MYSQLND_ENABLED=yes @@ -61,17 +61,15 @@ elif test "$PHP_MYSQL" != "no"; then MYSQL_DIR= MYSQL_INC_DIR= - for i in $PHP_MYSQL /usr/local /usr; do - if test -r $i/include/mysql/mysql.h; then - MYSQL_DIR=$i - MYSQL_INC_DIR=$i/include/mysql - break - elif test -r $i/include/mysql.h; then - MYSQL_DIR=$i - MYSQL_INC_DIR=$i/include - break - fi - done + if test -r $PHP_MYSQL/include/mysql/mysql.h; then + MYSQL_DIR=$PHP_MYSQL + MYSQL_INC_DIR=$PHP_MYSQL/include/mysql + break + elif test -r $PHP_MYSQL/include/mysql.h; then + MYSQL_DIR=$PHP_MYSQL + MYSQL_INC_DIR=$PHP_MYSQL/include + break + fi if test -z "$MYSQL_DIR"; then AC_MSG_ERROR([Cannot find MySQL header files under $PHP_MYSQL. @@ -99,6 +97,13 @@ Note that the MySQL client library is not bundled anym done if test -z "$MYSQL_LIB_DIR"; then + MYSQL_LIB_CHK(lib/x86_64-linux-gnu) + fi + if test -z "$MYSQL_LIB_DIR"; then + MYSQL_LIB_CHK(lib/i386-linux-gnu) + fi + + if test -z "$MYSQL_LIB_DIR"; then AC_MSG_ERROR([Cannot find lib$MYSQL_LIBNAME under $MYSQL_DIR. Note that the MySQL client library is not bundled anymore!]) fi @@ -155,7 +160,7 @@ if test "$PHP_MYSQL" != "no"; then PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared) PHP_SUBST(MYSQL_SHARED_LIBADD) - if test "$PHP_MYSQL" = "mysqlnd"; then + if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then PHP_ADD_EXTENSION_DEP(mysql, mysqlnd) AC_DEFINE([MYSQL_USE_MYSQLND], 1, [Whether mysqlnd is enabled]) fi