]> granicus.if.org Git - php/commitdiff
Windows configure fixes, a few additional lib names allowed, apache2 only on for...
authorElizabeth Marie Smith <auroraeosrose@php.net>
Wed, 14 May 2008 03:13:17 +0000 (03:13 +0000)
committerElizabeth Marie Smith <auroraeosrose@php.net>
Wed, 14 May 2008 03:13:17 +0000 (03:13 +0000)
ext/ereg/config.w32
ext/libxml/config.w32
ext/mysqlnd/config.w32
ext/zlib/config.w32
sapi/apache2filter/config.w32
sapi/apache2handler/config.w32
sapi/isapi/config.w32
win32/build/confutils.js

index 9a25368df089a81e42d3b4371b490325812f63fb..59cdb046859190bbbea85626a4bfd23877207099 100644 (file)
@@ -1,7 +1,11 @@
 // $Id$
 // vim:ft=javascript
 
-EXTENSION("ereg", "ereg.c", false /* never shared */, "-Dregexec=php_regexec -Dregerror=php_regerror -Dregfree=php_regfree -Dregcomp=php_regcomp -Iext/ereg/regex");
-ADD_SOURCES("ext/ereg/regex", "regcomp.c regexec.c regerror.c regfree.c", "ereg");
-AC_DEFINE('REGEX', 1, 'Bundled regex');
-AC_DEFINE('HSREGEX', 1, 'Bundled regex');
+ARG_WITH("ereg", "POSIX extended regular expressions", "yes");
+if (PHP_EREG != "no") {
+
+       EXTENSION("ereg", "ereg.c", false /* never shared */, "-Dregexec=php_regexec -Dregerror=php_regerror -Dregfree=php_regfree -Dregcomp=php_regcomp -Iext/ereg/regex");
+       ADD_SOURCES("ext/ereg/regex", "regcomp.c regexec.c regerror.c regfree.c", "ereg");
+       AC_DEFINE('REGEX', 1, 'Bundled regex');
+       AC_DEFINE('HSREGEX', 1, 'Bundled regex');
+}
\ No newline at end of file
index 08a06af1f1ef78a8f30c73e732484d77f2f4731a..bfac5c839a354745e0cf5ed678e611c61f5fa227 100644 (file)
@@ -5,7 +5,7 @@ ARG_WITH("libxml", "LibXML support", "yes");
 
 if (PHP_LIBXML == "yes") {
        if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
-                       CHECK_LIB("iconv_a.lib;iconv.lib", "libxml") &&
+                       CHECK_LIB("libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib", "libxml") &&
                        CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS")) {
 
                EXTENSION("libxml", "libxml.c", false /* never shared */);
index a49a918b7f5c15001ce08d4aa64af33640ed536a..d495672cf710f2316f7d84f9e7f43f6d55c998bf 100644 (file)
@@ -1,21 +1,25 @@
 // $Id$
 // vim:ft=javascript
 
-if (CHECK_LIB("ws2_32.lib", "mysqlnd")) {
-       mysqlnd_source = 
-               "mysqlnd.c " +
-               "mysqlnd_block_alloc.c " +
-               "mysqlnd_charset.c " +
-               "mysqlnd_debug.c " +
-               "mysqlnd_loaddata.c " +
-               "mysqlnd_palloc.c " +
-               "mysqlnd_ps.c " +
-               "mysqlnd_ps_codec.c " +
-               "mysqlnd_qcache.c " +
-               "mysqlnd_result.c " +
-               "mysqlnd_result_meta.c " +
-               "mysqlnd_statistics.c " +
-               "mysqlnd_wireprotocol.c " +
-               "php_mysqlnd.c";
-       EXTENSION("mysqlnd", mysqlnd_source, false);
-}
+ARG_WITH("mysqlnd", "Mysql Native Client Driver", "yes");
+if (PHP_MYSQLND != "no") {
+
+       if (CHECK_LIB("ws2_32.lib", "mysqlnd")) {
+               mysqlnd_source = 
+                       "mysqlnd.c " +
+                       "mysqlnd_block_alloc.c " +
+                       "mysqlnd_charset.c " +
+                       "mysqlnd_debug.c " +
+                       "mysqlnd_loaddata.c " +
+                       "mysqlnd_palloc.c " +
+                       "mysqlnd_ps.c " +
+                       "mysqlnd_ps_codec.c " +
+                       "mysqlnd_qcache.c " +
+                       "mysqlnd_result.c " +
+                       "mysqlnd_result_meta.c " +
+                       "mysqlnd_statistics.c " +
+                       "mysqlnd_wireprotocol.c " +
+                       "php_mysqlnd.c";
+               EXTENSION("mysqlnd", mysqlnd_source, false);
+       }
+}
\ No newline at end of file
index 3639276c8c1f2d0ad17fc0f5c4d0189c5f99f09c..d5981a99ce478d6a72c08efa7514936c3357d421 100644 (file)
@@ -6,7 +6,7 @@ ARG_ENABLE("zlib", "ZLIB support", "yes");
 if (PHP_ZLIB == "yes") {
        EXTENSION("zlib", "zlib.c zlib_fopen_wrapper.c zlib_filter.c", null, "/D ZLIB_EXPORTS");
        AC_DEFINE("HAVE_ZLIB", 1, "ZLIB support");
-       CHECK_LIB("zlib.lib", "zlib", PHP_ZLIB);
+       CHECK_LIB("zlib_a.lib;zlib.lib", "zlib", PHP_ZLIB);
        CHECK_HEADER_ADD_INCLUDE("zlib.h", "CFLAGS", "..\\zlib;" + php_usual_include_suspects);
        if (!PHP_ZLIB_SHARED) {
                ADD_DEF_FILE("ext\\zlib\\php_zlib.def");
index 9b26f9ef3f0577c9da5ff433c2bf866fb482ba67..361d03107420e531a72b8d40752dac1429f294aa 100755 (executable)
@@ -4,7 +4,9 @@
 ARG_ENABLE('apache2filter', 'Build Apache 2.x filter', 'no');
 
 if (PHP_APACHE2FILTER != "no") {
-       if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2FILTER", PHP_PHP_BUILD + "\\include\\apache2") &&
+       if (PHP_ZTS == "no") {
+               WARNING("Apache2 module requires an --enable-zts build of PHP on windows");
+       } else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2FILTER", PHP_PHP_BUILD + "\\include\\apache2") &&
                        CHECK_LIB("libhttpd.lib", "apache2filter", PHP_PHP_BUILD + "\\lib\\apache2") &&
                        CHECK_LIB("libapr.lib", "apache2filter", PHP_PHP_BUILD + "\\lib\\apache2") &&
                        CHECK_LIB("libaprutil.lib", "apache2filter", PHP_PHP_BUILD + "\\lib\\apache2")
@@ -20,7 +22,9 @@ if (PHP_APACHE2FILTER != "no") {
 ARG_ENABLE('apache2-2filter', 'Build Apache 2.2.x filter', 'no');
 
 if (PHP_APACHE2_2FILTER != "no") {
-       if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_2FILTER", PHP_PHP_BUILD + "\\include\\apache2_2") &&
+       if (PHP_ZTS == "no") {
+               WARNING("Apache2 module requires an --enable-zts build of PHP on windows");
+       } else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_2FILTER", PHP_PHP_BUILD + "\\include\\apache2_2") &&
                        CHECK_LIB("libhttpd.lib", "apache2_2filter", PHP_PHP_BUILD + "\\lib\\apache2_2") &&
                        CHECK_LIB("libapr-1.lib", "apache2_2filter", PHP_PHP_BUILD + "\\lib\\apache2_2") &&
                        CHECK_LIB("libaprutil-1.lib", "apache2_2filter", PHP_PHP_BUILD + "\\lib\\apache2_2")
index b9a27a196d0dda19743f73d9703124aca580abe0..2f2084cb1425d85c81086a24a116b6ef4f4c6b64 100644 (file)
@@ -4,7 +4,9 @@
 ARG_ENABLE('apache2handler', 'Build Apache 2.x handler', 'no');
 
 if (PHP_APACHE2HANDLER != "no") {
-       if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2HANDLER", PHP_PHP_BUILD + "\\include\\apache2") &&
+       if (PHP_ZTS == "no") {
+               WARNING("Apache2 module requires an --enable-zts build of PHP on windows");
+       } else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2HANDLER", PHP_PHP_BUILD + "\\include\\apache2") &&
                        CHECK_LIB("libhttpd.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2") &&
                        CHECK_LIB("libapr.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2") &&
                        CHECK_LIB("libaprutil.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2")
@@ -20,7 +22,9 @@ if (PHP_APACHE2HANDLER != "no") {
 ARG_ENABLE('apache2-2handler', 'Build Apache 2.2.x handler', 'no');
 
 if (PHP_APACHE2_2HANDLER != "no") {
-       if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_2HANDLER", PHP_PHP_BUILD + "\\include\\apache2_2") &&
+       if (PHP_ZTS == "no") {
+               WARNING("Apache2 module requires an --enable-zts build of PHP on windows");
+       } else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_2HANDLER", PHP_PHP_BUILD + "\\include\\apache2_2") &&
                        CHECK_LIB("libhttpd.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2") &&
                        CHECK_LIB("libapr-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2") &&
                        CHECK_LIB("libaprutil-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2")
index 13d0e016eb76cd5196b9c12b7d2e1d4c02214fb2..8012352744240e4a1bef6bb20cc721a397366623 100644 (file)
@@ -5,9 +5,9 @@ ARG_ENABLE('isapi', 'Build ISAPI version of PHP', 'no');
 
 if (PHP_ISAPI == "yes") {
        if (PHP_ZTS == "no") {
-               ERROR("ISAPI module requires an --enable-zts build of PHP");
+               WARNING("ISAPI module requires an --enable-zts build of PHP");
+       } else {
+               SAPI('isapi', 'php5isapi.c', 'php' + PHP_VERSION + 'isapi.dll', '/D PHP5ISAPI_EXPORTS');
+               ADD_FLAG('LDFLAGS_ISAPI', '/DEF:sapi\\isapi\\php5isapi.def');
        }
-
-       SAPI('isapi', 'php5isapi.c', 'php' + PHP_VERSION + 'isapi.dll', '/D PHP5ISAPI_EXPORTS');
-       ADD_FLAG('LDFLAGS_ISAPI', '/DEF:sapi\\isapi\\php5isapi.def');
 }
index b47bc66aca1440d3c7a4892e10ff69a11ab679c0..c9f236fa9080d7370c504f7036ec79ce90ec7f6d 100644 (file)
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.60.2.1.2.8.2.10 2008-04-14 17:55:02 sfox Exp $
+// $Id: confutils.js,v 1.60.2.1.2.8.2.11 2008-05-14 03:13:17 auroraeosrose Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -586,6 +586,17 @@ function CHECK_LIB(libnames, target, path_to_check, common_name)
        // libnames can be ; separated list of accepted library names
        libnames = libnames.split(';');
 
+       // for debug builds, lib may have _debug appended, we want that first
+       if (PHP_DEBUG == "yes") {
+               var length = libnames.length;
+               for (var i = 0; i < length; i++) {
+                       var name = new String(libnames[i]);
+                       rExp = /.lib$/i;
+                       name = name.replace(rExp,"_debug.lib");
+                       libnames.unshift(name);
+               }
+       }
+
        var i, j, k, libname;
        var location = false;
        var path = path_to_check.split(';');