blob: a815cbb734f38e716cf97519e2197e485a3a4122 [file] [log] [blame]
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +00001/* Configure script for libxml, specific for Windows with Scripting Host.
2 *
3 * This script will configure the libxml build process and create necessary files.
4 * Run it with an 'help', or an invalid option and it will tell you what options
5 * it accepts.
6 *
Daniel Veillardbeb70bd2002-12-18 14:53:54 +00007 * March 2002, Igor Zlatkovic <igor@zlatkovic.com>
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +00008 */
9
10/* The source directory, relative to the one where this file resides. */
11var srcDirXml = "..";
12var srcDirUtils = "..";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000013/* Base name of what we are building. */
14var baseName = "libxml2";
15/* Configure file which contains the version and the output file where
16 we can store our build configuration. */
17var configFile = srcDirXml + "\\configure.in";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +000018var versionFile = ".\\config.msvc";
Igor Zlatkovic853514f2002-11-22 21:41:09 +000019/* Input and output files regarding the libxml features. */
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000020var optsFileIn = srcDirXml + "\\include\\libxml\\xmlversion.h.in";
21var optsFile = srcDirXml + "\\include\\libxml\\xmlversion.h";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000022/* Version strings for the binary distribution. Will be filled later
23 in the code. */
24var verMajor;
25var verMinor;
26var verMicro;
Igor Zlatkovic6425b382003-10-25 15:38:34 +000027var verMicroSuffix;
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +000028var verCvs;
29var useCvsVer = true;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000030/* Libxml features. */
31var withTrio = false;
Igor Zlatkovice38ab532003-05-17 11:30:54 +000032var withThreads = "native";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000033var withFtp = true;
34var withHttp = true;
35var withHtml = true;
36var withC14n = true;
37var withCatalog = true;
38var withDocb = true;
39var withXpath = true;
40var withXptr = true;
41var withXinclude = true;
42var withIconv = true;
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +010043var withIcu = false;
William M. Brack6d13f332003-08-08 16:40:36 +000044var withIso8859x = false;
Igor Zlatkovic3acadf42002-09-20 16:40:17 +000045var withZlib = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000046var withDebug = true;
47var withMemDebug = false;
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +000048var withRunDebug = false;
Igor Zlatkovica6f2d902002-04-16 17:57:17 +000049var withSchemas = true;
Daniel Veillard5fe95a82005-07-31 14:05:18 +000050var withSchematron = true;
Igor Zlatkovic8e040972002-09-20 13:39:53 +000051var withRegExps = true;
Daniel Veillardce1648b2005-01-04 15:10:22 +000052var withModules = true;
Daniel Veillard141310a2003-10-06 08:47:56 +000053var withTree = true;
54var withReader = true;
Daniel Veillardea048932003-10-21 09:27:57 +000055var withWriter = true;
Daniel Veillard141310a2003-10-06 08:47:56 +000056var withWalker = true;
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +000057var withPattern = true;
Daniel Veillard141310a2003-10-06 08:47:56 +000058var withPush = true;
59var withValid = true;
60var withSax1 = true;
61var withLegacy = true;
62var withOutput = true;
Igor Zlatkovic853514f2002-11-22 21:41:09 +000063var withPython = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000064/* Win32 build options. */
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +000065var dirSep = "\\";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +000066var compiler = "msvc";
Igor Zlatkovic4f928212003-11-27 18:39:01 +000067var cruntime = "/MD";
Igor Zlatkovicc7646e62003-12-01 11:33:27 +000068var dynruntime = true;
Rob Richards90ee8df2007-06-08 19:47:37 +000069var vcmanifest = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000070var buildDebug = 0;
71var buildStatic = 0;
72var buildPrefix = ".";
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +000073var buildBinPrefix = "";
74var buildIncPrefix = "";
75var buildLibPrefix = "";
76var buildSoPrefix = "";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000077var buildInclude = ".";
78var buildLib = ".";
79/* Local stuff */
80var error = 0;
81
82/* Helper function, transforms the option variable into the 'Enabled'
83 or 'Disabled' string. */
84function boolToStr(opt)
85{
86 if (opt == false)
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000087 return "no";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000088 else if (opt == true)
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000089 return "yes";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000090 error = 1;
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000091 return "*** undefined ***";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000092}
93
94/* Helper function, transforms the argument string into a boolean
95 value. */
96function strToBool(opt)
97{
98 if (opt == 0 || opt == "no")
99 return false;
100 else if (opt == 1 || opt == "yes")
101 return true;
102 error = 1;
103 return false;
104}
105
106/* Displays the details about how to use this script. */
107function usage()
108{
109 var txt;
110 txt = "Usage:\n";
111 txt += " cscript " + WScript.ScriptName + " <options>\n";
112 txt += " cscript " + WScript.ScriptName + " help\n\n";
113 txt += "Options can be specified in the form <option>=<value>, where the value is\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000114 txt += "either 'yes' or 'no', if not stated otherwise.\n\n";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000115 txt += "\nXML processor options, default value given in parentheses:\n\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000116 txt += " trio: Enable TRIO string manipulator (" + (withTrio? "yes" : "no") + ")\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000117 txt += " threads: Enable thread safety [no|ctls|native|posix] (" + (withThreads) + ") \n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000118 txt += " ftp: Enable FTP client (" + (withFtp? "yes" : "no") + ")\n";
119 txt += " http: Enable HTTP client (" + (withHttp? "yes" : "no") + ")\n";
120 txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n";
121 txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n";
122 txt += " catalog: Enable catalog support (" + (withCatalog? "yes" : "no") + ")\n";
123 txt += " docb: Enable DocBook support (" + (withDocb? "yes" : "no") + ")\n";
124 txt += " xpath: Enable XPath support (" + (withXpath? "yes" : "no") + ")\n";
125 txt += " xptr: Enable XPointer support (" + (withXptr? "yes" : "no") + ")\n";
126 txt += " xinclude: Enable XInclude support (" + (withXinclude? "yes" : "no") + ")\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000127 txt += " iconv: Enable iconv support (" + (withIconv? "yes" : "no") + ")\n";
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +0100128 txt += " icu: Enable icu support (" + (withIcu? "yes" : "no") + ")\n";
William M. Brack6d13f332003-08-08 16:40:36 +0000129 txt += " iso8859x: Enable ISO8859X support (" + (withIso8859x? "yes" : "no") + ")\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000130 txt += " zlib: Enable zlib support (" + (withZlib? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000131 txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n";
132 txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" : "no") + ")\n";
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000133 txt += " run_debug: Enable memory debugger (" + (withRunDebug? "yes" : "no") + ")\n";
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000134 txt += " regexps: Enable regular expressions (" + (withRegExps? "yes" : "no") + ")\n";
Daniel Veillardce1648b2005-01-04 15:10:22 +0000135 txt += " modules: Enable module support (" + (withModules? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000136 txt += " tree: Enable tree api (" + (withTree? "yes" : "no") + ")\n";
137 txt += " reader: Enable xmlReader api (" + (withReader? "yes" : "no") + ")\n";
Daniel Veillardea048932003-10-21 09:27:57 +0000138 txt += " writer: Enable xmlWriter api (" + (withWriter? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000139 txt += " walker: Enable xmlDocWalker api (" + (withWalker? "yes" : "no") + ")\n";
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000140 txt += " pattern: Enable xmlPattern api (" + (withPattern? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000141 txt += " push: Enable push api (" + (withPush? "yes" : "no") + ")\n";
142 txt += " valid: Enable DTD validation support (" + (withValid? "yes" : "no") + ")\n";
143 txt += " sax1: Enable SAX1 api (" + (withSax1? "yes" : "no") + ")\n";
144 txt += " legacy: Enable Deprecated api's (" + (withLegacy? "yes" : "no") + ")\n";
145 txt += " output: Enable serialization support (" + (withOutput? "yes" : "no") + ")\n";
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000146 txt += " schemas: Enable XML Schema support (" + (withSchemas? "yes" : "no") + ")\n";
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000147 txt += " schematron: Enable Schematron support (" + (withSchematron? "yes" : "no") + ")\n";
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000148 txt += " python: Build Python bindings (" + (withPython? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000149 txt += "\nWin32 build options, default value given in parentheses:\n\n";
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000150 txt += " compiler: Compiler to be used [msvc|mingw|bcb] (" + compiler + ")\n";
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000151 txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000152 txt += " dynruntime: Use the dynamic RTL (only bcb) (" + dynruntime + ")\n";
Rob Richards90ee8df2007-06-08 19:47:37 +0000153 txt += " vcmanifest: Embed VC manifest (only msvc) (" + (vcmanifest? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000154 txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n";
155 txt += " static: Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no") + ")\n";
Daniel Veillard53516952005-01-27 23:59:14 +0000156 txt += " Note: automatically enabled if cruntime is not /MD or /MDd\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000157 txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n";
158 txt += " bindir: Directory where xmllint and friends should be installed\n";
159 txt += " (" + buildBinPrefix + ")\n";
160 txt += " incdir: Directory where headers should be installed\n";
161 txt += " (" + buildIncPrefix + ")\n";
162 txt += " libdir: Directory where static and import libraries should be\n";
163 txt += " installed (" + buildLibPrefix + ")\n";
164 txt += " sodir: Directory where shared libraries should be installed\n";
165 txt += " (" + buildSoPrefix + ")\n";
166 txt += " include: Additional search path for the compiler, particularily\n";
167 txt += " where iconv headers can be found (" + buildInclude + ")\n";
168 txt += " lib: Additional search path for the linker, particularily\n";
169 txt += " where iconv library can be found (" + buildLib + ")\n";
170 WScript.Echo(txt);
171}
172
173/* Discovers the version we are working with by reading the apropriate
174 configuration file. Despite its name, this also writes the configuration
175 file included by our makefile. */
176function discoverVersion()
177{
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000178 var fso, cf, vf, ln, s, iDot, iSlash;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000179 fso = new ActiveXObject("Scripting.FileSystemObject");
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000180 verCvs = "";
181 if (useCvsVer && fso.FileExists("..\\CVS\\Entries")) {
182 cf = fso.OpenTextFile("..\\CVS\\Entries", 1);
183 while (cf.AtEndOfStream != true) {
184 ln = cf.ReadLine();
185 s = new String(ln);
186 if (s.search(/^\/ChangeLog\//) != -1) {
187 iDot = s.indexOf(".");
188 iSlash = s.indexOf("/", iDot);
189 verCvs = "CVS" + s.substring(iDot + 1, iSlash);
190 break;
191 }
192 }
193 cf.Close();
194 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000195 cf = fso.OpenTextFile(configFile, 1);
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000196 if (compiler == "msvc")
197 versionFile = ".\\config.msvc";
198 else if (compiler == "mingw")
199 versionFile = ".\\config.mingw";
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000200 else if (compiler == "bcb")
201 versionFile = ".\\config.bcb";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000202 vf = fso.CreateTextFile(versionFile, true);
203 vf.WriteLine("# " + versionFile);
204 vf.WriteLine("# This file is generated automatically by " + WScript.ScriptName + ".");
205 vf.WriteBlankLines(1);
206 while (cf.AtEndOfStream != true) {
207 ln = cf.ReadLine();
208 s = new String(ln);
Daniel Veillard70b18562003-09-24 21:45:21 +0000209 if (s.search(/^LIBXML_MAJOR_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000210 vf.WriteLine(s);
211 verMajor = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000212 } else if(s.search(/^LIBXML_MINOR_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000213 vf.WriteLine(s);
214 verMinor = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000215 } else if(s.search(/^LIBXML_MICRO_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000216 vf.WriteLine(s);
217 verMicro = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000218 } else if(s.search(/^LIBXML_MICRO_VERSION_SUFFIX=/) != -1) {
219 vf.WriteLine(s);
220 verMicroSuffix = s.substring(s.indexOf("=") + 1, s.length)
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000221 }
222 }
223 cf.Close();
224 vf.WriteLine("XML_SRCDIR=" + srcDirXml);
225 vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000226 vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0"));
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000227 vf.WriteLine("WITH_THREADS=" + withThreads);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000228 vf.WriteLine("WITH_FTP=" + (withFtp? "1" : "0"));
229 vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0"));
230 vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0"));
231 vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0"));
232 vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0"));
233 vf.WriteLine("WITH_DOCB=" + (withDocb? "1" : "0"));
234 vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0"));
235 vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0"));
236 vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0"));
237 vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +0100238 vf.WriteLine("WITH_ICU=" + (withIcu? "1" : "0"));
William M. Brack6d13f332003-08-08 16:40:36 +0000239 vf.WriteLine("WITH_ISO8859X=" + (withIso8859x? "1" : "0"));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000240 vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000241 vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0"));
242 vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000243 vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0"));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000244 vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0"));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000245 vf.WriteLine("WITH_SCHEMATRON=" + (withSchematron? "1" : "0"));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000246 vf.WriteLine("WITH_REGEXPS=" + (withRegExps? "1" : "0"));
Daniel Veillardce1648b2005-01-04 15:10:22 +0000247 vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000248 vf.WriteLine("WITH_TREE=" + (withTree? "1" : "0"));
249 vf.WriteLine("WITH_READER=" + (withReader? "1" : "0"));
Daniel Veillardea048932003-10-21 09:27:57 +0000250 vf.WriteLine("WITH_WRITER=" + (withWriter? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000251 vf.WriteLine("WITH_WALKER=" + (withWalker? "1" : "0"));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000252 vf.WriteLine("WITH_PATTERN=" + (withPattern? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000253 vf.WriteLine("WITH_PUSH=" + (withPush? "1" : "0"));
254 vf.WriteLine("WITH_VALID=" + (withValid? "1" : "0"));
255 vf.WriteLine("WITH_SAX1=" + (withSax1? "1" : "0"));
256 vf.WriteLine("WITH_LEGACY=" + (withLegacy? "1" : "0"));
257 vf.WriteLine("WITH_OUTPUT=" + (withOutput? "1" : "0"));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000258 vf.WriteLine("WITH_PYTHON=" + (withPython? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000259 vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
260 vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
261 vf.WriteLine("PREFIX=" + buildPrefix);
262 vf.WriteLine("BINPREFIX=" + buildBinPrefix);
263 vf.WriteLine("INCPREFIX=" + buildIncPrefix);
264 vf.WriteLine("LIBPREFIX=" + buildLibPrefix);
265 vf.WriteLine("SOPREFIX=" + buildSoPrefix);
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000266 if (compiler == "msvc") {
267 vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude);
268 vf.WriteLine("LIB=$(LIB);" + buildLib);
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000269 vf.WriteLine("CRUNTIME=" + cruntime);
Rob Richards90ee8df2007-06-08 19:47:37 +0000270 vf.WriteLine("VCMANIFEST=" + (vcmanifest? "1" : "0"));
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000271 } else if (compiler == "mingw") {
Patrick von Rethf1da8ab2011-09-14 16:00:28 +0800272 vf.WriteLine("INCLUDE+= -I" + buildInclude);
273 vf.WriteLine("LIB+= -L" + buildLib);
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000274 } else if (compiler == "bcb") {
275 vf.WriteLine("INCLUDE=" + buildInclude);
276 vf.WriteLine("LIB=" + buildLib);
Rob Richards90ee8df2007-06-08 19:47:37 +0000277 vf.WriteLine("DYNRUNTIME=" + (dynruntime? "1" : "0"));
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000278 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000279 vf.Close();
280}
281
282/* Configures libxml. This one will generate xmlversion.h from xmlversion.h.in
283 taking what the user passed on the command line into account. */
284function configureLibxml()
285{
286 var fso, ofi, of, ln, s;
287 fso = new ActiveXObject("Scripting.FileSystemObject");
288 ofi = fso.OpenTextFile(optsFileIn, 1);
289 of = fso.CreateTextFile(optsFile, true);
290 while (ofi.AtEndOfStream != true) {
291 ln = ofi.ReadLine();
292 s = new String(ln);
293 if (s.search(/\@VERSION\@/) != -1) {
294 of.WriteLine(s.replace(/\@VERSION\@/,
Daniel Veillard70b18562003-09-24 21:45:21 +0000295 verMajor + "." + verMinor + "." + verMicro + verMicroSuffix));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000296 } else if (s.search(/\@LIBXML_VERSION_NUMBER\@/) != -1) {
297 of.WriteLine(s.replace(/\@LIBXML_VERSION_NUMBER\@/,
298 verMajor*10000 + verMinor*100 + verMicro*1));
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000299 } else if (s.search(/\@LIBXML_VERSION_EXTRA\@/) != -1) {
300 of.WriteLine(s.replace(/\@LIBXML_VERSION_EXTRA\@/, verCvs));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000301 } else if (s.search(/\@WITH_TRIO\@/) != -1) {
302 of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
303 } else if (s.search(/\@WITH_THREADS\@/) != -1) {
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000304 of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000305 } else if (s.search(/\@WITH_FTP\@/) != -1) {
306 of.WriteLine(s.replace(/\@WITH_FTP\@/, withFtp? "1" : "0"));
307 } else if (s.search(/\@WITH_HTTP\@/) != -1) {
308 of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0"));
309 } else if (s.search(/\@WITH_HTML\@/) != -1) {
310 of.WriteLine(s.replace(/\@WITH_HTML\@/, withHtml? "1" : "0"));
311 } else if (s.search(/\@WITH_C14N\@/) != -1) {
312 of.WriteLine(s.replace(/\@WITH_C14N\@/, withC14n? "1" : "0"));
313 } else if (s.search(/\@WITH_CATALOG\@/) != -1) {
314 of.WriteLine(s.replace(/\@WITH_CATALOG\@/, withCatalog? "1" : "0"));
315 } else if (s.search(/\@WITH_DOCB\@/) != -1) {
316 of.WriteLine(s.replace(/\@WITH_DOCB\@/, withDocb? "1" : "0"));
317 } else if (s.search(/\@WITH_XPATH\@/) != -1) {
318 of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0"));
319 } else if (s.search(/\@WITH_XPTR\@/) != -1) {
320 of.WriteLine(s.replace(/\@WITH_XPTR\@/, withXptr? "1" : "0"));
321 } else if (s.search(/\@WITH_XINCLUDE\@/) != -1) {
322 of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0"));
323 } else if (s.search(/\@WITH_ICONV\@/) != -1) {
324 of.WriteLine(s.replace(/\@WITH_ICONV\@/, withIconv? "1" : "0"));
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +0100325 } else if (s.search(/\@WITH_ICU\@/) != -1) {
326 of.WriteLine(s.replace(/\@WITH_ICU\@/, withIcu? "1" : "0"));
William M. Brack6d13f332003-08-08 16:40:36 +0000327 } else if (s.search(/\@WITH_ISO8859X\@/) != -1) {
328 of.WriteLine(s.replace(/\@WITH_ISO8859X\@/, withIso8859x? "1" : "0"));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000329 } else if (s.search(/\@WITH_ZLIB\@/) != -1) {
330 of.WriteLine(s.replace(/\@WITH_ZLIB\@/, withZlib? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000331 } else if (s.search(/\@WITH_DEBUG\@/) != -1) {
332 of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0"));
333 } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
334 of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000335 } else if (s.search(/\@WITH_RUN_DEBUG\@/) != -1) {
336 of.WriteLine(s.replace(/\@WITH_RUN_DEBUG\@/, withRunDebug? "1" : "0"));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000337 } else if (s.search(/\@WITH_SCHEMAS\@/) != -1) {
338 of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0"));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000339 } else if (s.search(/\@WITH_SCHEMATRON\@/) != -1) {
340 of.WriteLine(s.replace(/\@WITH_SCHEMATRON\@/, withSchematron? "1" : "0"));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000341 } else if (s.search(/\@WITH_REGEXPS\@/) != -1) {
342 of.WriteLine(s.replace(/\@WITH_REGEXPS\@/, withRegExps? "1" : "0"));
Daniel Veillardce1648b2005-01-04 15:10:22 +0000343 } else if (s.search(/\@WITH_MODULES\@/) != -1) {
344 of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
345 } else if (s.search(/\@MODULE_EXTENSION\@/) != -1) {
346 of.WriteLine(s.replace(/\@MODULE_EXTENSION\@/, ".dll"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000347 } else if (s.search(/\@WITH_TREE\@/) != -1) {
348 of.WriteLine(s.replace(/\@WITH_TREE\@/, withTree? "1" : "0"));
349 } else if (s.search(/\@WITH_READER\@/) != -1) {
350 of.WriteLine(s.replace(/\@WITH_READER\@/, withReader? "1" : "0"));
Daniel Veillardea048932003-10-21 09:27:57 +0000351 } else if (s.search(/\@WITH_WRITER\@/) != -1) {
352 of.WriteLine(s.replace(/\@WITH_WRITER\@/, withWriter? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000353 } else if (s.search(/\@WITH_WALKER\@/) != -1) {
354 of.WriteLine(s.replace(/\@WITH_WALKER\@/, withWalker? "1" : "0"));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000355 } else if (s.search(/\@WITH_PATTERN\@/) != -1) {
356 of.WriteLine(s.replace(/\@WITH_PATTERN\@/, withPattern? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000357 } else if (s.search(/\@WITH_PUSH\@/) != -1) {
358 of.WriteLine(s.replace(/\@WITH_PUSH\@/, withPush? "1" : "0"));
359 } else if (s.search(/\@WITH_VALID\@/) != -1) {
360 of.WriteLine(s.replace(/\@WITH_VALID\@/, withValid? "1" : "0"));
361 } else if (s.search(/\@WITH_SAX1\@/) != -1) {
362 of.WriteLine(s.replace(/\@WITH_SAX1\@/, withSax1? "1" : "0"));
363 } else if (s.search(/\@WITH_LEGACY\@/) != -1) {
364 of.WriteLine(s.replace(/\@WITH_LEGACY\@/, withLegacy? "1" : "0"));
365 } else if (s.search(/\@WITH_OUTPUT\@/) != -1) {
366 of.WriteLine(s.replace(/\@WITH_OUTPUT\@/, withOutput? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000367 } else
368 of.WriteLine(ln);
369 }
370 ofi.Close();
371 of.Close();
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000372}
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000373/* Configures Python bindings. Otherwise identical to the above */
374function configureLibxmlPy()
375{
376 var pyOptsFileIn = srcDirXml + "\\python\\setup.py.in";
377 var pyOptsFile = srcDirXml + "\\python\\setup.py";
378 var fso, ofi, of, ln, s;
379 fso = new ActiveXObject("Scripting.FileSystemObject");
380 ofi = fso.OpenTextFile(pyOptsFileIn, 1);
381 of = fso.CreateTextFile(pyOptsFile, true);
382 while (ofi.AtEndOfStream != true) {
383 ln = ofi.ReadLine();
384 s = new String(ln);
385 if (s.search(/\@LIBXML_VERSION\@/) != -1) {
386 of.WriteLine(s.replace(/\@LIBXML_VERSION\@/,
387 verMajor + "." + verMinor + "." + verMicro));
388 } else if (s.search(/\@prefix\@/) != -1) {
389 of.WriteLine(s.replace(/\@prefix\@/, buildPrefix));
Daniel Veillard94bb2f12003-04-27 22:14:07 +0000390 } else if (s.search(/\@WITH_THREADS\@/) != -1) {
391 of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000392 } else
393 of.WriteLine(ln);
394 }
395 ofi.Close();
396 of.Close();
397}
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000398
399/* Creates the readme file for the binary distribution of 'bname', for the
400 version 'ver' in the file 'file'. This one is called from the Makefile when
401 generating a binary distribution. The parameters are passed by make. */
402function genReadme(bname, ver, file)
403{
404 var fso, f;
405 fso = new ActiveXObject("Scripting.FileSystemObject");
406 f = fso.CreateTextFile(file, true);
407 f.WriteLine(" " + bname + " " + ver);
408 f.WriteLine(" --------------");
409 f.WriteBlankLines(1);
410 f.WriteLine(" This is " + bname + ", version " + ver + ", binary package for the native Win32/IA32");
411 f.WriteLine("platform.");
412 f.WriteBlankLines(1);
Igor Zlatkovic72c28582004-06-09 14:32:47 +0000413 f.WriteLine(" The files in this package do not require any special installation");
414 f.WriteLine("steps. Extract the contents of the archive whereever you wish and");
415 f.WriteLine("make sure that your tools which use " + bname + " can find it.");
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000416 f.WriteBlankLines(1);
Igor Zlatkovic72c28582004-06-09 14:32:47 +0000417 f.WriteLine(" For example, if you want to run the supplied utilities from the command");
418 f.WriteLine("line, you can, if you wish, add the 'bin' subdirectory to the PATH");
419 f.WriteLine("environment variable.");
420 f.WriteLine(" If you want to make programmes in C which use " + bname + ", you'll");
421 f.WriteLine("likely know how to use the contents of this package. If you don't, please");
422 f.WriteLine("refer to your compiler's documentation.");
Igor Zlatkovic0ceeb8e2002-09-10 19:07:02 +0000423 f.WriteBlankLines(1);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000424 f.WriteLine(" If there is something you cannot keep for yourself, such as a problem,");
425 f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using");
426 f.WriteLine("the address below.");
427 f.WriteBlankLines(1);
Daniel Veillardbeb70bd2002-12-18 14:53:54 +0000428 f.WriteLine(" Igor Zlatkovic (igor@zlatkovic.com)");
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000429 f.Close();
430}
431
William M. Brack6d13f332003-08-08 16:40:36 +0000432
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000433/*
434 * main(),
435 * Execution begins here.
436 */
437
438// Parse the command-line arguments.
439for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
440 var arg, opt;
441 arg = WScript.Arguments(i);
442 opt = arg.substring(0, arg.indexOf("="));
443 if (opt.length == 0)
444 opt = arg.substring(0, arg.indexOf(":"));
445 if (opt.length > 0) {
446 if (opt == "trio")
447 withTrio = strToBool(arg.substring(opt.length + 1, arg.length));
448 else if (opt == "threads")
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000449 withThreads = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000450 else if (opt == "ftp")
451 withFtp = strToBool(arg.substring(opt.length + 1, arg.length));
452 else if (opt == "http")
453 withHttp = strToBool(arg.substring(opt.length + 1, arg.length));
454 else if (opt == "html")
455 withHtml = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic9425ce22002-04-10 21:57:11 +0000456 else if (opt == "c14n")
457 withC14n = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000458 else if (opt == "catalog")
459 withCatalog = strToBool(arg.substring(opt.length + 1, arg.length));
460 else if (opt == "docb")
461 withDocb = strToBool(arg.substring(opt.length + 1, arg.length));
462 else if (opt == "xpath")
463 withXpath = strToBool(arg.substring(opt.length + 1, arg.length));
464 else if (opt == "xptr")
465 withXptr = strToBool(arg.substring(opt.length + 1, arg.length));
466 else if (opt == "xinclude")
467 withXinclude = strToBool(arg.substring(opt.length + 1, arg.length));
468 else if (opt == "iconv")
469 withIconv = strToBool(arg.substring(opt.length + 1, arg.length));
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +0100470 else if (opt == "icu")
471 withIcu = strToBool(arg.substring(opt.length + 1, arg.length));
William M. Brack6d13f332003-08-08 16:40:36 +0000472 else if (opt == "iso8859x")
473 withIso8859x = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000474 else if (opt == "zlib")
475 withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000476 else if (opt == "xml_debug")
477 withDebug = strToBool(arg.substring(opt.length + 1, arg.length));
478 else if (opt == "mem_debug")
479 withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000480 else if (opt == "run_debug")
481 withRunDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000482 else if (opt == "schemas")
483 withSchemas = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000484 else if (opt == "schematron")
485 withSchematron = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000486 else if (opt == "regexps")
487 withRegExps = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillardc2aa6152005-08-02 11:27:54 +0000488 else if (opt == "modules")
489 withModules = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000490 else if (opt == "tree")
491 withTree = strToBool(arg.substring(opt.length + 1, arg.length));
492 else if (opt == "reader")
493 withReader = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillardea048932003-10-21 09:27:57 +0000494 else if (opt == "writer")
495 withWriter = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000496 else if (opt == "walker")
497 withWalker = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000498 else if (opt == "pattern")
499 withPattern = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000500 else if (opt == "push")
501 withPush = strToBool(arg.substring(opt.length + 1, arg.length));
502 else if (opt == "valid")
503 withValid = strToBool(arg.substring(opt.length + 1, arg.length));
504 else if (opt == "sax1")
505 withSax1 = strToBool(arg.substring(opt.length + 1, arg.length));
506 else if (opt == "legacy")
507 withLegacy = strToBool(arg.substring(opt.length + 1, arg.length));
508 else if (opt == "output")
509 withOutput = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000510 else if (opt == "python")
511 withPython = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000512 else if (opt == "compiler")
513 compiler = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000514 else if (opt == "cruntime")
515 cruntime = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000516 else if (opt == "dynruntime")
517 dynruntime = strToBool(arg.substring(opt.length + 1, arg.length));
Rob Richards90ee8df2007-06-08 19:47:37 +0000518 else if (opt == "vcmanifest")
519 vcmanifest = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000520 else if (opt == "debug")
521 buildDebug = strToBool(arg.substring(opt.length + 1, arg.length));
522 else if (opt == "static")
523 buildStatic = strToBool(arg.substring(opt.length + 1, arg.length));
524 else if (opt == "prefix")
525 buildPrefix = arg.substring(opt.length + 1, arg.length);
526 else if (opt == "incdir")
527 buildIncPrefix = arg.substring(opt.length + 1, arg.length);
528 else if (opt == "bindir")
529 buildBinPrefix = arg.substring(opt.length + 1, arg.length);
530 else if (opt == "libdir")
531 buildLibPrefix = arg.substring(opt.length + 1, arg.length);
532 else if (opt == "sodir")
533 buildSoPrefix = arg.substring(opt.length + 1, arg.length);
534 else if (opt == "incdir")
535 buildIncPrefix = arg.substring(opt.length + 1, arg.length);
536 else if (opt == "include")
537 buildInclude = arg.substring(opt.length + 1, arg.length);
538 else if (opt == "lib")
539 buildLib = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000540 else if (opt == "release")
541 useCvsVer = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000542 else
543 error = 1;
544 } else if (i == 0) {
545 if (arg == "genreadme") {
546 // This command comes from the Makefile and will not be checked
547 // for errors, because Makefile will always supply right the parameters.
548 genReadme(WScript.Arguments(1), WScript.Arguments(2), WScript.Arguments(3));
549 WScript.Quit(0);
550 } else if (arg == "help") {
551 usage();
552 WScript.Quit(0);
553 }
William M. Brack6d13f332003-08-08 16:40:36 +0000554
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000555 } else {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000556 error = 1;
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000557 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000558}
559
William M. Brack6d13f332003-08-08 16:40:36 +0000560
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000561// If we fail here, it is because the user supplied an unrecognised argument.
562if (error != 0) {
563 usage();
564 WScript.Quit(error);
565}
Daniel Veillard53516952005-01-27 23:59:14 +0000566
567// if user choses to link the c-runtime library statically into libxml2
568// with /MT and friends, then we need to enable static linking for xmllint
569if (cruntime == "/MT" || cruntime == "/MTd" ||
570 cruntime == "/ML" || cruntime == "/MLd") {
571 buildStatic = 1;
572}
573
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000574dirSep = "\\";
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000575if (buildBinPrefix == "")
576 buildBinPrefix = "$(PREFIX)" + dirSep + "bin";
577if (buildIncPrefix == "")
578 buildIncPrefix = "$(PREFIX)" + dirSep + "include";
579if (buildLibPrefix == "")
580 buildLibPrefix = "$(PREFIX)" + dirSep + "lib";
581if (buildSoPrefix == "")
Patrick von Rethf1da8ab2011-09-14 16:00:28 +0800582 buildSoPrefix = "$(PREFIX)" + dirSep + "bin";
William M. Brack6d13f332003-08-08 16:40:36 +0000583
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000584// Discover the version.
585discoverVersion();
586if (error != 0) {
587 WScript.Echo("Version discovery failed, aborting.");
588 WScript.Quit(error);
589}
William M. Brack6d13f332003-08-08 16:40:36 +0000590
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000591var outVerString = baseName + " version: " + verMajor + "." + verMinor + "." + verMicro;
592if (verMicroSuffix && verMicroSuffix != "")
593 outVerString += "-" + verMicroSuffix;
594if (verCvs && verCvs != "")
595 outVerString += "-" + verCvs;
596WScript.Echo(outVerString);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000597
598// Configure libxml.
599configureLibxml();
600if (error != 0) {
601 WScript.Echo("Configuration failed, aborting.");
602 WScript.Quit(error);
603}
William M. Brack6d13f332003-08-08 16:40:36 +0000604
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000605if (withPython == true) {
606 configureLibxmlPy();
607 if (error != 0) {
608 WScript.Echo("Configuration failed, aborting.");
609 WScript.Quit(error);
610 }
William M. Brack6d13f332003-08-08 16:40:36 +0000611
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000612}
613
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000614// Create the makefile.
615var fso = new ActiveXObject("Scripting.FileSystemObject");
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000616var makefile = ".\\Makefile.msvc";
617if (compiler == "mingw")
618 makefile = ".\\Makefile.mingw";
Igor Zlatkovice8b5b0f2003-06-16 07:12:50 +0000619else if (compiler == "bcb")
620 makefile = ".\\Makefile.bcb";
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +0100621var new_makefile = ".\\Makefile";
622var f = fso.FileExists(new_makefile);
623if (f) {
624 var t = fso.GetFile(new_makefile);
625 t.Attributes =0;
626}
627fso.CopyFile(makefile, new_makefile, true);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000628WScript.Echo("Created Makefile.");
Igor Zlatkovic1bab92d2003-08-28 10:24:40 +0000629// Create the config.h.
630var confighsrc = "..\\include\\win32config.h";
631var configh = "..\\config.h";
Daniel Veillard6b9d6952003-11-05 09:50:55 +0000632var f = fso.FileExists(configh);
633if (f) {
634 var t = fso.GetFile(configh);
635 t.Attributes =0;
636}
Igor Zlatkovic1bab92d2003-08-28 10:24:40 +0000637fso.CopyFile(confighsrc, configh, true);
638WScript.Echo("Created config.h.");
639
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000640
641// Display the final configuration.
642var txtOut = "\nXML processor configuration\n";
643txtOut += "---------------------------\n";
644txtOut += " Trio: " + boolToStr(withTrio) + "\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000645txtOut += " Thread safety: " + withThreads + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000646txtOut += " FTP client: " + boolToStr(withFtp) + "\n";
647txtOut += " HTTP client: " + boolToStr(withHttp) + "\n";
648txtOut += " HTML processor: " + boolToStr(withHtml) + "\n";
649txtOut += " C14N support: " + boolToStr(withC14n) + "\n";
650txtOut += " Catalog support: " + boolToStr(withCatalog) + "\n";
651txtOut += " DocBook support: " + boolToStr(withDocb) + "\n";
652txtOut += " XPath support: " + boolToStr(withXpath) + "\n";
653txtOut += " XPointer support: " + boolToStr(withXptr) + "\n";
654txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000655txtOut += " iconv support: " + boolToStr(withIconv) + "\n";
Giuseppe Iuculano48f7dcb2010-11-04 17:42:42 +0100656txtOut += " icu support: " + boolToStr(withIcu) + "\n";
William M. Brack6d13f332003-08-08 16:40:36 +0000657txtOut += " iso8859x support: " + boolToStr(withIso8859x) + "\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000658txtOut += " zlib support: " + boolToStr(withZlib) + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000659txtOut += " Debugging module: " + boolToStr(withDebug) + "\n";
660txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n";
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000661txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n";
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000662txtOut += " Regexp support: " + boolToStr(withRegExps) + "\n";
Daniel Veillardce1648b2005-01-04 15:10:22 +0000663txtOut += " Module support: " + boolToStr(withModules) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000664txtOut += " Tree support: " + boolToStr(withTree) + "\n";
665txtOut += " Reader support: " + boolToStr(withReader) + "\n";
Daniel Veillardea048932003-10-21 09:27:57 +0000666txtOut += " Writer support: " + boolToStr(withWriter) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000667txtOut += " Walker support: " + boolToStr(withWalker) + "\n";
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000668txtOut += " Pattern support: " + boolToStr(withPattern) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000669txtOut += " Push support: " + boolToStr(withPush) + "\n";
670txtOut += "Validation support: " + boolToStr(withValid) + "\n";
671txtOut += " SAX1 support: " + boolToStr(withSax1) + "\n";
672txtOut += " Legacy support: " + boolToStr(withLegacy) + "\n";
673txtOut += " Output support: " + boolToStr(withOutput) + "\n";
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000674txtOut += "XML Schema support: " + boolToStr(withSchemas) + "\n";
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000675txtOut += "Schematron support: " + boolToStr(withSchematron) + "\n";
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000676txtOut += " Python bindings: " + boolToStr(withPython) + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000677txtOut += "\n";
678txtOut += "Win32 build configuration\n";
679txtOut += "-------------------------\n";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000680txtOut += " Compiler: " + compiler + "\n";
Rob Richards90ee8df2007-06-08 19:47:37 +0000681if (compiler == "msvc") {
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000682 txtOut += " C-Runtime option: " + cruntime + "\n";
Rob Richards90ee8df2007-06-08 19:47:37 +0000683 txtOut += " Embed Manifest: " + boolToStr(vcmanifest) + "\n";
684} else if (compiler == "bcb")
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000685 txtOut += " Use dynamic RTL: " + dynruntime + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000686txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n";
687txtOut += " Static xmllint: " + boolToStr(buildStatic) + "\n";
688txtOut += " Install prefix: " + buildPrefix + "\n";
689txtOut += " Put tools in: " + buildBinPrefix + "\n";
690txtOut += " Put headers in: " + buildIncPrefix + "\n";
691txtOut += "Put static libs in: " + buildLibPrefix + "\n";
692txtOut += "Put shared libs in: " + buildSoPrefix + "\n";
693txtOut += " Include path: " + buildInclude + "\n";
694txtOut += " Lib path: " + buildLib + "\n";
695WScript.Echo(txtOut);
696
William M. Brack6d13f332003-08-08 16:40:36 +0000697//
698