mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
PQresultMemorySize is available since libpq 12. On Windows libpq 16.2 is used at time of writing: https://github.com/winlibs/postgresql
17 lines
786 B
JavaScript
17 lines
786 B
JavaScript
// vim:ft=javascript
|
|
|
|
ARG_WITH("pgsql", "PostgreSQL support", "no");
|
|
|
|
if (PHP_PGSQL != "no") {
|
|
if (CHECK_LIB("libpq.lib", "pgsql", PHP_PGSQL) &&
|
|
CHECK_HEADER("libpq-fe.h", "CFLAGS_PGSQL", PHP_PGSQL + "\\include;" + PHP_PHP_BUILD + "\\include\\pgsql;" + PHP_PHP_BUILD + "\\include\\libpq;" + PHP_PGSQL)) {
|
|
EXTENSION("pgsql", "pgsql.c", PHP_PGSQL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
|
AC_DEFINE('HAVE_PG_RESULT_MEMORY_SIZE', 1, "Define to 1 if libpq has the 'PQresultMemorySize' function (PostgreSQL 12 or later).");
|
|
AC_DEFINE('HAVE_PGSQL', 1, "Define to 1 if the PHP extension 'pgsql' is available.");
|
|
ADD_FLAG("CFLAGS_PGSQL", "/D PGSQL_EXPORTS");
|
|
ADD_EXTENSION_DEP('pgsql', 'pcre');
|
|
} else {
|
|
WARNING("pgsql not enabled; libraries and headers not found");
|
|
}
|
|
}
|