1// $Id$ 2// vim:ft=javascript 3 4ARG_WITH("pdo-pgsql", "PostgreSQL support for PDO", "no"); 5 6if (PHP_PDO_PGSQL != "no") { 7 if (CHECK_LIB("libpq.lib", "pdo_pgsql", PHP_PDO_PGSQL) && 8 CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql;" + PHP_PHP_BUILD + "\\include\\libpq;")) { 9 EXTENSION("pdo_pgsql", "pdo_pgsql.c pgsql_driver.c pgsql_statement.c"); 10 11 if (CHECK_HEADER_ADD_INCLUDE("pg_config.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) { 12 ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PG_CONFIG_H"); 13 } 14 if (X64) { 15 ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PG_LO64=1"); 16 } 17 18 AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library'); 19 20 ADD_EXTENSION_DEP('pdo_pgsql', 'pdo'); 21 } else { 22 WARNING("pdo_pgsql not enabled; libraries and headers not found"); 23 } 24} 25