xref: /PHP-5.3/ext/pdo_pgsql/config.w32 (revision b8910c99)
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		AC_DEFINE('HAVE_PQESCAPE_BYTEA_CONN',	1, 'Have PQescapeByteaConn');
17		AC_DEFINE('HAVE_PQESCAPE_CONN',		1, 'Have PQescapeConn');
18		AC_DEFINE('HAVE_PQPREPARE', 		1, 'Have PQprepare');
19		ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PQPARAMETERSTATUS=1 /D HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1 /D HAVE_PQESCAPE_CONN=1 /D HAVE_PQESCAPE_BYTEA_CONN=1");
20		ADD_EXTENSION_DEP('pdo_pgsql', 'pdo');
21	} else {
22		WARNING("pdo_pgsql not enabled; libraries and headers not found");
23	}
24}
25