Skip to content

Commit 5ed1659

Browse files
authored
Autotools: Fix pdo_mysql build with mysql client library (php#15450)
When using --with-pdo-mysql=DIR and for some reason DIR wouldn't have the executable DIR/bin/mysql_config available the 3rd option was so far to guess the mysql client library locations and pass the include directory further. The library directory and library name to link was missing. This fixes this case for consistency reasons. And in the future also the pkg-config could be a reliable alternative to mysql_config in that case. The PDO_MYSQL_INC_DIR is already processed PHP_EVAL_INCLINE so redundant PHP_ADD_INCLUDE is removed.
1 parent 558ccf7 commit 5ed1659

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pdo_mysql/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ if test "$PHP_PDO_MYSQL" != "no"; then
6565
AC_MSG_ERROR([Unable to find your mysql installation])
6666
fi
6767
68-
PHP_ADD_INCLUDE([$PDO_MYSQL_INC_DIR])
6968
PDO_MYSQL_INCLUDE=-I$PDO_MYSQL_INC_DIR
69+
PDO_MYSQL_LIBS="-L$PDO_MYSQL_LIB_DIR -lmysqlclient"
7070
else
7171
AC_MSG_RESULT([not found])
7272
AC_MSG_ERROR([Unable to find your mysql installation])

0 commit comments

Comments
 (0)