var FSO = WScript.CreateObject("Scripting.FileSystemObject");\r
var C = FSO.CreateTextFile("configure.js", true);\r
var B = FSO.CreateTextFile("configure.bat", true);\r
-var A = FSO.CreateTextFile("config.simple.bat", true);\r
\r
var modules = "";\r
var MODULES = WScript.CreateObject("Scripting.Dictionary");\r
C.Write(file_get_contents("win32/build/configure.tail"));\r
\r
B.WriteLine("@echo off");\r
-B.WriteLine("cscript /nologo configure.js %*");\r
-\r
-// Generates config.simple.bat (configure --disable-all --enable-cli --with-mp)\r
-A.WriteLine("@echo off");\r
-A.WriteLine("cscript /nologo configure.js --disable-all --enable-cli --with-mp");
\ No newline at end of file
+B.WriteLine("cscript /nologo configure.js %*");
\ No newline at end of file
ARG_WITH("all-shared", "Force all the non obligatory extensions to be shared", "no");
+// Config profiles (--with-config-profile=<name>) will save a certain config to php-src/config.<name>.bat
+// so that it can be executed like: cofig.<name> instead of a long list of parameters
+//
+// Note, nice as a name is disallowed and will generate a warning and skip saaving
+ARG_WITH('config-profile', 'Name of the configuration profile to save this to in php-src/config.name.bat', 'no');
\ No newline at end of file
args = WScript.Arguments;
for (i = 0; i < args.length; i++) {
arg = args(i);
- nice += ' "' + arg + '"';
+ // Ignore --with-config-profile for config.nice.bat
+ if (arg.toLowerCase().substring(0, arg.indexOf('=')) != '--with-config-profile' && arg != '--with-config-profile') {
+ nice += ' "' + arg + '"';
+ }
if (arg == "--help") {
configure_help_mode = true;
break;
'pcre-regex', 'fastcgi', 'force-cgi-redirect',
'path-info-check', 'zts', 'ipv6', 'memory-limit',
'zend-multibyte', 'fd-setsize', 'memory-manager',
- 't1lib', 'pgi', 'pgo', 'all-shared'
+ 't1lib', 'pgi', 'pgo', 'all-shared', 'config-profile'
);
var force;
STDOUT.WriteLine("Saving configure options to config.nice.bat");
var nicefile = FSO.CreateTextFile("config.nice.bat", true);
+ nicefile.WriteLine('@echo off');
nicefile.WriteLine(nice + " %*");
nicefile.Close();
+ if (PHP_CONFIG_PROFILE != 'no') {
+ if (PHP_CONFIG_PROFILE.toLowerCase() == 'nice') {
+ WARNING('Config profile name cannot be named \'nice\'');
+ } else {
+ var config_profile = FSO.CreateTextFile('config.' + PHP_CONFIG_PROFILE + '.bat', true);
+
+ config_profile.WriteLine('@echo off');
+ config_profile.WriteLine(nice + ' %*');
+ config_profile.Close();
+ }
+ }
+
AC_DEFINE('CONFIGURE_COMMAND', nice, "Configure line");
}