[php-src] PR #14540: Add optional pkg-config support for PostgreSQL
| From: | petk | Date: | Tue, 11 Jun 2024 17:02:19 +0000 |
| Subject: | [php-src] PR #14540: Add optional pkg-config support for PostgreSQL | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-26638@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14540
Author: petk
The pkg-config (libpq.pc file) was added in PostgreSQL 9.3. This adds a common setup M4 macro
PHP_SETUP_PGSQL to find libpq on the system with pkg-config. If not found, it falls back to
pg_config to find the libpq library and its headers in common locations as before.
When using pkg-config, the PGSQL_CFLAGS and PGSQL_LIBS environment variables can override the paths
to libpq installation:
./configure --with-pgsql --with-pdo-pgsql \
PGSQL_CFLAGS=-I/path/to/libpq \
PGSQL_LIBS="-L/path/to/libpq -lpq"
Follow-up of GH-4235 (Use PKG_CHECK_MODULES to detect the pq library)