version 1.1.1.1, 2012/02/21 23:47:59
|
version 1.1.1.2, 2012/05/29 12:34:41
|
Line 4 dnl vim: se ts=2 sw=2 et:
|
Line 4 dnl vim: se ts=2 sw=2 et:
|
|
|
PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO, |
PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO, |
[ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory |
[ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory |
If mysqlnd is passed as DIR, the MySQL native | If no value or mysqlnd is passed as DIR, the |
native driver will be used [/usr/local]]) | MySQL native driver will be used]) |
|
|
if test -z "$PHP_ZLIB_DIR"; then |
if test -z "$PHP_ZLIB_DIR"; then |
PHP_ARG_WITH(zlib-dir, for the location of libz, |
PHP_ARG_WITH(zlib-dir, for the location of libz, |
Line 28 if test "$PHP_PDO_MYSQL" != "no"; then
|
Line 28 if test "$PHP_PDO_MYSQL" != "no"; then
|
done |
done |
]) |
]) |
|
|
if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then | if test "$PHP_PDO_MYSQL" != "yes" && test "$PHP_PDO_MYSQL" != "mysqlnd"; then |
PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL | if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then |
elif test "$PHP_PDO_MYSQL" != "yes"; then | PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL |
if test -d "$PHP_PDO_MYSQL" ; then | else |
if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then | if test -d "$PHP_PDO_MYSQL" ; then |
PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config" | if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then |
else | PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config" |
PDO_MYSQL_DIR="$PHP_PDO_MYSQL" | else |
| PDO_MYSQL_DIR="$PHP_PDO_MYSQL" |
| fi |
fi |
fi |
fi |
fi |
else |
|
for i in /usr/local /usr ; do |
|
if test -x "$i/bin/mysql_config" ; then |
|
PDO_MYSQL_CONFIG="$i/bin/mysql_config" |
|
break; |
|
fi |
|
if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then |
|
PDO_MYSQL_DIR="$i" |
|
break; |
|
fi |
|
done |
|
fi |
fi |
| |
if test "$PHP_PDO_MYSQL" = "mysqlnd"; then | if test "$PHP_PDO_MYSQL" = "yes" || test "$PHP_PDO_MYSQL" = "mysqlnd"; then |
dnl enables build of mysqnd library |
dnl enables build of mysqnd library |
PHP_MYSQLND_ENABLED=yes |
PHP_MYSQLND_ENABLED=yes |
AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd]) |
AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd]) |
Line 100 if test "$PHP_PDO_MYSQL" != "no"; then
|
Line 91 if test "$PHP_PDO_MYSQL" != "no"; then
|
AC_MSG_ERROR([Unable to find your mysql installation]) |
AC_MSG_ERROR([Unable to find your mysql installation]) |
fi |
fi |
|
|
PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query, | PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_commit, |
[ |
[ |
PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE) |
PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE) |
PHP_EVAL_LIBLINE($PDO_MYSQL_LIBS, PDO_MYSQL_SHARED_LIBADD) |
PHP_EVAL_LIBLINE($PDO_MYSQL_LIBS, PDO_MYSQL_SHARED_LIBADD) |
],[ |
],[ |
if test "$PHP_ZLIB_DIR" != "no"; then |
if test "$PHP_ZLIB_DIR" != "no"; then |
PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, PDO_MYSQL_SHARED_LIBADD) |
PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, PDO_MYSQL_SHARED_LIBADD) |
PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query, [], [ | PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_commit, [], [ |
AC_MSG_ERROR([PDO_MYSQL configure failed. Please check config.log for more information.]) | AC_MSG_ERROR([PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information.]) |
], [ |
], [ |
-L$PHP_ZLIB_DIR/$PHP_LIBDIR -L$PDO_MYSQL_LIB_DIR |
-L$PHP_ZLIB_DIR/$PHP_LIBDIR -L$PDO_MYSQL_LIB_DIR |
]) |
]) |
Line 128 if test "$PHP_PDO_MYSQL" != "no"; then
|
Line 119 if test "$PHP_PDO_MYSQL" != "no"; then
|
],[ |
],[ |
$PDO_MYSQL_LIBS |
$PDO_MYSQL_LIBS |
]) |
]) |
|
|
_SAVE_LIBS=$LIBS |
|
LIBS="$LIBS $PDO_MYSQL_LIBS" |
|
AC_CHECK_FUNCS([mysql_commit mysql_stmt_prepare mysql_next_result mysql_sqlstate]) |
|
LIBS=$_SAVE_LIBS |
|
fi |
fi |
|
|
ifdef([PHP_CHECK_PDO_INCLUDES], |
ifdef([PHP_CHECK_PDO_INCLUDES], |
Line 141 if test "$PHP_PDO_MYSQL" != "no"; then
|
Line 127 if test "$PHP_PDO_MYSQL" != "no"; then
|
],[ |
],[ |
AC_MSG_CHECKING([for PDO includes]) |
AC_MSG_CHECKING([for PDO includes]) |
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then |
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then |
pdo_inc_path=$abs_srcdir/ext | pdo_cv_inc_path=$abs_srcdir/ext |
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then |
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then |
pdo_inc_path=$abs_srcdir/ext | pdo_cv_inc_path=$abs_srcdir/ext |
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then |
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then |
pdo_inc_path=$prefix/include/php/ext | pdo_cv_inc_path=$prefix/include/php/ext |
else |
else |
AC_MSG_ERROR([Cannot find php_pdo_driver.h.]) |
AC_MSG_ERROR([Cannot find php_pdo_driver.h.]) |
fi |
fi |
AC_MSG_RESULT($pdo_inc_path) | AC_MSG_RESULT($pdo_cv_inc_path) |
]) |
]) |
|
|
if test -n "$PDO_MYSQL_CONFIG"; then |
if test -n "$PDO_MYSQL_CONFIG"; then |
Line 158 if test "$PHP_PDO_MYSQL" != "no"; then
|
Line 144 if test "$PHP_PDO_MYSQL" != "no"; then
|
fi |
fi |
|
|
dnl fix after renaming to pdo_mysql |
dnl fix after renaming to pdo_mysql |
PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_inc_path -I) | PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_cv_inc_path -I) |
ifdef([PHP_ADD_EXTENSION_DEP], |
ifdef([PHP_ADD_EXTENSION_DEP], |
[ |
[ |
PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo) |
PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo) |