pajoye          Mon Jul  7 13:32:56 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/win32/build        config.w32 confutils.js 
  Log:
  - move common functions to confutils
  - rename the summary option to reflect its usage (Enable Sumamry, yes)
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.40.2.8.2.10.2.21&r2=1.40.2.8.2.10.2.22&diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.40.2.8.2.10.2.21 
php-src/win32/build/config.w32:1.40.2.8.2.10.2.22
--- php-src/win32/build/config.w32:1.40.2.8.2.10.2.21   Mon Jul  7 01:23:56 2008
+++ php-src/win32/build/config.w32      Mon Jul  7 13:32:55 2008
@@ -1,5 +1,5 @@
 // vim:ft=javascript
-// $Id: config.w32,v 1.40.2.8.2.10.2.21 2008/07/07 01:23:56 sfox Exp $
+// $Id: config.w32,v 1.40.2.8.2.10.2.22 2008/07/07 13:32:55 pajoye Exp $
 // "Master" config file; think of it as a configure.in
 // equivalent.
 
@@ -9,34 +9,12 @@
        ERROR("MS C++ compiler is required");
 }
 
-function probe_binary(EXE, what)
-{
-       // tricky escapes to get stderr redirection to work
-       var command = 'cmd /c ""' + EXE;
-       if (what == "version") {
-               command = command + '" -v"';
-       }
-       var version = execute(command + '" 2>&1"');
-
-       if (what == "64") {
-               if (version.match(/x64/)) {
-                       return 1;
-               }
-       } else {
-               if (version.match(/(\d+\.\d+(\.\d+)?(\.\d+)?)/)) {
-                       return RegExp.$1;
-               }
-       }
-       return 0;
-}
-
-var VC_VERSIONS = new Array();
-VC_VERSIONS[1200] = 'MSVC6 (Visual C++ 6.0)';
-VC_VERSIONS[1300] = 'MSVC7 (Visual C++ 2002)';
-VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)';
-VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
-VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
-
+/* For the record here: */
+// 1200 is VC6
+// 1300 is vs.net 2002
+// 1310 is vs.net 2003
+// 1400 is vs.net 2005
+// 1500 is vs.net 2008
 // Which version of the compiler do we have?
 VCVERS = probe_binary(CL).substr(0, 5).replace('.', '');
 STDOUT.WriteLine("  Detected compiler " + VC_VERSIONS[VCVERS]);
@@ -385,4 +363,4 @@
 
 DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE);
 
-ARG_WITH('summary', 'Skip configuration summary', 'yes');
+ARG_WITH('summary', 'Enable configuration summary', 'yes');
http://cvs.php.net/viewvc.cgi/php-src/win32/build/confutils.js?r1=1.60.2.1.2.8.2.20&r2=1.60.2.1.2.8.2.21&diff_format=u
Index: php-src/win32/build/confutils.js
diff -u php-src/win32/build/confutils.js:1.60.2.1.2.8.2.20 
php-src/win32/build/confutils.js:1.60.2.1.2.8.2.21
--- php-src/win32/build/confutils.js:1.60.2.1.2.8.2.20  Mon Jul  7 01:23:56 2008
+++ php-src/win32/build/confutils.js    Mon Jul  7 13:32:55 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.60.2.1.2.8.2.20 2008/07/07 01:23:56 sfox Exp $
+// $Id: confutils.js,v 1.60.2.1.2.8.2.21 2008/07/07 13:32:55 pajoye Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -27,9 +27,20 @@
 var SYSTEM_DRIVE = WshShell.Environment("Process").Item("SystemDrive");
 var PROGRAM_FILES = WshShell.Environment("Process").Item("ProgramFiles");
 
+/* Store the enabled extensions (summary + QA check) */
 var extensions_enabled = new Array();
+
+/* Store the SAPI enabled (summary + QA check) */
 var sapi_enabled = new Array();
 
+/* Mapping CL version > human readable name */
+var VC_VERSIONS = new Array();
+VC_VERSIONS[1200] = 'MSVC6 (Visual C++ 6.0)';
+VC_VERSIONS[1300] = 'MSVC7 (Visual C++ 2002)';
+VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)';
+VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
+VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
+
 if (PROGRAM_FILES == null) {
        PROGRAM_FILES = "C:\\Program Files";
 }
@@ -101,6 +112,27 @@
        return ret;
 }
 
+function probe_binary(EXE, what)
+{
+       // tricky escapes to get stderr redirection to work
+       var command = 'cmd /c ""' + EXE;
+       if (what == "version") {
+               command = command + '" -v"';
+       }
+       var version = execute(command + '" 2>&1"');
+
+       if (what == "64") {
+               if (version.match(/x64/)) {
+                       return 1;
+               }
+       } else {
+               if (version.match(/(\d+\.\d+(\.\d+)?(\.\d+)?)/)) {
+                       return RegExp.$1;
+               }
+       }
+       return 0;
+}
+
 function condense_path(path)
 {
        path = FSO.GetAbsolutePathName(path);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to