summaryrefslogtreecommitdiff
path: root/ext/pgsql/config.w32
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pgsql/config.w32')
-rw-r--r--ext/pgsql/config.w3219
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/pgsql/config.w32 b/ext/pgsql/config.w32
new file mode 100644
index 0000000000..624533d152
--- /dev/null
+++ b/ext/pgsql/config.w32
@@ -0,0 +1,19 @@
+// $Id$
+// vim:ft=javascript
+
+ARG_WITH("pgsql", "PostgreSQL support", "no");
+
+if (PHP_PGSQL != "no") {
+ if (!PHP_PGSQL_SHARED) {
+ ERROR("Cannot build pgsql as a static extension until someone fixes its bogus PHPAPI usage\r\nuse --with-pgsql=shared instead.");
+ } else {
+ if (CHECK_LIB("libpq.lib", "pgsql", PHP_PGSQL) &&
+ CHECK_HEADER_ADD_INCLUDE("postgres.h", "CFLAGS_PGSQL", PHP_PHP_BUILD + "\\include\\pgsql;" + PHP_PHP_BUILD + "\\postgresql\\src\\include;" + PHP_PGSQL)) {
+ EXTENSION("pgsql", "pgsql.c");
+ AC_DEFINE('HAVE_PGSQL', 1, 'Have PostgreSQL library');
+ ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D HAVE_PQESCAPE /D HAVE_PG_CONFIG_H");
+ } else {
+ WARNING("pgsql not enabled; libraries and headers not found");
+ }
+ }
+}