sfox Mon Jul 7 01:23:56 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/win32/build config.w32 confutils.js Log: - Fix up some bits and pieces. - Always report re2c version. - Head towards making it possible for all platforms to have compiler info in phpinfo() output. - Make it possible to switch off configure summary (--without-summary). http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.40.2.8.2.10.2.20&r2=1.40.2.8.2.10.2.21&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.20 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.20 Sun Jul 6 09:55:44 2008 +++ php-src/win32/build/config.w32 Mon Jul 7 01:23:56 2008 @@ -1,5 +1,5 @@ // vim:ft=javascript -// $Id: config.w32,v 1.40.2.8.2.10.2.20 2008/07/06 09:55:44 pajoye Exp $ +// $Id: config.w32,v 1.40.2.8.2.10.2.21 2008/07/07 01:23:56 sfox Exp $ // "Master" config file; think of it as a configure.in // equivalent. @@ -8,7 +8,7 @@ if (!CL) { ERROR("MS C++ compiler is required"); } -// Which version of the compiler do we have ? + function probe_binary(EXE, what) { // tricky escapes to get stderr redirection to work @@ -30,24 +30,26 @@ 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)'; + // Which version of the compiler do we have? -VCVERS = probe_binary(CL); -VCVERS = VCVERS.substr(0, 2) + VCVERS.substr(3, 2); -STDOUT.WriteLine("Detected MS compiler version " + VCVERS); - -// 1200 is VC6 -// 1300 is vs.net 2002 -// 1310 is vs.net 2003 -// 1400 is vs.net 2005 -// 1500 is vs.net 2008 +VCVERS = probe_binary(CL).substr(0, 5).replace('.', ''); +STDOUT.WriteLine(" Detected compiler " + VC_VERSIONS[VCVERS]); +AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version"); // do we use x64 or 80x86 version of compiler? X64 = probe_binary(CL, 64); if (X64) { - STDOUT.WriteLine("Detected 64-bit compiler"); + STDOUT.WriteLine(" Detected 64-bit compiler"); } else { - STDOUT.WriteLine("Detected 32-bit compiler"); + STDOUT.WriteLine(" Detected 32-bit compiler"); } +AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture"); // cygwin now ships with link.exe. Avoid searching the cygwin path // for this, as we want the MS linker, not the fileutil @@ -64,28 +66,19 @@ // There's a minimum requirement for re2c.. MINRE2C = "0.13.4"; -function probe_re2c_version(RE2C) -{ - var command = "cmd /c " + RE2C + " -v"; - var version = execute(command + '" 2>&1"'); - - if (version.match(/((\d+)\.(\d+)\.(\d+))/)) { - return RegExp.$1; - } - return 0; -} - RE2C = PATH_PROG('re2c'); if (RE2C) { var intvers, intmin; var pattern = /\./g; - RE2CVERS = probe_re2c_version(RE2C); + RE2CVERS = probe_binary(RE2C, "version"); + STDOUT.WriteLine(' Detected re2c version ' + RE2CVERS); + intvers = RE2CVERS.replace(pattern, '') - 0; intmin = MINRE2C.replace(pattern, '') - 0; if (intvers < intmin) { - STDOUT.WriteLine('WARNING: The minimum RE2C version requirement is ' + MINRE2C + ', ' + RE2CVERS + ' detected'); + STDOUT.WriteLine('WARNING: The minimum RE2C version requirement is ' + MINRE2C); STDOUT.WriteLine('Parsers will not be generated. Upgrade your copy at http://sf.net/projects/re2c'); DEFINE('RE2C', ''); } else { @@ -101,7 +94,9 @@ PATH_PROG('mc', WshShell.Environment("Process").Item("PATH")); // Try locating manifest tool -PATH_PROG('mt', WshShell.Environment("Process").Item("PATH")); +if (VCVERS > 1200) { + PATH_PROG('mt', WshShell.Environment("Process").Item("PATH")); +} // stick objects somewhere outside of the source tree ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', ''); @@ -389,3 +384,5 @@ } DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE); + +ARG_WITH('summary', 'Skip configuration summary', 'yes'); http://cvs.php.net/viewvc.cgi/php-src/win32/build/confutils.js?r1=1.60.2.1.2.8.2.19&r2=1.60.2.1.2.8.2.20&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.19 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.19 Sat Jul 5 19:53:04 2008 +++ php-src/win32/build/confutils.js Mon Jul 7 01:23:56 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.60.2.1.2.8.2.19 2008/07/05 19:53:04 pajoye Exp $ +// $Id: confutils.js,v 1.60.2.1.2.8.2.20 2008/07/07 01:23:56 sfox Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -30,13 +30,6 @@ var extensions_enabled = new Array(); var sapi_enabled = new Array(); -var VC_VERSIONS = new Array(); -VC_VERSIONS[1200] = 'VC6'; -VC_VERSIONS[1300] = 'Visual C++ 2002'; -VC_VERSIONS[1310] = 'Visual C++ 2003'; -VC_VERSIONS[1400] = 'Visual C++ 2005'; -VC_VERSIONS[1500] = 'Visual C++ 2008'; - if (PROGRAM_FILES == null) { PROGRAM_FILES = "C:\\Program Files"; } @@ -446,7 +439,7 @@ nicefile.WriteLine(nice + " %*"); nicefile.Close(); - AC_DEFINE('CONFIGURE_COMMAND', nice); + AC_DEFINE('CONFIGURE_COMMAND', nice, "Configure line"); } function DEFINE(name, value) @@ -1311,6 +1304,7 @@ STDOUT.WriteLine("Invalid header argument, can't output the table " + l + " " + ar_out[0].length ); return; } + for (j=0; j < l; j++) { var tmax, tmin; @@ -1407,7 +1401,7 @@ if (!FSO.FolderExists(dir)) { FSO.CreateFolder(dir); } - + for (i = 0; i < build_dirs.length; i++) { bd = FSO.BuildPath(dir, build_dirs[i]); if (bd == last) { @@ -1419,7 +1413,7 @@ FSO.CreateFolder(bd); } } - + STDOUT.WriteLine("Generating files..."); generate_makefile(); generate_internal_functions(); @@ -1427,7 +1421,9 @@ STDOUT.WriteLine("Done."); STDOUT.WriteBlankLines(1); - write_summary(); + if (PHP_SUMMARY != "no") { + write_summary(); + } if (PHP_SNAPSHOT_BUILD != "no") { STDOUT.WriteLine("Type 'nmake snap' to build a PHP snapshot");
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php