From 38795b88ed96b0776a603ceb7b65914a492f6d72 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 29 Apr 2004 00:17:09 +0000 Subject: [PATCH] Add "--disable-all" switch, which will force all arguments to "no" if they are not specified explicitly. (like the snapshot build, but in reverse). --- win32/build/config.w32.h.in | 1 - win32/build/confutils.js | 27 +++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index d1d7219c353..89c16a9a1a5 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -29,7 +29,6 @@ #define MAGIC_QUOTES 0 #define USE_CONFIG_FILE 1 #define DEFAULT_SHORT_OPEN_TAG "1" -#define ENABLE_PATHINFO_CHECK 1 /* Platform-Specific Configuration. Should not be changed. */ #define PHP_SIGCHILD 0 diff --git a/win32/build/confutils.js b/win32/build/confutils.js index f68ded077b8..f88756b0215 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.39 2004-04-15 16:09:36 wez Exp $ +// $Id: confutils.js,v 1.40 2004-04-29 00:17:09 wez Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -251,6 +251,7 @@ function conf_process_args() var configure_help_mode = false; var analyzed = false; var nice = "cscript /nologo configure.js "; + var disable_all = false; args = WScript.Arguments; for (i = 0; i < args.length; i++) { @@ -260,6 +261,11 @@ function conf_process_args() configure_help_mode = true; break; } + if (arg == "--disable-all") { + disable_all = true; + continue; + } + // If it is --foo=bar, split on the equals sign arg = arg.split("=", 2); argname = arg[0]; @@ -345,6 +351,7 @@ can be built that way. \ 'pcre-regex', 'fastcgi', 'force-cgi-redirect', 'path-info-check', 'zts', 'ipv6' ); + var force; // Now set any defaults we might have missed out earlier for (i = 0; i < configure_args.length; i++) { @@ -358,7 +365,6 @@ can be built that way. \ // Don't trust a default "yes" answer for a non-core module // in a snapshot build if (PHP_SNAPSHOT_BUILD != "no" && argval == "yes" && !shared) { - var force; force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { @@ -386,8 +392,6 @@ can be built that way. \ } if (PHP_SNAPSHOT_BUILD != "no" && argval == "no") { - var force; - force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { if (snapshot_build_exclusions[j] == arg.optname) { @@ -401,6 +405,21 @@ can be built that way. \ shared = true; } } + + if (disable_all) { + force = true; + for (j = 0; j < snapshot_build_exclusions.length; j++) { + if (snapshot_build_exclusions[j] == arg.optname) { + force = false; + break; + } + } + if (force) { + argval = "no"; + shared = false; + } + } + eval("PHP_" + arg.symval + " = argval;"); eval("PHP_" + arg.symval + "_SHARED = shared;"); }