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 15 AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library'); 16 17 ADD_EXTENSION_DEP('pdo_pgsql', 'pdo'); 18 } else { 19 WARNING("pdo_pgsql not enabled; libraries and headers not found"); 20 } 21} 22