-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/pgsql: Use PKG_CHECK_MODULES to detect the pq library #4235
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
Conversation
Looks okay to me, as a formality, let's see if tests pass ... build is unaffected whatever ... |
Merged as 1e26517 Thanks |
Sorry bug this one break RHEL / CentOS build which don't have libpq.pc and the pg_config way is fine and reliable (as, IIUC, the big clean is mostly to avoid tricky directory / file tests) |
Reverted, thanks @remicollet |
thanks @krakjoe |
@krakjoe, @remicollet, That doesn't sound right at all. |
@remicollet, thanks for sharing that link. Given the age of packages on CentOS 7, reverting is fair, although we could easily add |
IMHO, pg_config should stay the preferred way, as still list first in upstream documentation; btw I agree on cleaning the file search hack. |
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 phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
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" Passing manual, non-standard installation paths can be done with option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql Follow-up of phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library) This also removes the unused HAVE_LIBPQ symbol
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" Passing manual, non-standard installation paths can be done with option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql This also removes the unused HAVE_LIBPQ symbol and passing the PGSQL_INCLUDE environment variable to configure in favor of PGSQL_CFLAGS and PGSQL_LIBS. Follow-up of phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
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" Passing manual, non-standard installation paths can be done with option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql This also removes the unused HAVE_LIBPQ symbol and passing the PGSQL_INCLUDE environment variable to configure in favor of PGSQL_CFLAGS and PGSQL_LIBS. Follow-up of phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
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" Passing manual, non-standard installation paths can be done with option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql This also removes the unused HAVE_LIBPQ symbol and passing the PGSQL_INCLUDE environment variable to configure in favor of PGSQL_CFLAGS and PGSQL_LIBS. Follow-up of phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
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" Passing manual, non-standard PostgreSQL installation path can be done with configure option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql If this DIR argument (PostgreSQL installation directory or path to the pg_config) is passed, it takes precedence over the pkg-config, when installed on the system. This also removes the unused HAVE_LIBPQ symbol and passing the PGSQL_INCLUDE environment variable to configure in favor of PGSQL_CFLAGS and PGSQL_LIBS. Instead of the obsolete backticks the recommended $(...) is used when invoking the pg_config. Follow-up of phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
The pkg-config (libpq.pc file) was added in PostgreSQL 9.3. This adds a common setup M4 macro PHP_SETUP_PGSQL to find client PostgreSQL library libpq on the system with pkg-config. If not found, check falls back to pg_config to find the libpq and its headers in common locations as before. The PGSQL_CFLAGS and PGSQL_LIBS environment variables can override the libpq installation paths: ./configure --with-pgsql --with-pdo-pgsql \ PGSQL_CFLAGS=-I/path/to/libpq \ PGSQL_LIBS="-L/path/to/libpq -lpq" Passing manual, non-standard PostgreSQL installation path can be done with configure option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql If this DIR argument (PostgreSQL installation directory or path to the pg_config) is passed, it takes precedence over the pkg-config, when installed on the system. This also removes the unused HAVE_LIBPQ symbol and passing the PGSQL_INCLUDE and PGSQL_LIBDIR environment variable to configure in favor of PGSQL_CFLAGS and PGSQL_LIBS. Instead of the obsolete backticks the recommended $(...) is used when invoking the pg_config. Follow-up of phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
The pkg-config (libpq.pc file) was added in PostgreSQL 9.3. This adds a common setup M4 macro PHP_SETUP_PGSQL to find client PostgreSQL library libpq on the system with pkg-config. If not found, check falls back to pg_config to find the libpq and its headers in common locations as before. The PGSQL_CFLAGS and PGSQL_LIBS environment variables can override the libpq installation paths: ./configure --with-pgsql --with-pdo-pgsql \ PGSQL_CFLAGS=-I/path/to/libpq \ PGSQL_LIBS="-L/path/to/libpq -lpq" Passing manual, non-standard PostgreSQL installation path can be done with configure option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql If this DIR argument (PostgreSQL installation directory or path to the pg_config) is passed, it takes precedence over the pkg-config, when installed on the system. This also removes the unused HAVE_LIBPQ symbol and passing the PGSQL_INCLUDE and PGSQL_LIBDIR environment variable to configure in favor of PGSQL_CFLAGS and PGSQL_LIBS. Instead of the obsolete backticks the recommended $(...) is used when invoking the pg_config. Follow-up of phpGH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
The pkg-config (libpq.pc file) was added in PostgreSQL 9.3. This adds a common setup M4 macro PHP_SETUP_PGSQL to find client PostgreSQL library libpq on the system with pkg-config. If not found, check falls back to pg_config to find the libpq and its headers in common locations as before. The PGSQL_CFLAGS and PGSQL_LIBS environment variables can override the libpq installation paths: ./configure --with-pgsql --with-pdo-pgsql \ PGSQL_CFLAGS=-I/path/to/libpq \ PGSQL_LIBS="-L/path/to/libpq -lpq" Passing manual, non-standard PostgreSQL installation path can be done with configure option arguments: ./configure \ --with-pgsql=/any/path/to/postgresql \ --with-pdo-postgresql=/any/path/to/postgresql If this DIR argument (PostgreSQL installation directory or path to the pg_config) is passed, it takes precedence over the pkg-config, when installed on the system. This also removes the unused HAVE_LIBPQ symbol and passing the PGSQL_INCLUDE and PGSQL_LIBDIR environment variable to configure in favor of PGSQL_CFLAGS and PGSQL_LIBS. Instead of the obsolete backticks the recommended $(...) is used when invoking the pg_config. Follow-up of GH-4235 (Use PKG_CHECK_MODULES to detect the pq library)
ext/pdo_pgsql can be updatd in the same way.