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
- 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;
-}
-
-// 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
+// Which version of the compiler do we have?
+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);
}
DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE);
+
+ARG_ENABLE('summary', 'Enable configuration summary', 'yes');
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.75 2008-07-05 19:52:45 pajoye Exp $
+// $Id: confutils.js,v 1.76 2008-07-07 13:48:23 pajoye Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
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';
+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";
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);
function write_summary()
{
var ar = new Array();
+ if (PHP_SUMMARY == "no") {
+ return;
+ }
STDOUT.WriteBlankLines(2);
generate_config_h();
STDOUT.WriteLine("Done.");
STDOUT.WriteBlankLines(1);
-
write_summary();
if (PHP_SNAPSHOT_BUILD != "no") {
return items;
}
-
// for snapshot builders, this option will attempt to enable everything
// and you can then build everything, ignoring fatal errors within a module
// by running "nmake snap"
// several objects at once, reducing overhead of starting new
// compiler processes.
ARG_ENABLE('one-shot', 'Optimize for fast build - best for release and snapshot builders, not so hot for edit-and-rebuild hacking', 'no');
-
-