summaryrefslogtreecommitdiff
path: root/win32/build/confutils.js
diff options
context:
space:
mode:
Diffstat (limited to 'win32/build/confutils.js')
-rw-r--r--win32/build/confutils.js23
1 files changed, 14 insertions, 9 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index bf88cdae44..19fbd52aa9 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -95,10 +95,10 @@ if (typeof(CWD) == "undefined") {
if (!MODE_PHPIZE) {
/* defaults; we pick up the precise versions from configure.ac */
var PHP_VERSION = 8;
- var PHP_MINOR_VERSION = 0;
+ var PHP_MINOR_VERSION = 1;
var PHP_RELEASE_VERSION = 0;
var PHP_EXTRA_VERSION = "";
- var PHP_VERSION_STRING = "8.0.0";
+ var PHP_VERSION_STRING = "8.1.0";
}
/* Get version numbers and DEFINE as a string */
@@ -1544,7 +1544,6 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
var _tmp = FSO.CreateTextFile(PHP_DIR + "/include/main/config.pickle.h", true);
_tmp.Close();
}
- cflags = "/FI main/config.pickle.h " + cflags;
}
ADD_FLAG("CFLAGS_" + EXT, cflags);
@@ -2209,7 +2208,7 @@ function generate_config_pickle_h()
var ln = outfile.ReadLine();
for (var i in keys) {
- var reg = new RegExp("#define[\s ]+" + keys[i] + "[\s ]*.*", "g");
+ var reg = new RegExp("#define[\s ]+" + keys[i] + "[\s ]*.*|#undef[\s ]+" + keys[i], "g");
if (ln.match(reg)) {
found = true;
@@ -2235,6 +2234,7 @@ function generate_config_pickle_h()
continue;
}*/
+ lines.push("#undef " + keys[i]);
lines.push("#define " + keys[i] + " " + item[0]);
}
@@ -2311,6 +2311,11 @@ function generate_config_h()
outfile.WriteLine("#define " + keys[i] + " " + pieces);
}
+ outfile.WriteBlankLines(1);
+ outfile.WriteLine("#if __has_include(\"main/config.pickle.h\")");
+ outfile.WriteLine("#include \"main/config.pickle.h\"");
+ outfile.WriteLine("#endif");
+
outfile.Close();
}
@@ -2939,25 +2944,25 @@ function toolset_setup_compiler()
WARNING("Using unknown MSVC version " + tmp);
- AC_DEFINE('COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
+ AC_DEFINE('PHP_BUILD_COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
DEFINE("PHP_COMPILER_SHORT", tmp);
AC_DEFINE('PHP_COMPILER_ID', tmp, "Compiler compatibility ID");
} else {
- AC_DEFINE('COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
+ AC_DEFINE('PHP_BUILD_COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
DEFINE("PHP_COMPILER_SHORT", COMPILER_NAME_SHORT.toLowerCase());
AC_DEFINE('PHP_COMPILER_ID', COMPILER_NAME_SHORT.toUpperCase(), "Compiler compatibility ID");
}
} else if (CLANG_TOOLSET) {
CLANGVERS = COMPILER_NUMERIC_VERSION;
- AC_DEFINE('COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
+ AC_DEFINE('PHP_BUILD_COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
DEFINE("PHP_COMPILER_SHORT", "clang");
AC_DEFINE('PHP_COMPILER_ID', "clang"); /* XXX something better were to write here */
} else if (ICC_TOOLSET) {
INTELVERS = COMPILER_NUMERIC_VERSION;
- AC_DEFINE('COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
+ AC_DEFINE('PHP_BUILD_COMPILER', COMPILER_NAME_LONG, "Detected compiler version");
DEFINE("PHP_COMPILER_SHORT", "icc");
AC_DEFINE('PHP_COMPILER_ID', "icc"); /* XXX something better were to write here */
}
@@ -3157,7 +3162,7 @@ function toolset_setup_arch()
} else {
STDOUT.WriteLine(" Detected 32-bit compiler");
}
- AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture");
+ AC_DEFINE('PHP_BUILD_ARCH', X64 ? 'x64' : 'x86', "Detected compiler architecture");
DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86');
}