]> granicus.if.org Git - php/commitdiff
Make this build using new build system
authorWez Furlong <wez@php.net>
Thu, 4 Dec 2003 15:32:31 +0000 (15:32 +0000)
committerWez Furlong <wez@php.net>
Thu, 4 Dec 2003 15:32:31 +0000 (15:32 +0000)
ext/pgsql/config.w32 [new file with mode: 0644]

diff --git a/ext/pgsql/config.w32 b/ext/pgsql/config.w32
new file mode 100644 (file)
index 0000000..624533d
--- /dev/null
@@ -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");
+               }
+       }
+}