Skip to content

Autotools: Fix pdo_mysql build with mysql client library #15450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

petk
Copy link
Member

@petk petk commented Aug 16, 2024

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.

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.
@petk
Copy link
Member Author

petk commented Aug 16, 2024

And if I'm not mistaken probably also this should be integrated in possible future PHP version somehow if the library is used instead of mysqlnd: https://github.com/mariadb-corporation/mariadb-connector-c
It seems that MariaDB has its own mariadb_config for client library. 🤔

@petk petk merged commit 5ed1659 into php:master Aug 31, 2024
10 checks passed
@petk petk deleted the patch-pdo-mysql branch August 31, 2024 00:35
Ayesh pushed a commit to Ayesh/php-src that referenced this pull request Aug 31, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants