Blame win32/configure.js

Packit 423ecb
/* Configure script for libxml, specific for Windows with Scripting Host.
Packit 423ecb
 * 
Packit 423ecb
 * This script will configure the libxml build process and create necessary files.
Packit 423ecb
 * Run it with an 'help', or an invalid option and it will tell you what options
Packit 423ecb
 * it accepts.
Packit 423ecb
 *
Packit 423ecb
 * March 2002, Igor Zlatkovic <igor@zlatkovic.com>
Packit 423ecb
 */
Packit 423ecb
Packit 423ecb
/* The source directory, relative to the one where this file resides. */
Packit 423ecb
var srcDirXml = "..";
Packit 423ecb
var srcDirUtils = "..";
Packit 423ecb
/* Base name of what we are building. */
Packit 423ecb
var baseName = "libxml2";
Packit 423ecb
/* Configure file which contains the version and the output file where
Packit 423ecb
   we can store our build configuration. */
Packit 423ecb
var configFile = srcDirXml + "\\configure.ac";
Packit 423ecb
var versionFile = ".\\config.msvc";
Packit 423ecb
/* Input and output files regarding the libxml features. */
Packit 423ecb
var optsFileIn = srcDirXml + "\\include\\libxml\\xmlversion.h.in";
Packit 423ecb
var optsFile = srcDirXml + "\\include\\libxml\\xmlversion.h";
Packit 423ecb
/* Version strings for the binary distribution. Will be filled later 
Packit 423ecb
   in the code. */
Packit 423ecb
var verMajor;
Packit 423ecb
var verMinor;
Packit 423ecb
var verMicro;
Packit 423ecb
var verMicroSuffix;
Packit 423ecb
var verCvs;
Packit 423ecb
var useCvsVer = true;
Packit 423ecb
/* Libxml features. */
Packit 423ecb
var withTrio = false;
Packit 423ecb
var withThreads = "native";
Packit 423ecb
var withFtp = true;
Packit 423ecb
var withHttp = true;
Packit 423ecb
var withHtml = true;
Packit 423ecb
var withC14n = true;
Packit 423ecb
var withCatalog = true;
Packit 423ecb
var withDocb = true;
Packit 423ecb
var withXpath = true;
Packit 423ecb
var withXptr = true;
Packit 423ecb
var withXinclude = true;
Packit 423ecb
var withIconv = true;
Packit 423ecb
var withIcu = false;
Packit 423ecb
var withIso8859x = false;
Packit 423ecb
var withZlib = false;
Packit 423ecb
var withLzma = false;
Packit 423ecb
var withDebug = true;
Packit 423ecb
var withMemDebug = false;
Packit 423ecb
var withRunDebug = false;
Packit 423ecb
var withSchemas = true;
Packit 423ecb
var withSchematron = true;
Packit 423ecb
var withRegExps = true;
Packit 423ecb
var withModules = true;
Packit 423ecb
var withTree = true;
Packit 423ecb
var withReader = true;
Packit 423ecb
var withWriter = true;
Packit 423ecb
var withWalker = true;
Packit 423ecb
var withPattern = true;
Packit 423ecb
var withPush = true;
Packit 423ecb
var withValid = true;
Packit 423ecb
var withSax1 = true;
Packit 423ecb
var withLegacy = true;
Packit 423ecb
var withOutput = true;
Packit 423ecb
var withPython = false;
Packit 423ecb
/* Win32 build options. */
Packit 423ecb
var dirSep = "\\";
Packit 423ecb
var compiler = "msvc";
Packit 423ecb
var cruntime = "/MD";
Packit 423ecb
var dynruntime = true;
Packit 423ecb
var vcmanifest = false;
Packit 423ecb
var buildDebug = 0;
Packit 423ecb
var buildStatic = 0;
Packit 423ecb
var buildPrefix = ".";
Packit 423ecb
var buildBinPrefix = "";
Packit 423ecb
var buildIncPrefix = "";
Packit 423ecb
var buildLibPrefix = "";
Packit 423ecb
var buildSoPrefix = "";
Packit 423ecb
var buildInclude = ".";
Packit 423ecb
var buildLib = ".";
Packit 423ecb
/* Local stuff */
Packit 423ecb
var error = 0;
Packit 423ecb
Packit 423ecb
/* Helper function, transforms the option variable into the 'Enabled'
Packit 423ecb
   or 'Disabled' string. */
Packit 423ecb
function boolToStr(opt)
Packit 423ecb
{
Packit 423ecb
	if (opt == false)
Packit 423ecb
		return "no";
Packit 423ecb
	else if (opt == true)
Packit 423ecb
		return "yes";
Packit 423ecb
	error = 1;
Packit 423ecb
	return "*** undefined ***";
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
/* Helper function, transforms the argument string into a boolean
Packit 423ecb
   value. */
Packit 423ecb
function strToBool(opt)
Packit 423ecb
{
Packit 423ecb
	if (opt == 0 || opt == "no")
Packit 423ecb
		return false;
Packit 423ecb
	else if (opt == 1 || opt == "yes")
Packit 423ecb
		return true;
Packit 423ecb
	error = 1;
Packit 423ecb
	return false;
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
/* Displays the details about how to use this script. */
Packit 423ecb
function usage()
Packit 423ecb
{
Packit 423ecb
	var txt;
Packit 423ecb
	txt = "Usage:\n";
Packit 423ecb
	txt += "  cscript " + WScript.ScriptName + " <options>\n";
Packit 423ecb
	txt += "  cscript " + WScript.ScriptName + " help\n\n";
Packit 423ecb
	txt += "Options can be specified in the form <option>=<value>, where the value is\n";
Packit 423ecb
	txt += "either 'yes' or 'no', if not stated otherwise.\n\n";
Packit 423ecb
	txt += "\nXML processor options, default value given in parentheses:\n\n";
Packit 423ecb
	txt += "  trio:       Enable TRIO string manipulator (" + (withTrio? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  threads:    Enable thread safety [no|ctls|native|posix] (" + (withThreads)  + ") \n";
Packit 423ecb
	txt += "  ftp:        Enable FTP client (" + (withFtp? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  http:       Enable HTTP client (" + (withHttp? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  html:       Enable HTML processor (" + (withHtml? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  c14n:       Enable C14N support (" + (withC14n? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  catalog:    Enable catalog support (" + (withCatalog? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  docb:       Enable DocBook support (" + (withDocb? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  xpath:      Enable XPath support (" + (withXpath? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  xptr:       Enable XPointer support (" + (withXptr? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  xinclude:   Enable XInclude support (" + (withXinclude? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  iconv:      Enable iconv support (" + (withIconv? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  icu:        Enable icu support (" + (withIcu? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  iso8859x:   Enable ISO8859X support (" + (withIso8859x? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  zlib:       Enable zlib support (" + (withZlib? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  lzma:       Enable lzma support (" + (withLzma? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  xml_debug:  Enable XML debbugging module (" + (withDebug? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  mem_debug:  Enable memory debugger (" + (withMemDebug? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  run_debug:  Enable memory debugger (" + (withRunDebug? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  regexps:    Enable regular expressions (" + (withRegExps? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  modules:    Enable module support (" + (withModules? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  tree:       Enable tree api (" + (withTree? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  reader:     Enable xmlReader api (" + (withReader? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  writer:     Enable xmlWriter api (" + (withWriter? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  walker:     Enable xmlDocWalker api (" + (withWalker? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  pattern:    Enable xmlPattern api (" + (withPattern? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  push:       Enable push api (" + (withPush? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  valid:      Enable DTD validation support (" + (withValid? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  sax1:       Enable SAX1 api (" + (withSax1? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  legacy:     Enable Deprecated api's (" + (withLegacy? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  output:     Enable serialization support (" + (withOutput? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  schemas:    Enable XML Schema support (" + (withSchemas? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  schematron: Enable Schematron support (" + (withSchematron? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  python:     Build Python bindings (" + (withPython? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "\nWin32 build options, default value given in parentheses:\n\n";
Packit 423ecb
	txt += "  compiler:   Compiler to be used [msvc|mingw|bcb] (" + compiler + ")\n";
Packit 423ecb
	txt += "  cruntime:   C-runtime compiler option (only msvc) (" + cruntime + ")\n";
Packit 423ecb
	txt += "  dynruntime: Use the dynamic RTL (only bcb) (" + dynruntime + ")\n";
Packit 423ecb
	txt += "  vcmanifest: Embed VC manifest (only msvc) (" + (vcmanifest? "yes" : "no") + ")\n";
Packit 423ecb
	txt += "  debug:      Build unoptimised debug executables (" + (buildDebug? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "  static:     Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no")  + ")\n";
Packit 423ecb
	txt += "              Note: automatically enabled if cruntime is not /MD or /MDd\n";
Packit 423ecb
	txt += "  prefix:     Base directory for the installation (" + buildPrefix + ")\n";
Packit 423ecb
	txt += "  bindir:     Directory where xmllint and friends should be installed\n";
Packit 423ecb
	txt += "              (" + buildBinPrefix + ")\n";
Packit 423ecb
	txt += "  incdir:     Directory where headers should be installed\n";
Packit 423ecb
	txt += "              (" + buildIncPrefix + ")\n";
Packit 423ecb
	txt += "  libdir:     Directory where static and import libraries should be\n";
Packit 423ecb
	txt += "              installed (" + buildLibPrefix + ")\n";
Packit 423ecb
	txt += "  sodir:      Directory where shared libraries should be installed\n"; 
Packit 423ecb
	txt += "              (" + buildSoPrefix + ")\n";
Packit 423ecb
	txt += "  include:    Additional search path for the compiler, particularily\n";
Packit 423ecb
	txt += "              where iconv headers can be found (" + buildInclude + ")\n";
Packit 423ecb
	txt += "  lib:        Additional search path for the linker, particularily\n";
Packit 423ecb
	txt += "              where iconv library can be found (" + buildLib + ")\n";
Packit 423ecb
	WScript.Echo(txt);
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
/* Discovers the version we are working with by reading the apropriate
Packit 423ecb
   configuration file. Despite its name, this also writes the configuration
Packit 423ecb
   file included by our makefile. */
Packit 423ecb
function discoverVersion()
Packit 423ecb
{
Packit 423ecb
	var fso, cf, vf, ln, s, iDot, iSlash;
Packit 423ecb
	fso = new ActiveXObject("Scripting.FileSystemObject");
Packit 423ecb
	verCvs = "";
Packit 423ecb
	if (useCvsVer && fso.FileExists("..\\CVS\\Entries")) {
Packit 423ecb
		cf = fso.OpenTextFile("..\\CVS\\Entries", 1);
Packit 423ecb
		while (cf.AtEndOfStream != true) {
Packit 423ecb
			ln = cf.ReadLine();
Packit 423ecb
			s = new String(ln);
Packit 423ecb
			if (s.search(/^\/ChangeLog\//) != -1) {
Packit 423ecb
				iDot = s.indexOf(".");
Packit 423ecb
				iSlash = s.indexOf("/", iDot);
Packit 423ecb
				verCvs = "CVS" + s.substring(iDot + 1, iSlash);
Packit 423ecb
				break;
Packit 423ecb
			}
Packit 423ecb
		}
Packit 423ecb
		cf.Close();
Packit 423ecb
	}
Packit 423ecb
	cf = fso.OpenTextFile(configFile, 1);
Packit 423ecb
	if (compiler == "msvc")
Packit 423ecb
		versionFile = ".\\config.msvc";
Packit 423ecb
	else if (compiler == "mingw")
Packit 423ecb
		versionFile = ".\\config.mingw";
Packit 423ecb
	else if (compiler == "bcb")
Packit 423ecb
		versionFile = ".\\config.bcb";
Packit 423ecb
	vf = fso.CreateTextFile(versionFile, true);
Packit 423ecb
	vf.WriteLine("# " + versionFile);
Packit 423ecb
	vf.WriteLine("# This file is generated automatically by " + WScript.ScriptName + ".");
Packit 423ecb
	vf.WriteBlankLines(1);
Packit 423ecb
	while (cf.AtEndOfStream != true) {
Packit 423ecb
		ln = cf.ReadLine();
Packit 423ecb
		s = new String(ln);
Packit 423ecb
		if (s.search(/^LIBXML_MAJOR_VERSION=/) != -1) {
Packit 423ecb
			vf.WriteLine(s);
Packit 423ecb
			verMajor = s.substring(s.indexOf("=") + 1, s.length)
Packit 423ecb
		} else if(s.search(/^LIBXML_MINOR_VERSION=/) != -1) {
Packit 423ecb
			vf.WriteLine(s);
Packit 423ecb
			verMinor = s.substring(s.indexOf("=") + 1, s.length)
Packit 423ecb
		} else if(s.search(/^LIBXML_MICRO_VERSION=/) != -1) {
Packit 423ecb
			vf.WriteLine(s);
Packit 423ecb
			verMicro = s.substring(s.indexOf("=") + 1, s.length)
Packit 423ecb
		} else if(s.search(/^LIBXML_MICRO_VERSION_SUFFIX=/) != -1) {
Packit 423ecb
			vf.WriteLine(s);
Packit 423ecb
			verMicroSuffix = s.substring(s.indexOf("=") + 1, s.length)
Packit 423ecb
		}
Packit 423ecb
	}
Packit 423ecb
	cf.Close();
Packit 423ecb
	vf.WriteLine("XML_SRCDIR=" + srcDirXml);
Packit 423ecb
	vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils);
Packit 423ecb
	vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_THREADS=" + withThreads);
Packit 423ecb
	vf.WriteLine("WITH_FTP=" + (withFtp? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_DOCB=" + (withDocb? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_ICU=" + (withIcu? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_ISO8859X=" + (withIso8859x? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_LZMA=" + (withLzma? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_SCHEMATRON=" + (withSchematron? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_REGEXPS=" + (withRegExps? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_TREE=" + (withTree? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_READER=" + (withReader? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_WRITER=" + (withWriter? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_WALKER=" + (withWalker? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_PATTERN=" + (withPattern? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_PUSH=" + (withPush? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_VALID=" + (withValid? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_SAX1=" + (withSax1? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_LEGACY=" + (withLegacy? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_OUTPUT=" + (withOutput? "1" : "0"));
Packit 423ecb
	vf.WriteLine("WITH_PYTHON=" + (withPython? "1" : "0"));
Packit 423ecb
	vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
Packit 423ecb
	vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
Packit 423ecb
	vf.WriteLine("PREFIX=" + buildPrefix);
Packit 423ecb
	vf.WriteLine("BINPREFIX=" + buildBinPrefix);
Packit 423ecb
	vf.WriteLine("INCPREFIX=" + buildIncPrefix);
Packit 423ecb
	vf.WriteLine("LIBPREFIX=" + buildLibPrefix);
Packit 423ecb
	vf.WriteLine("SOPREFIX=" + buildSoPrefix);
Packit 423ecb
	if (compiler == "msvc") {
Packit 423ecb
		vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude);
Packit 423ecb
		vf.WriteLine("LIB=$(LIB);" + buildLib);
Packit 423ecb
		vf.WriteLine("CRUNTIME=" + cruntime);
Packit 423ecb
		vf.WriteLine("VCMANIFEST=" + (vcmanifest? "1" : "0"));
Packit 423ecb
	} else if (compiler == "mingw") {
Packit 423ecb
		vf.WriteLine("INCLUDE+= -I" + buildInclude);
Packit 423ecb
		vf.WriteLine("LIB+= -L" + buildLib);
Packit 423ecb
	} else if (compiler == "bcb") {
Packit 423ecb
		vf.WriteLine("INCLUDE=" + buildInclude);
Packit 423ecb
		vf.WriteLine("LIB=" + buildLib);
Packit 423ecb
		vf.WriteLine("DYNRUNTIME=" + (dynruntime? "1" : "0"));
Packit 423ecb
	}
Packit 423ecb
	vf.Close();
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
/* Configures libxml. This one will generate xmlversion.h from xmlversion.h.in
Packit 423ecb
   taking what the user passed on the command line into account. */
Packit 423ecb
function configureLibxml()
Packit 423ecb
{
Packit 423ecb
	var fso, ofi, of, ln, s;
Packit 423ecb
	fso = new ActiveXObject("Scripting.FileSystemObject");
Packit 423ecb
	ofi = fso.OpenTextFile(optsFileIn, 1);
Packit 423ecb
	of = fso.CreateTextFile(optsFile, true);
Packit 423ecb
	while (ofi.AtEndOfStream != true) {
Packit 423ecb
		ln = ofi.ReadLine();
Packit 423ecb
		s = new String(ln);
Packit 423ecb
		if (s.search(/\@VERSION\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@VERSION\@/, 
Packit 423ecb
				verMajor + "." + verMinor + "." + verMicro + verMicroSuffix));
Packit 423ecb
		} else if (s.search(/\@LIBXML_VERSION_NUMBER\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@LIBXML_VERSION_NUMBER\@/, 
Packit 423ecb
				verMajor*10000 + verMinor*100 + verMicro*1));
Packit 423ecb
		} else if (s.search(/\@LIBXML_VERSION_EXTRA\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@LIBXML_VERSION_EXTRA\@/, verCvs));
Packit 423ecb
		} else if (s.search(/\@WITH_TRIO\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_THREADS\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Packit 423ecb
		} else if (s.search(/\@WITH_THREAD_ALLOC\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_THREAD_ALLOC\@/, "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_FTP\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_FTP\@/, withFtp? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_HTTP\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_HTML\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_HTML\@/, withHtml? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_C14N\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_C14N\@/, withC14n? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_CATALOG\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_CATALOG\@/, withCatalog? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_DOCB\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_DOCB\@/, withDocb? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_XPATH\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_XPTR\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_XPTR\@/, withXptr? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_XINCLUDE\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_ICONV\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_ICONV\@/, withIconv? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_ICU\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_ICU\@/, withIcu? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_ISO8859X\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_ISO8859X\@/, withIso8859x? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_ZLIB\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_ZLIB\@/, withZlib? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_LZMA\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_LZMA\@/, withLzma? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_DEBUG\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_RUN_DEBUG\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_RUN_DEBUG\@/, withRunDebug? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_SCHEMAS\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_SCHEMATRON\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_SCHEMATRON\@/, withSchematron? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_REGEXPS\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_REGEXPS\@/, withRegExps? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_MODULES\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@MODULE_EXTENSION\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@MODULE_EXTENSION\@/, ".dll"));
Packit 423ecb
		} else if (s.search(/\@WITH_TREE\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_TREE\@/, withTree? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_READER\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_READER\@/, withReader? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_WRITER\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_WRITER\@/, withWriter? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_WALKER\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_WALKER\@/, withWalker? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_PATTERN\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_PATTERN\@/, withPattern? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_PUSH\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_PUSH\@/, withPush? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_VALID\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_VALID\@/, withValid? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_SAX1\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_SAX1\@/, withSax1? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_LEGACY\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_LEGACY\@/, withLegacy? "1" : "0"));
Packit 423ecb
		} else if (s.search(/\@WITH_OUTPUT\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_OUTPUT\@/, withOutput? "1" : "0"));
Packit 423ecb
		} else
Packit 423ecb
			of.WriteLine(ln);
Packit 423ecb
	}
Packit 423ecb
	ofi.Close();
Packit 423ecb
	of.Close();
Packit 423ecb
}
Packit 423ecb
/* Configures Python bindings. Otherwise identical to the above */
Packit 423ecb
function configureLibxmlPy()
Packit 423ecb
{
Packit 423ecb
	var pyOptsFileIn = srcDirXml + "\\python\\setup.py.in";
Packit 423ecb
	var pyOptsFile = srcDirXml + "\\python\\setup.py";
Packit 423ecb
	var fso, ofi, of, ln, s;
Packit 423ecb
	fso = new ActiveXObject("Scripting.FileSystemObject");
Packit 423ecb
	ofi = fso.OpenTextFile(pyOptsFileIn, 1);
Packit 423ecb
	of = fso.CreateTextFile(pyOptsFile, true);
Packit 423ecb
	while (ofi.AtEndOfStream != true) {
Packit 423ecb
		ln = ofi.ReadLine();
Packit 423ecb
		s = new String(ln);
Packit 423ecb
		if (s.search(/\@LIBXML_VERSION\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@LIBXML_VERSION\@/, 
Packit 423ecb
				verMajor + "." + verMinor + "." + verMicro));
Packit 423ecb
		} else if (s.search(/\@prefix\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@prefix\@/, buildPrefix));
Packit 423ecb
		} else if (s.search(/\@WITH_THREADS\@/) != -1) {
Packit 423ecb
			of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Packit 423ecb
		} else
Packit 423ecb
			of.WriteLine(ln);
Packit 423ecb
	}
Packit 423ecb
	ofi.Close();
Packit 423ecb
	of.Close();
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
/* Creates the readme file for the binary distribution of 'bname', for the
Packit 423ecb
   version 'ver' in the file 'file'. This one is called from the Makefile when
Packit 423ecb
   generating a binary distribution. The parameters are passed by make. */
Packit 423ecb
function genReadme(bname, ver, file)
Packit 423ecb
{
Packit 423ecb
	var fso, f;
Packit 423ecb
	fso = new ActiveXObject("Scripting.FileSystemObject");
Packit 423ecb
	f = fso.CreateTextFile(file, true);
Packit 423ecb
	f.WriteLine("  " + bname + " " + ver);
Packit 423ecb
	f.WriteLine("  --------------");
Packit 423ecb
	f.WriteBlankLines(1);
Packit 423ecb
	f.WriteLine("  This is " + bname + ", version " + ver + ", binary package for the native Win32/IA32");
Packit 423ecb
	f.WriteLine("platform.");
Packit 423ecb
	f.WriteBlankLines(1);
Packit 423ecb
	f.WriteLine("  The files in this package do not require any special installation");
Packit 423ecb
	f.WriteLine("steps. Extract the contents of the archive whereever you wish and");
Packit 423ecb
	f.WriteLine("make sure that your tools which use " + bname + " can find it.");
Packit 423ecb
	f.WriteBlankLines(1);
Packit 423ecb
	f.WriteLine("  For example, if you want to run the supplied utilities from the command");
Packit 423ecb
	f.WriteLine("line, you can, if you wish, add the 'bin' subdirectory to the PATH");
Packit 423ecb
	f.WriteLine("environment variable.");
Packit 423ecb
	f.WriteLine("  If you want to make programmes in C which use " + bname + ", you'll");
Packit 423ecb
	f.WriteLine("likely know how to use the contents of this package. If you don't, please");
Packit 423ecb
	f.WriteLine("refer to your compiler's documentation."); 
Packit 423ecb
	f.WriteBlankLines(1);
Packit 423ecb
	f.WriteLine("  If there is something you cannot keep for yourself, such as a problem,");
Packit 423ecb
	f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using");
Packit 423ecb
	f.WriteLine("the address below.");
Packit 423ecb
	f.WriteBlankLines(1);
Packit 423ecb
	f.WriteLine("                              Igor Zlatkovic (igor@zlatkovic.com)");
Packit 423ecb
	f.Close();
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
Packit 423ecb
/*
Packit 423ecb
 * main(),
Packit 423ecb
 * Execution begins here.
Packit 423ecb
 */
Packit 423ecb
Packit 423ecb
// Parse the command-line arguments.
Packit 423ecb
for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
Packit 423ecb
	var arg, opt;
Packit 423ecb
	arg = WScript.Arguments(i);
Packit 423ecb
	opt = arg.substring(0, arg.indexOf("="));
Packit 423ecb
	if (opt.length == 0)
Packit 423ecb
		opt = arg.substring(0, arg.indexOf(":"));
Packit 423ecb
	if (opt.length > 0) {
Packit 423ecb
		if (opt == "trio")
Packit 423ecb
			withTrio = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "threads")
Packit 423ecb
			withThreads = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "ftp")
Packit 423ecb
			withFtp = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "http")
Packit 423ecb
			withHttp = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "html")
Packit 423ecb
			withHtml = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "c14n")
Packit 423ecb
			withC14n = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "catalog")
Packit 423ecb
			withCatalog = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "docb")
Packit 423ecb
			withDocb = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "xpath")
Packit 423ecb
			withXpath = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "xptr")
Packit 423ecb
			withXptr = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "xinclude")
Packit 423ecb
			withXinclude = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "iconv")
Packit 423ecb
			withIconv = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "icu")
Packit 423ecb
			withIcu = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "iso8859x")
Packit 423ecb
			withIso8859x = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "zlib")
Packit 423ecb
			withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "lzma")
Packit 423ecb
			withLzma = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "xml_debug")
Packit 423ecb
			withDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "mem_debug")
Packit 423ecb
			withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "run_debug")
Packit 423ecb
			withRunDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "schemas")
Packit 423ecb
			withSchemas = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "schematron")
Packit 423ecb
			withSchematron = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "regexps")
Packit 423ecb
			withRegExps = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "modules")
Packit 423ecb
			withModules = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "tree")
Packit 423ecb
			withTree = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "reader")
Packit 423ecb
			withReader = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "writer")
Packit 423ecb
			withWriter = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "walker")
Packit 423ecb
			withWalker = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "pattern")
Packit 423ecb
			withPattern = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "push")
Packit 423ecb
			withPush = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "valid")
Packit 423ecb
			withValid = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "sax1")
Packit 423ecb
			withSax1 = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "legacy")
Packit 423ecb
			withLegacy = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "output")
Packit 423ecb
			withOutput = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "python")
Packit 423ecb
			withPython = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "compiler")
Packit 423ecb
			compiler = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "cruntime")
Packit 423ecb
			cruntime = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "dynruntime")
Packit 423ecb
			dynruntime = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "vcmanifest")
Packit 423ecb
			vcmanifest = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "debug")
Packit 423ecb
			buildDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "static")
Packit 423ecb
			buildStatic = strToBool(arg.substring(opt.length + 1, arg.length));
Packit 423ecb
		else if (opt == "prefix")
Packit 423ecb
			buildPrefix = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "incdir")
Packit 423ecb
			buildIncPrefix = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "bindir")
Packit 423ecb
			buildBinPrefix = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "libdir")
Packit 423ecb
			buildLibPrefix = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "sodir")
Packit 423ecb
			buildSoPrefix = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "incdir")
Packit 423ecb
			buildIncPrefix = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "include")
Packit 423ecb
			buildInclude = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "lib")
Packit 423ecb
			buildLib = arg.substring(opt.length + 1, arg.length);
Packit 423ecb
		else if (opt == "release")
Packit 423ecb
			useCvsVer = false;
Packit 423ecb
		else
Packit 423ecb
			error = 1;
Packit 423ecb
	} else if (i == 0) {
Packit 423ecb
		if (arg == "genreadme") {
Packit 423ecb
			// This command comes from the Makefile and will not be checked
Packit 423ecb
			// for errors, because Makefile will always supply right the parameters.
Packit 423ecb
			genReadme(WScript.Arguments(1), WScript.Arguments(2), WScript.Arguments(3));
Packit 423ecb
			WScript.Quit(0);
Packit 423ecb
		} else if (arg == "help") {
Packit 423ecb
			usage();
Packit 423ecb
			WScript.Quit(0);
Packit 423ecb
		}
Packit 423ecb
Packit 423ecb
	} else {
Packit 423ecb
		error = 1;
Packit 423ecb
	}
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
Packit 423ecb
// If we fail here, it is because the user supplied an unrecognised argument.
Packit 423ecb
if (error != 0) {
Packit 423ecb
	usage();
Packit 423ecb
	WScript.Quit(error);
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
// if user choses to link the c-runtime library statically into libxml2
Packit 423ecb
// with /MT and friends, then we need to enable static linking for xmllint
Packit 423ecb
if (cruntime == "/MT" || cruntime == "/MTd" ||
Packit 423ecb
		cruntime == "/ML" || cruntime == "/MLd") {
Packit 423ecb
	buildStatic = 1;
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
dirSep = "\\";
Packit 423ecb
if (buildBinPrefix == "")
Packit 423ecb
	buildBinPrefix = "$(PREFIX)" + dirSep + "bin";
Packit 423ecb
if (buildIncPrefix == "")
Packit 423ecb
	buildIncPrefix = "$(PREFIX)" + dirSep + "include";
Packit 423ecb
if (buildLibPrefix == "")
Packit 423ecb
	buildLibPrefix = "$(PREFIX)" + dirSep + "lib";
Packit 423ecb
if (buildSoPrefix == "")
Packit 423ecb
	buildSoPrefix = "$(PREFIX)" + dirSep + "bin";
Packit 423ecb
Packit 423ecb
// Discover the version.
Packit 423ecb
discoverVersion();
Packit 423ecb
if (error != 0) {
Packit 423ecb
	WScript.Echo("Version discovery failed, aborting.");
Packit 423ecb
	WScript.Quit(error);
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
var outVerString = baseName + " version: " + verMajor + "." + verMinor + "." + verMicro;
Packit 423ecb
if (verMicroSuffix && verMicroSuffix != "")
Packit 423ecb
	outVerString += "-" + verMicroSuffix;
Packit 423ecb
if (verCvs && verCvs != "")
Packit 423ecb
	outVerString += "-" + verCvs;
Packit 423ecb
WScript.Echo(outVerString);
Packit 423ecb
Packit 423ecb
// Configure libxml.
Packit 423ecb
configureLibxml();
Packit 423ecb
if (error != 0) {
Packit 423ecb
	WScript.Echo("Configuration failed, aborting.");
Packit 423ecb
	WScript.Quit(error);
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
if (withPython == true) {
Packit 423ecb
	configureLibxmlPy();
Packit 423ecb
	if (error != 0) {
Packit 423ecb
		WScript.Echo("Configuration failed, aborting.");
Packit 423ecb
		WScript.Quit(error);
Packit 423ecb
	}
Packit 423ecb
Packit 423ecb
}
Packit 423ecb
Packit 423ecb
// Create the makefile.
Packit 423ecb
var fso = new ActiveXObject("Scripting.FileSystemObject");
Packit 423ecb
var makefile = ".\\Makefile.msvc";
Packit 423ecb
if (compiler == "mingw")
Packit 423ecb
	makefile = ".\\Makefile.mingw";
Packit 423ecb
else if (compiler == "bcb")
Packit 423ecb
	makefile = ".\\Makefile.bcb";
Packit 423ecb
var new_makefile = ".\\Makefile";
Packit 423ecb
var f = fso.FileExists(new_makefile);
Packit 423ecb
if (f) {
Packit 423ecb
       var t = fso.GetFile(new_makefile);
Packit 423ecb
       t.Attributes =0;
Packit 423ecb
}
Packit 423ecb
fso.CopyFile(makefile, new_makefile, true);
Packit 423ecb
WScript.Echo("Created Makefile.");
Packit 423ecb
// Create the config.h.
Packit 423ecb
var confighsrc = "..\\include\\win32config.h";
Packit 423ecb
var configh = "..\\config.h";
Packit 423ecb
var f = fso.FileExists(configh);
Packit 423ecb
if (f) {
Packit 423ecb
	var t = fso.GetFile(configh);
Packit 423ecb
	t.Attributes =0;
Packit 423ecb
}
Packit 423ecb
fso.CopyFile(confighsrc, configh, true);
Packit 423ecb
WScript.Echo("Created config.h.");
Packit 423ecb
Packit 423ecb
Packit 423ecb
// Display the final configuration. 
Packit 423ecb
var txtOut = "\nXML processor configuration\n";
Packit 423ecb
txtOut += "---------------------------\n";
Packit 423ecb
txtOut += "              Trio: " + boolToStr(withTrio) + "\n";
Packit 423ecb
txtOut += "     Thread safety: " + withThreads + "\n";
Packit 423ecb
txtOut += "        FTP client: " + boolToStr(withFtp) + "\n";
Packit 423ecb
txtOut += "       HTTP client: " + boolToStr(withHttp) + "\n";
Packit 423ecb
txtOut += "    HTML processor: " + boolToStr(withHtml) + "\n";
Packit 423ecb
txtOut += "      C14N support: " + boolToStr(withC14n) + "\n";
Packit 423ecb
txtOut += "   Catalog support: " + boolToStr(withCatalog) + "\n";
Packit 423ecb
txtOut += "   DocBook support: " + boolToStr(withDocb) + "\n";
Packit 423ecb
txtOut += "     XPath support: " + boolToStr(withXpath) + "\n";
Packit 423ecb
txtOut += "  XPointer support: " + boolToStr(withXptr) + "\n";
Packit 423ecb
txtOut += "  XInclude support: " + boolToStr(withXinclude) + "\n";
Packit 423ecb
txtOut += "     iconv support: " + boolToStr(withIconv) + "\n";
Packit 423ecb
txtOut += "     icu   support: " + boolToStr(withIcu) + "\n";
Packit 423ecb
txtOut += "  iso8859x support: " + boolToStr(withIso8859x) + "\n";
Packit 423ecb
txtOut += "      zlib support: " + boolToStr(withZlib) + "\n";
Packit 423ecb
txtOut += "      lzma support: " + boolToStr(withLzma) + "\n";
Packit 423ecb
txtOut += "  Debugging module: " + boolToStr(withDebug) + "\n";
Packit 423ecb
txtOut += "  Memory debugging: " + boolToStr(withMemDebug) + "\n";
Packit 423ecb
txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n";
Packit 423ecb
txtOut += "    Regexp support: " + boolToStr(withRegExps) + "\n";
Packit 423ecb
txtOut += "    Module support: " + boolToStr(withModules) + "\n";
Packit 423ecb
txtOut += "      Tree support: " + boolToStr(withTree) + "\n";
Packit 423ecb
txtOut += "    Reader support: " + boolToStr(withReader) + "\n";
Packit 423ecb
txtOut += "    Writer support: " + boolToStr(withWriter) + "\n";
Packit 423ecb
txtOut += "    Walker support: " + boolToStr(withWalker) + "\n";
Packit 423ecb
txtOut += "   Pattern support: " + boolToStr(withPattern) + "\n";
Packit 423ecb
txtOut += "      Push support: " + boolToStr(withPush) + "\n";
Packit 423ecb
txtOut += "Validation support: " + boolToStr(withValid) + "\n";
Packit 423ecb
txtOut += "      SAX1 support: " + boolToStr(withSax1) + "\n";
Packit 423ecb
txtOut += "    Legacy support: " + boolToStr(withLegacy) + "\n";
Packit 423ecb
txtOut += "    Output support: " + boolToStr(withOutput) + "\n";
Packit 423ecb
txtOut += "XML Schema support: " + boolToStr(withSchemas) + "\n";
Packit 423ecb
txtOut += "Schematron support: " + boolToStr(withSchematron) + "\n";
Packit 423ecb
txtOut += "   Python bindings: " + boolToStr(withPython) + "\n";
Packit 423ecb
txtOut += "\n";
Packit 423ecb
txtOut += "Win32 build configuration\n";
Packit 423ecb
txtOut += "-------------------------\n";
Packit 423ecb
txtOut += "          Compiler: " + compiler + "\n";
Packit 423ecb
if (compiler == "msvc") {
Packit 423ecb
	txtOut += "  C-Runtime option: " + cruntime + "\n";
Packit 423ecb
	txtOut += "    Embed Manifest: " + boolToStr(vcmanifest) + "\n";
Packit 423ecb
} else if (compiler == "bcb")
Packit 423ecb
	txtOut += "   Use dynamic RTL: " + dynruntime + "\n";
Packit 423ecb
txtOut += "     Debug symbols: " + boolToStr(buildDebug) + "\n";
Packit 423ecb
txtOut += "    Static xmllint: " + boolToStr(buildStatic) + "\n";
Packit 423ecb
txtOut += "    Install prefix: " + buildPrefix + "\n";
Packit 423ecb
txtOut += "      Put tools in: " + buildBinPrefix + "\n";
Packit 423ecb
txtOut += "    Put headers in: " + buildIncPrefix + "\n";
Packit 423ecb
txtOut += "Put static libs in: " + buildLibPrefix + "\n";
Packit 423ecb
txtOut += "Put shared libs in: " + buildSoPrefix + "\n";
Packit 423ecb
txtOut += "      Include path: " + buildInclude + "\n";
Packit 423ecb
txtOut += "          Lib path: " + buildLib + "\n";
Packit 423ecb
WScript.Echo(txtOut);
Packit 423ecb
Packit 423ecb
//
Packit 423ecb