mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Don't assume libmysqlclient library name
By simply dropping the additional checks, in line with the general guideline of trusting the output of config scripts (this should be migrated to pkg-config though). Also drop the code for manually adding -z if mysql_config does not -- that's not our problem.
This commit is contained in:
parent
2875d0f920
commit
34dd032e4e
2 changed files with 7 additions and 50 deletions
|
@ -58,7 +58,6 @@ if test "$PHP_PDO_MYSQL" != "no"; then
|
|||
if test "x$SED" = "x"; then
|
||||
AC_PATH_PROG(SED, sed)
|
||||
fi
|
||||
PDO_MYSQL_LIBNAME=mysqlclient
|
||||
PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"`
|
||||
PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"`
|
||||
elif test -n "$PDO_MYSQL_DIR"; then
|
||||
|
@ -89,34 +88,8 @@ if test "$PHP_PDO_MYSQL" != "no"; then
|
|||
AC_MSG_ERROR([Unable to find your mysql installation])
|
||||
fi
|
||||
|
||||
PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_commit,
|
||||
[
|
||||
PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE)
|
||||
PHP_EVAL_LIBLINE($PDO_MYSQL_LIBS, PDO_MYSQL_SHARED_LIBADD)
|
||||
],[
|
||||
if test "$PHP_ZLIB_DIR" != "no"; then
|
||||
PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, PDO_MYSQL_SHARED_LIBADD)
|
||||
PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_commit, [], [
|
||||
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
|
||||
])
|
||||
PDO_MYSQL_LIBS="$PDO_MYSQL_LIBS -L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz"
|
||||
else
|
||||
PHP_ADD_LIBRARY(z,, PDO_MYSQL_SHARED_LIBADD)
|
||||
PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query, [], [
|
||||
AC_MSG_ERROR([Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.])
|
||||
], [
|
||||
-L$PDO_MYSQL_LIB_DIR
|
||||
])
|
||||
PDO_MYSQL_LIBS="$PDO_MYSQL_LIBS -lz"
|
||||
fi
|
||||
|
||||
PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE)
|
||||
PHP_EVAL_LIBLINE($PDO_MYSQL_LIBS, PDO_MYSQL_SHARED_LIBADD)
|
||||
],[
|
||||
$PDO_MYSQL_LIBS
|
||||
])
|
||||
PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE)
|
||||
PHP_EVAL_LIBLINE($PDO_MYSQL_LIBS, PDO_MYSQL_SHARED_LIBADD)
|
||||
fi
|
||||
|
||||
PHP_CHECK_PDO_INCLUDES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue