// "Master" config file; think of it as a configure.in
// equivalent.
-ARG_WITH("toolset", "Toolset to use for the compilation, supported: vs, clang", "vs");
+ARG_WITH("toolset", "Toolset to use for the compilation, supported: vs, clang, intel", "vs");
if ("clang" == PHP_TOOLSET) {
VS_TOOLSET = false;
CLANG_TOOLSET = true;
INTEL_TOOLSET = false;
+} else if ("intel" == PHP_TOOLSET) {
+ VS_TOOLSET = false;
+ CLANG_TOOLSET = false;
+ INTEL_TOOLSET = true;
} else {
/* Visual Studio is the default toolset. */
PHP_TOOLSET = "no" == PHP_TOOLSET ? "vs" : PHP_TOOLSET;
AC_DEFINE('PHP_COMPILER_ID', "clang"); /* XXX something better were to write here */
} else if (INTEL_TOOLSET) {
- //INTELVERS = compiler_ver;
- // ....
+ INTELVERS = COMPILER_NUMERIC_VERSION;
+
+ AC_DEFINE('COMPILER', COMPILER_NAME, "Detected compiler version");
+ DEFINE("PHP_COMPILER_SHORT", "icc");
+ AC_DEFINE('PHP_COMPILER_ID', "icc"); /* XXX something better were to write here */
}
STDOUT.WriteLine(" Detected compiler " + COMPILER_NAME);
if (VS_TOOLSET && VCVERS <= 1300) {
ADD_SOURCES("win32", "strtoi64.c");
}
-if (VS_TOOLSET && VCVERS >= 1400) {
+if (VS_TOOLSET && VCVERS >= 1400 || INTEL_TOOLSET) {
AC_DEFINE('HAVE_STRNLEN', 1);
}
var command = 'cmd /c ""' + PHP_CL + '" -v"';
var full = execute(command + '" 2>&1"');
- if (full.match(/Version (\d\.\d\.\d)/)) {
+ if (full.match(/Version (\d+\.\d+\.\d+)/)) {
version = RegExp.$1;
version = version.replace(/\./g, '');
version = version/100 < 1 ? version*10 : version;
}
}
- ERROR("Wrong toolset");
+ ERROR("Failed to parse compiler out for compiler version");
}
function toolset_get_compiler_name()
var vs_cl = PATH_PROG('cl', null, 'PHP_CL')
return probe_binary(vs_cl, 64);
} else if (INTEL_TOOLSET) {
-
+ /*seems the easiest way as well for now */
+ var vs_cl = PATH_PROG('cl', null, 'PHP_CL')
+ return probe_binary(vs_cl, 64);
}
ERROR("Wrong toolset");