]> granicus.if.org Git - php/commitdiff
- MFB: sync changes with 5.3...
authorPierre Joye <pajoye@php.net>
Mon, 21 Jul 2008 17:00:34 +0000 (17:00 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 21 Jul 2008 17:00:34 +0000 (17:00 +0000)
win32/build/confutils.js

index 7bc9b144bfb68fba4c542394523f4a02694f6363..6d37b4020e88b227dad88b7f6d8b8ab5c1cd4228 100644 (file)
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.77 2008-07-21 09:56:37 sfox Exp $
+// $Id: confutils.js,v 1.78 2008-07-21 17:00:34 pajoye Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -1123,17 +1123,23 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
                        if (ext_shared) {
                                WARNING(extname + " cannot be built: missing dependency, " + dependson + " not found");
 
-                               var dllname = ' php_' + extname + '.dll';
+                               if (configure_hdr.Exists('HAVE_' + EXT)) {
+                                       configure_hdr.Remove('HAVE_' + EXT);
+                               }
+
+                               dllname = ' php_' + extname + '.dll';
 
                                if (!REMOVE_TARGET(dllname, 'EXT_TARGETS')) {
                                        REMOVE_TARGET(dllname, 'PECL_TARGETS');
                                }
 
+                               extensions_enabled.pop();
                                return false;
-                       }
 
-                       ERROR("Cannot build " + extname + "; " + dependson + " not enabled");
-                       return false;
+                       } else {
+                               ERROR("Cannot build " + extname + "; " + dependson + " not enabled");
+                               return false;
+                       }
                }
        } // dependency is statically built-in to PHP
        return true;
@@ -1325,22 +1331,12 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
 
 function REMOVE_TARGET(dllname, flag)
 {
-       var dllname = dllname.replace(/\s/g, "");
-       var EXT = dllname.replace(/php_(\S+)\.dll/, "$1").toUpperCase();
-       var php_flags = configure_subst.Item("CFLAGS_PHP");
-
        if (configure_subst.Exists(flag)) {
-               var targets = configure_subst.Item(flag);
-
+               targets = configure_subst.Item(flag);
                if (targets.match(dllname)) {
                        configure_subst.Remove(flag);
                        targets = targets.replace(dllname, "");
-                       targets = targets.replace(/\s+/, " ");
-                       targets = targets.replace(/\s$/, "");
                        configure_subst.Add(flag, targets);
-                       configure_hdr.Add("HAVE_" + EXT, new Array(0, ""));
-                       configure_subst.Item("CFLAGS_PHP") = php_flags.replace(" /D COMPILE_DL_" + EXT, "");
-                       extensions_enabled.pop();
                        return true;
                }
        }