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