summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/config.w32
blob: 3c74c9bf004aafc2625286ff498e38483d1a97e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// $Id$
// vim:ft=javascript

ARG_WITH("pdo-pgsql", "PostgreSQL support for PDO", "no");

if (PHP_PDO_PGSQL != "no") {
	if (CHECK_LIB("libpq.lib", "pdo_pgsql", PHP_PDO_PGSQL) &&
			CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
		EXTENSION("pdo_pgsql", "pdo_pgsql.c pgsql_driver.c pgsql_statement.c");

		if (CHECK_HEADER_ADD_INCLUDE("pg_config.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
			ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PG_CONFIG_H");
		}

		ADD_FLAG('CFLAGS_PDO_PGSQL', "/I ..\\pecl");
		AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library');
		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");
	} else {
		WARNING("pdo_pgsql not enabled; libraries and headers not found");
	}
	ADD_EXTENSION_DEP('pdo_pgsql', 'pdo');
}