mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Introduce ZEND_EXTENSION() to the Windows build system
Zend Extensions should now be declared in their config.w32 with a ZEND_EXTENSION() call instead of EXTENSION(), the parameters sent is identical. For a cross version compatible config.w32, the following will do: if (typeof(ZEND_EXTENSION) == 'undefined') { EXTENSION(...); } else { ZEND_EXTENSION(...); }
This commit is contained in:
parent
23cfe1f06f
commit
525ab4198e
2 changed files with 46 additions and 8 deletions
|
@ -10,7 +10,7 @@ if (PHP_OPCACHE != "no") {
|
||||||
AC_DEFINE('HAVE_OPCACHE_FILE_CACHE', 1, 'Define to enable file based caching (experimental)');
|
AC_DEFINE('HAVE_OPCACHE_FILE_CACHE', 1, 'Define to enable file based caching (experimental)');
|
||||||
}
|
}
|
||||||
|
|
||||||
EXTENSION('opcache', "\
|
ZEND_EXTENSION('opcache', "\
|
||||||
ZendAccelerator.c \
|
ZendAccelerator.c \
|
||||||
zend_accelerator_blacklist.c \
|
zend_accelerator_blacklist.c \
|
||||||
zend_accelerator_debug.c \
|
zend_accelerator_debug.c \
|
||||||
|
|
|
@ -1373,6 +1373,13 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
|
||||||
|
|
||||||
var static_pgo_enabled = false;
|
var static_pgo_enabled = false;
|
||||||
|
|
||||||
|
function ZEND_EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
||||||
|
{
|
||||||
|
EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir);
|
||||||
|
|
||||||
|
extensions_enabled[extensions_enabled.length - 1][2] = true;
|
||||||
|
}
|
||||||
|
|
||||||
function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
||||||
{
|
{
|
||||||
var objs = null;
|
var objs = null;
|
||||||
|
@ -1509,7 +1516,8 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
||||||
}
|
}
|
||||||
ADD_FLAG("CFLAGS_" + EXT, cflags);
|
ADD_FLAG("CFLAGS_" + EXT, cflags);
|
||||||
|
|
||||||
extensions_enabled[extensions_enabled.length] = [extname, shared ? 'shared' : 'static'];
|
// [extname, shared, zend]
|
||||||
|
extensions_enabled[extensions_enabled.length] = [extname, shared ? 'shared' : 'static', false];
|
||||||
}
|
}
|
||||||
|
|
||||||
function ADD_SOURCES(dir, file_list, target, obj_dir)
|
function ADD_SOURCES(dir, file_list, target, obj_dir)
|
||||||
|
@ -1870,14 +1878,42 @@ function output_as_table(header, ar_out)
|
||||||
STDOUT.WriteLine(sep);
|
STDOUT.WriteLine(sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function write_extensions_summary()
|
||||||
|
{
|
||||||
|
var exts = new Array();
|
||||||
|
var zend_exts = new Array();
|
||||||
|
|
||||||
|
for(var x = 0; x < extensions_enabled.length; ++x)
|
||||||
|
{
|
||||||
|
var l = extensions_enabled[x];
|
||||||
|
|
||||||
|
if(l[2])
|
||||||
|
{
|
||||||
|
zend_exts.push([l[0], l[1]]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
exts.push([l[0], l[1]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
STDOUT.WriteLine('Enabled extensions:');
|
||||||
|
output_as_table(['Extension', 'Mode'], exts.sort());
|
||||||
|
|
||||||
|
if(zend_exts.length)
|
||||||
|
{
|
||||||
|
STDOUT.WriteBlankLines(2);
|
||||||
|
STDOUT.WriteLine('Enabled Zend extensions:');
|
||||||
|
output_as_table(['Extension', 'Mode'], zend_exts.sort());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function write_summary()
|
function write_summary()
|
||||||
{
|
{
|
||||||
var ar = new Array();
|
var ar = new Array();
|
||||||
|
|
||||||
STDOUT.WriteBlankLines(2);
|
STDOUT.WriteBlankLines(2);
|
||||||
|
write_extensions_summary();
|
||||||
STDOUT.WriteLine("Enabled extensions:");
|
|
||||||
output_as_table(["Extension", "Mode"], extensions_enabled.sort());
|
|
||||||
STDOUT.WriteBlankLines(2);
|
STDOUT.WriteBlankLines(2);
|
||||||
if (!MODE_PHPIZE) {
|
if (!MODE_PHPIZE) {
|
||||||
STDOUT.WriteLine("Enabled SAPI:");
|
STDOUT.WriteLine("Enabled SAPI:");
|
||||||
|
@ -1947,8 +1983,10 @@ function generate_tmp_php_ini()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var directive = "extension";
|
var directive = (extensions_enabled[i][2] ? 'zend_extension' : 'extension');
|
||||||
if ("opcache" == extensions_enabled[i][0] || "xdebug" == extensions_enabled[i][0]) {
|
|
||||||
|
// FIXME: Remove this once ZEND_EXTENSION() is merged to XDEBUG
|
||||||
|
if ("xdebug" == extensions_enabled[i][0]) {
|
||||||
directive = "zend_extension";
|
directive = "zend_extension";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1962,7 +2000,7 @@ function generate_tmp_php_ini()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INI.Close();;
|
INI.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function generate_files()
|
function generate_files()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue