blob: 5d73f5a1b1d7567a8dea59ddbfae74dd69c50d01 [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;
William M. Brack6d13f332003-08-08 16:40:36 +000043var withIso8859x = false;
Igor Zlatkovic3acadf42002-09-20 16:40:17 +000044var withZlib = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000045var withDebug = true;
46var withMemDebug = false;
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +000047var withRunDebug = false;
Igor Zlatkovica6f2d902002-04-16 17:57:17 +000048var withSchemas = true;
Daniel Veillard5fe95a82005-07-31 14:05:18 +000049var withSchematron = true;
Igor Zlatkovic8e040972002-09-20 13:39:53 +000050var withRegExps = true;
Daniel Veillardce1648b2005-01-04 15:10:22 +000051var withModules = true;
Daniel Veillard141310a2003-10-06 08:47:56 +000052var withTree = true;
53var withReader = true;
Daniel Veillardea048932003-10-21 09:27:57 +000054var withWriter = true;
Daniel Veillard141310a2003-10-06 08:47:56 +000055var withWalker = true;
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +000056var withPattern = true;
Daniel Veillard141310a2003-10-06 08:47:56 +000057var withPush = true;
58var withValid = true;
59var withSax1 = true;
60var withLegacy = true;
61var withOutput = true;
Igor Zlatkovic853514f2002-11-22 21:41:09 +000062var withPython = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000063/* Win32 build options. */
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +000064var dirSep = "\\";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +000065var compiler = "msvc";
Igor Zlatkovic4f928212003-11-27 18:39:01 +000066var cruntime = "/MD";
Igor Zlatkovicc7646e62003-12-01 11:33:27 +000067var dynruntime = true;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000068var buildDebug = 0;
69var buildStatic = 0;
70var buildPrefix = ".";
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +000071var buildBinPrefix = "";
72var buildIncPrefix = "";
73var buildLibPrefix = "";
74var buildSoPrefix = "";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000075var buildInclude = ".";
76var buildLib = ".";
77/* Local stuff */
78var error = 0;
79
80/* Helper function, transforms the option variable into the 'Enabled'
81 or 'Disabled' string. */
82function boolToStr(opt)
83{
84 if (opt == false)
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000085 return "no";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000086 else if (opt == true)
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000087 return "yes";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000088 error = 1;
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000089 return "*** undefined ***";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000090}
91
92/* Helper function, transforms the argument string into a boolean
93 value. */
94function strToBool(opt)
95{
96 if (opt == 0 || opt == "no")
97 return false;
98 else if (opt == 1 || opt == "yes")
99 return true;
100 error = 1;
101 return false;
102}
103
104/* Displays the details about how to use this script. */
105function usage()
106{
107 var txt;
108 txt = "Usage:\n";
109 txt += " cscript " + WScript.ScriptName + " <options>\n";
110 txt += " cscript " + WScript.ScriptName + " help\n\n";
111 txt += "Options can be specified in the form <option>=<value>, where the value is\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000112 txt += "either 'yes' or 'no', if not stated otherwise.\n\n";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000113 txt += "\nXML processor options, default value given in parentheses:\n\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000114 txt += " trio: Enable TRIO string manipulator (" + (withTrio? "yes" : "no") + ")\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000115 txt += " threads: Enable thread safety [no|ctls|native|posix] (" + (withThreads) + ") \n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000116 txt += " ftp: Enable FTP client (" + (withFtp? "yes" : "no") + ")\n";
117 txt += " http: Enable HTTP client (" + (withHttp? "yes" : "no") + ")\n";
118 txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n";
119 txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n";
120 txt += " catalog: Enable catalog support (" + (withCatalog? "yes" : "no") + ")\n";
121 txt += " docb: Enable DocBook support (" + (withDocb? "yes" : "no") + ")\n";
122 txt += " xpath: Enable XPath support (" + (withXpath? "yes" : "no") + ")\n";
123 txt += " xptr: Enable XPointer support (" + (withXptr? "yes" : "no") + ")\n";
124 txt += " xinclude: Enable XInclude support (" + (withXinclude? "yes" : "no") + ")\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000125 txt += " iconv: Enable iconv support (" + (withIconv? "yes" : "no") + ")\n";
William M. Brack6d13f332003-08-08 16:40:36 +0000126 txt += " iso8859x: Enable ISO8859X support (" + (withIso8859x? "yes" : "no") + ")\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000127 txt += " zlib: Enable zlib support (" + (withZlib? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000128 txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n";
129 txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" : "no") + ")\n";
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000130 txt += " run_debug: Enable memory debugger (" + (withRunDebug? "yes" : "no") + ")\n";
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000131 txt += " regexps: Enable regular expressions (" + (withRegExps? "yes" : "no") + ")\n";
Daniel Veillardce1648b2005-01-04 15:10:22 +0000132 txt += " modules: Enable module support (" + (withModules? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000133 txt += " tree: Enable tree api (" + (withTree? "yes" : "no") + ")\n";
134 txt += " reader: Enable xmlReader api (" + (withReader? "yes" : "no") + ")\n";
Daniel Veillardea048932003-10-21 09:27:57 +0000135 txt += " writer: Enable xmlWriter api (" + (withWriter? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000136 txt += " walker: Enable xmlDocWalker api (" + (withWalker? "yes" : "no") + ")\n";
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000137 txt += " pattern: Enable xmlPattern api (" + (withPattern? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000138 txt += " push: Enable push api (" + (withPush? "yes" : "no") + ")\n";
139 txt += " valid: Enable DTD validation support (" + (withValid? "yes" : "no") + ")\n";
140 txt += " sax1: Enable SAX1 api (" + (withSax1? "yes" : "no") + ")\n";
141 txt += " legacy: Enable Deprecated api's (" + (withLegacy? "yes" : "no") + ")\n";
142 txt += " output: Enable serialization support (" + (withOutput? "yes" : "no") + ")\n";
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000143 txt += " schemas: Enable XML Schema support (" + (withSchemas? "yes" : "no") + ")\n";
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000144 txt += " schematron: Enable Schematron support (" + (withSchematron? "yes" : "no") + ")\n";
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000145 txt += " python: Build Python bindings (" + (withPython? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000146 txt += "\nWin32 build options, default value given in parentheses:\n\n";
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000147 txt += " compiler: Compiler to be used [msvc|mingw|bcb] (" + compiler + ")\n";
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000148 txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000149 txt += " dynruntime: Use the dynamic RTL (only bcb) (" + dynruntime + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000150 txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n";
151 txt += " static: Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no") + ")\n";
Daniel Veillard53516952005-01-27 23:59:14 +0000152 txt += " Note: automatically enabled if cruntime is not /MD or /MDd\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000153 txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n";
154 txt += " bindir: Directory where xmllint and friends should be installed\n";
155 txt += " (" + buildBinPrefix + ")\n";
156 txt += " incdir: Directory where headers should be installed\n";
157 txt += " (" + buildIncPrefix + ")\n";
158 txt += " libdir: Directory where static and import libraries should be\n";
159 txt += " installed (" + buildLibPrefix + ")\n";
160 txt += " sodir: Directory where shared libraries should be installed\n";
161 txt += " (" + buildSoPrefix + ")\n";
162 txt += " include: Additional search path for the compiler, particularily\n";
163 txt += " where iconv headers can be found (" + buildInclude + ")\n";
164 txt += " lib: Additional search path for the linker, particularily\n";
165 txt += " where iconv library can be found (" + buildLib + ")\n";
166 WScript.Echo(txt);
167}
168
169/* Discovers the version we are working with by reading the apropriate
170 configuration file. Despite its name, this also writes the configuration
171 file included by our makefile. */
172function discoverVersion()
173{
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000174 var fso, cf, vf, ln, s, iDot, iSlash;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000175 fso = new ActiveXObject("Scripting.FileSystemObject");
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000176 verCvs = "";
177 if (useCvsVer && fso.FileExists("..\\CVS\\Entries")) {
178 cf = fso.OpenTextFile("..\\CVS\\Entries", 1);
179 while (cf.AtEndOfStream != true) {
180 ln = cf.ReadLine();
181 s = new String(ln);
182 if (s.search(/^\/ChangeLog\//) != -1) {
183 iDot = s.indexOf(".");
184 iSlash = s.indexOf("/", iDot);
185 verCvs = "CVS" + s.substring(iDot + 1, iSlash);
186 break;
187 }
188 }
189 cf.Close();
190 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000191 cf = fso.OpenTextFile(configFile, 1);
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000192 if (compiler == "msvc")
193 versionFile = ".\\config.msvc";
194 else if (compiler == "mingw")
195 versionFile = ".\\config.mingw";
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000196 else if (compiler == "bcb")
197 versionFile = ".\\config.bcb";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000198 vf = fso.CreateTextFile(versionFile, true);
199 vf.WriteLine("# " + versionFile);
200 vf.WriteLine("# This file is generated automatically by " + WScript.ScriptName + ".");
201 vf.WriteBlankLines(1);
202 while (cf.AtEndOfStream != true) {
203 ln = cf.ReadLine();
204 s = new String(ln);
Daniel Veillard70b18562003-09-24 21:45:21 +0000205 if (s.search(/^LIBXML_MAJOR_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000206 vf.WriteLine(s);
207 verMajor = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000208 } else if(s.search(/^LIBXML_MINOR_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000209 vf.WriteLine(s);
210 verMinor = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000211 } else if(s.search(/^LIBXML_MICRO_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000212 vf.WriteLine(s);
213 verMicro = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000214 } else if(s.search(/^LIBXML_MICRO_VERSION_SUFFIX=/) != -1) {
215 vf.WriteLine(s);
216 verMicroSuffix = s.substring(s.indexOf("=") + 1, s.length)
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000217 }
218 }
219 cf.Close();
220 vf.WriteLine("XML_SRCDIR=" + srcDirXml);
221 vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000222 vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0"));
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000223 vf.WriteLine("WITH_THREADS=" + withThreads);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000224 vf.WriteLine("WITH_FTP=" + (withFtp? "1" : "0"));
225 vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0"));
226 vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0"));
227 vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0"));
228 vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0"));
229 vf.WriteLine("WITH_DOCB=" + (withDocb? "1" : "0"));
230 vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0"));
231 vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0"));
232 vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0"));
233 vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
William M. Brack6d13f332003-08-08 16:40:36 +0000234 vf.WriteLine("WITH_ISO8859X=" + (withIso8859x? "1" : "0"));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000235 vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000236 vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0"));
237 vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000238 vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0"));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000239 vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0"));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000240 vf.WriteLine("WITH_SCHEMATRON=" + (withSchematron? "1" : "0"));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000241 vf.WriteLine("WITH_REGEXPS=" + (withRegExps? "1" : "0"));
Daniel Veillardce1648b2005-01-04 15:10:22 +0000242 vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000243 vf.WriteLine("WITH_TREE=" + (withTree? "1" : "0"));
244 vf.WriteLine("WITH_READER=" + (withReader? "1" : "0"));
Daniel Veillardea048932003-10-21 09:27:57 +0000245 vf.WriteLine("WITH_WRITER=" + (withWriter? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000246 vf.WriteLine("WITH_WALKER=" + (withWalker? "1" : "0"));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000247 vf.WriteLine("WITH_PATTERN=" + (withPattern? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000248 vf.WriteLine("WITH_PUSH=" + (withPush? "1" : "0"));
249 vf.WriteLine("WITH_VALID=" + (withValid? "1" : "0"));
250 vf.WriteLine("WITH_SAX1=" + (withSax1? "1" : "0"));
251 vf.WriteLine("WITH_LEGACY=" + (withLegacy? "1" : "0"));
252 vf.WriteLine("WITH_OUTPUT=" + (withOutput? "1" : "0"));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000253 vf.WriteLine("WITH_PYTHON=" + (withPython? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000254 vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
255 vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
256 vf.WriteLine("PREFIX=" + buildPrefix);
257 vf.WriteLine("BINPREFIX=" + buildBinPrefix);
258 vf.WriteLine("INCPREFIX=" + buildIncPrefix);
259 vf.WriteLine("LIBPREFIX=" + buildLibPrefix);
260 vf.WriteLine("SOPREFIX=" + buildSoPrefix);
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000261 if (compiler == "msvc") {
262 vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude);
263 vf.WriteLine("LIB=$(LIB);" + buildLib);
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000264 vf.WriteLine("CRUNTIME=" + cruntime);
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000265 } else if (compiler == "mingw") {
266 vf.WriteLine("INCLUDE+=;" + buildInclude);
267 vf.WriteLine("LIB+=;" + buildLib);
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000268 } else if (compiler == "bcb") {
269 vf.WriteLine("INCLUDE=" + buildInclude);
270 vf.WriteLine("LIB=" + buildLib);
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000271 vf.WriteLine("DYNRUNTIME=" + (dynruntime? "1" : "0"));
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000272 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000273 vf.Close();
274}
275
276/* Configures libxml. This one will generate xmlversion.h from xmlversion.h.in
277 taking what the user passed on the command line into account. */
278function configureLibxml()
279{
280 var fso, ofi, of, ln, s;
281 fso = new ActiveXObject("Scripting.FileSystemObject");
282 ofi = fso.OpenTextFile(optsFileIn, 1);
283 of = fso.CreateTextFile(optsFile, true);
284 while (ofi.AtEndOfStream != true) {
285 ln = ofi.ReadLine();
286 s = new String(ln);
287 if (s.search(/\@VERSION\@/) != -1) {
288 of.WriteLine(s.replace(/\@VERSION\@/,
Daniel Veillard70b18562003-09-24 21:45:21 +0000289 verMajor + "." + verMinor + "." + verMicro + verMicroSuffix));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000290 } else if (s.search(/\@LIBXML_VERSION_NUMBER\@/) != -1) {
291 of.WriteLine(s.replace(/\@LIBXML_VERSION_NUMBER\@/,
292 verMajor*10000 + verMinor*100 + verMicro*1));
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000293 } else if (s.search(/\@LIBXML_VERSION_EXTRA\@/) != -1) {
294 of.WriteLine(s.replace(/\@LIBXML_VERSION_EXTRA\@/, verCvs));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000295 } else if (s.search(/\@WITH_TRIO\@/) != -1) {
296 of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
297 } else if (s.search(/\@WITH_THREADS\@/) != -1) {
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000298 of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000299 } else if (s.search(/\@WITH_FTP\@/) != -1) {
300 of.WriteLine(s.replace(/\@WITH_FTP\@/, withFtp? "1" : "0"));
301 } else if (s.search(/\@WITH_HTTP\@/) != -1) {
302 of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0"));
303 } else if (s.search(/\@WITH_HTML\@/) != -1) {
304 of.WriteLine(s.replace(/\@WITH_HTML\@/, withHtml? "1" : "0"));
305 } else if (s.search(/\@WITH_C14N\@/) != -1) {
306 of.WriteLine(s.replace(/\@WITH_C14N\@/, withC14n? "1" : "0"));
307 } else if (s.search(/\@WITH_CATALOG\@/) != -1) {
308 of.WriteLine(s.replace(/\@WITH_CATALOG\@/, withCatalog? "1" : "0"));
309 } else if (s.search(/\@WITH_DOCB\@/) != -1) {
310 of.WriteLine(s.replace(/\@WITH_DOCB\@/, withDocb? "1" : "0"));
311 } else if (s.search(/\@WITH_XPATH\@/) != -1) {
312 of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0"));
313 } else if (s.search(/\@WITH_XPTR\@/) != -1) {
314 of.WriteLine(s.replace(/\@WITH_XPTR\@/, withXptr? "1" : "0"));
315 } else if (s.search(/\@WITH_XINCLUDE\@/) != -1) {
316 of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0"));
317 } else if (s.search(/\@WITH_ICONV\@/) != -1) {
318 of.WriteLine(s.replace(/\@WITH_ICONV\@/, withIconv? "1" : "0"));
William M. Brack6d13f332003-08-08 16:40:36 +0000319 } else if (s.search(/\@WITH_ISO8859X\@/) != -1) {
320 of.WriteLine(s.replace(/\@WITH_ISO8859X\@/, withIso8859x? "1" : "0"));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000321 } else if (s.search(/\@WITH_ZLIB\@/) != -1) {
322 of.WriteLine(s.replace(/\@WITH_ZLIB\@/, withZlib? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000323 } else if (s.search(/\@WITH_DEBUG\@/) != -1) {
324 of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0"));
325 } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
326 of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000327 } else if (s.search(/\@WITH_RUN_DEBUG\@/) != -1) {
328 of.WriteLine(s.replace(/\@WITH_RUN_DEBUG\@/, withRunDebug? "1" : "0"));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000329 } else if (s.search(/\@WITH_SCHEMAS\@/) != -1) {
330 of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0"));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000331 } else if (s.search(/\@WITH_SCHEMATRON\@/) != -1) {
332 of.WriteLine(s.replace(/\@WITH_SCHEMATRON\@/, withSchematron? "1" : "0"));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000333 } else if (s.search(/\@WITH_REGEXPS\@/) != -1) {
334 of.WriteLine(s.replace(/\@WITH_REGEXPS\@/, withRegExps? "1" : "0"));
Daniel Veillardce1648b2005-01-04 15:10:22 +0000335 } else if (s.search(/\@WITH_MODULES\@/) != -1) {
336 of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
337 } else if (s.search(/\@MODULE_EXTENSION\@/) != -1) {
338 of.WriteLine(s.replace(/\@MODULE_EXTENSION\@/, ".dll"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000339 } else if (s.search(/\@WITH_TREE\@/) != -1) {
340 of.WriteLine(s.replace(/\@WITH_TREE\@/, withTree? "1" : "0"));
341 } else if (s.search(/\@WITH_READER\@/) != -1) {
342 of.WriteLine(s.replace(/\@WITH_READER\@/, withReader? "1" : "0"));
Daniel Veillardea048932003-10-21 09:27:57 +0000343 } else if (s.search(/\@WITH_WRITER\@/) != -1) {
344 of.WriteLine(s.replace(/\@WITH_WRITER\@/, withWriter? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000345 } else if (s.search(/\@WITH_WALKER\@/) != -1) {
346 of.WriteLine(s.replace(/\@WITH_WALKER\@/, withWalker? "1" : "0"));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000347 } else if (s.search(/\@WITH_PATTERN\@/) != -1) {
348 of.WriteLine(s.replace(/\@WITH_PATTERN\@/, withPattern? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000349 } else if (s.search(/\@WITH_PUSH\@/) != -1) {
350 of.WriteLine(s.replace(/\@WITH_PUSH\@/, withPush? "1" : "0"));
351 } else if (s.search(/\@WITH_VALID\@/) != -1) {
352 of.WriteLine(s.replace(/\@WITH_VALID\@/, withValid? "1" : "0"));
353 } else if (s.search(/\@WITH_SAX1\@/) != -1) {
354 of.WriteLine(s.replace(/\@WITH_SAX1\@/, withSax1? "1" : "0"));
355 } else if (s.search(/\@WITH_LEGACY\@/) != -1) {
356 of.WriteLine(s.replace(/\@WITH_LEGACY\@/, withLegacy? "1" : "0"));
357 } else if (s.search(/\@WITH_OUTPUT\@/) != -1) {
358 of.WriteLine(s.replace(/\@WITH_OUTPUT\@/, withOutput? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000359 } else
360 of.WriteLine(ln);
361 }
362 ofi.Close();
363 of.Close();
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000364}
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000365/* Configures Python bindings. Otherwise identical to the above */
366function configureLibxmlPy()
367{
368 var pyOptsFileIn = srcDirXml + "\\python\\setup.py.in";
369 var pyOptsFile = srcDirXml + "\\python\\setup.py";
370 var fso, ofi, of, ln, s;
371 fso = new ActiveXObject("Scripting.FileSystemObject");
372 ofi = fso.OpenTextFile(pyOptsFileIn, 1);
373 of = fso.CreateTextFile(pyOptsFile, true);
374 while (ofi.AtEndOfStream != true) {
375 ln = ofi.ReadLine();
376 s = new String(ln);
377 if (s.search(/\@LIBXML_VERSION\@/) != -1) {
378 of.WriteLine(s.replace(/\@LIBXML_VERSION\@/,
379 verMajor + "." + verMinor + "." + verMicro));
380 } else if (s.search(/\@prefix\@/) != -1) {
381 of.WriteLine(s.replace(/\@prefix\@/, buildPrefix));
Daniel Veillard94bb2f12003-04-27 22:14:07 +0000382 } else if (s.search(/\@WITH_THREADS\@/) != -1) {
383 of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000384 } else
385 of.WriteLine(ln);
386 }
387 ofi.Close();
388 of.Close();
389}
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000390
391/* Creates the readme file for the binary distribution of 'bname', for the
392 version 'ver' in the file 'file'. This one is called from the Makefile when
393 generating a binary distribution. The parameters are passed by make. */
394function genReadme(bname, ver, file)
395{
396 var fso, f;
397 fso = new ActiveXObject("Scripting.FileSystemObject");
398 f = fso.CreateTextFile(file, true);
399 f.WriteLine(" " + bname + " " + ver);
400 f.WriteLine(" --------------");
401 f.WriteBlankLines(1);
402 f.WriteLine(" This is " + bname + ", version " + ver + ", binary package for the native Win32/IA32");
403 f.WriteLine("platform.");
404 f.WriteBlankLines(1);
Igor Zlatkovic72c28582004-06-09 14:32:47 +0000405 f.WriteLine(" The files in this package do not require any special installation");
406 f.WriteLine("steps. Extract the contents of the archive whereever you wish and");
407 f.WriteLine("make sure that your tools which use " + bname + " can find it.");
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000408 f.WriteBlankLines(1);
Igor Zlatkovic72c28582004-06-09 14:32:47 +0000409 f.WriteLine(" For example, if you want to run the supplied utilities from the command");
410 f.WriteLine("line, you can, if you wish, add the 'bin' subdirectory to the PATH");
411 f.WriteLine("environment variable.");
412 f.WriteLine(" If you want to make programmes in C which use " + bname + ", you'll");
413 f.WriteLine("likely know how to use the contents of this package. If you don't, please");
414 f.WriteLine("refer to your compiler's documentation.");
Igor Zlatkovic0ceeb8e2002-09-10 19:07:02 +0000415 f.WriteBlankLines(1);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000416 f.WriteLine(" If there is something you cannot keep for yourself, such as a problem,");
417 f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using");
418 f.WriteLine("the address below.");
419 f.WriteBlankLines(1);
Daniel Veillardbeb70bd2002-12-18 14:53:54 +0000420 f.WriteLine(" Igor Zlatkovic (igor@zlatkovic.com)");
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000421 f.Close();
422}
423
William M. Brack6d13f332003-08-08 16:40:36 +0000424
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000425/*
426 * main(),
427 * Execution begins here.
428 */
429
430// Parse the command-line arguments.
431for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
432 var arg, opt;
433 arg = WScript.Arguments(i);
434 opt = arg.substring(0, arg.indexOf("="));
435 if (opt.length == 0)
436 opt = arg.substring(0, arg.indexOf(":"));
437 if (opt.length > 0) {
438 if (opt == "trio")
439 withTrio = strToBool(arg.substring(opt.length + 1, arg.length));
440 else if (opt == "threads")
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000441 withThreads = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000442 else if (opt == "ftp")
443 withFtp = strToBool(arg.substring(opt.length + 1, arg.length));
444 else if (opt == "http")
445 withHttp = strToBool(arg.substring(opt.length + 1, arg.length));
446 else if (opt == "html")
447 withHtml = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic9425ce22002-04-10 21:57:11 +0000448 else if (opt == "c14n")
449 withC14n = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000450 else if (opt == "catalog")
451 withCatalog = strToBool(arg.substring(opt.length + 1, arg.length));
452 else if (opt == "docb")
453 withDocb = strToBool(arg.substring(opt.length + 1, arg.length));
454 else if (opt == "xpath")
455 withXpath = strToBool(arg.substring(opt.length + 1, arg.length));
456 else if (opt == "xptr")
457 withXptr = strToBool(arg.substring(opt.length + 1, arg.length));
458 else if (opt == "xinclude")
459 withXinclude = strToBool(arg.substring(opt.length + 1, arg.length));
460 else if (opt == "iconv")
461 withIconv = strToBool(arg.substring(opt.length + 1, arg.length));
William M. Brack6d13f332003-08-08 16:40:36 +0000462 else if (opt == "iso8859x")
463 withIso8859x = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000464 else if (opt == "zlib")
465 withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000466 else if (opt == "xml_debug")
467 withDebug = strToBool(arg.substring(opt.length + 1, arg.length));
468 else if (opt == "mem_debug")
469 withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000470 else if (opt == "run_debug")
471 withRunDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000472 else if (opt == "schemas")
473 withSchemas = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000474 else if (opt == "schematron")
475 withSchematron = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000476 else if (opt == "regexps")
477 withRegExps = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillardc2aa6152005-08-02 11:27:54 +0000478 else if (opt == "modules")
479 withModules = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000480 else if (opt == "tree")
481 withTree = strToBool(arg.substring(opt.length + 1, arg.length));
482 else if (opt == "reader")
483 withReader = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillardea048932003-10-21 09:27:57 +0000484 else if (opt == "writer")
485 withWriter = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000486 else if (opt == "walker")
487 withWalker = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000488 else if (opt == "pattern")
489 withPattern = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000490 else if (opt == "push")
491 withPush = strToBool(arg.substring(opt.length + 1, arg.length));
492 else if (opt == "valid")
493 withValid = strToBool(arg.substring(opt.length + 1, arg.length));
494 else if (opt == "sax1")
495 withSax1 = strToBool(arg.substring(opt.length + 1, arg.length));
496 else if (opt == "legacy")
497 withLegacy = strToBool(arg.substring(opt.length + 1, arg.length));
498 else if (opt == "output")
499 withOutput = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000500 else if (opt == "python")
501 withPython = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000502 else if (opt == "compiler")
503 compiler = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000504 else if (opt == "cruntime")
505 cruntime = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000506 else if (opt == "dynruntime")
507 dynruntime = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000508 else if (opt == "debug")
509 buildDebug = strToBool(arg.substring(opt.length + 1, arg.length));
510 else if (opt == "static")
511 buildStatic = strToBool(arg.substring(opt.length + 1, arg.length));
512 else if (opt == "prefix")
513 buildPrefix = arg.substring(opt.length + 1, arg.length);
514 else if (opt == "incdir")
515 buildIncPrefix = arg.substring(opt.length + 1, arg.length);
516 else if (opt == "bindir")
517 buildBinPrefix = arg.substring(opt.length + 1, arg.length);
518 else if (opt == "libdir")
519 buildLibPrefix = arg.substring(opt.length + 1, arg.length);
520 else if (opt == "sodir")
521 buildSoPrefix = arg.substring(opt.length + 1, arg.length);
522 else if (opt == "incdir")
523 buildIncPrefix = arg.substring(opt.length + 1, arg.length);
524 else if (opt == "include")
525 buildInclude = arg.substring(opt.length + 1, arg.length);
526 else if (opt == "lib")
527 buildLib = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000528 else if (opt == "release")
529 useCvsVer = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000530 else
531 error = 1;
532 } else if (i == 0) {
533 if (arg == "genreadme") {
534 // This command comes from the Makefile and will not be checked
535 // for errors, because Makefile will always supply right the parameters.
536 genReadme(WScript.Arguments(1), WScript.Arguments(2), WScript.Arguments(3));
537 WScript.Quit(0);
538 } else if (arg == "help") {
539 usage();
540 WScript.Quit(0);
541 }
William M. Brack6d13f332003-08-08 16:40:36 +0000542
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000543 } else {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000544 error = 1;
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000545 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000546}
547
William M. Brack6d13f332003-08-08 16:40:36 +0000548
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000549// If we fail here, it is because the user supplied an unrecognised argument.
550if (error != 0) {
551 usage();
552 WScript.Quit(error);
553}
Daniel Veillard53516952005-01-27 23:59:14 +0000554
555// if user choses to link the c-runtime library statically into libxml2
556// with /MT and friends, then we need to enable static linking for xmllint
557if (cruntime == "/MT" || cruntime == "/MTd" ||
558 cruntime == "/ML" || cruntime == "/MLd") {
559 buildStatic = 1;
560}
561
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000562dirSep = "\\";
563if (compiler == "mingw")
564 dirSep = "/";
565if (buildBinPrefix == "")
566 buildBinPrefix = "$(PREFIX)" + dirSep + "bin";
567if (buildIncPrefix == "")
568 buildIncPrefix = "$(PREFIX)" + dirSep + "include";
569if (buildLibPrefix == "")
570 buildLibPrefix = "$(PREFIX)" + dirSep + "lib";
571if (buildSoPrefix == "")
572 buildSoPrefix = "$(PREFIX)" + dirSep + "lib";
William M. Brack6d13f332003-08-08 16:40:36 +0000573
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000574// Discover the version.
575discoverVersion();
576if (error != 0) {
577 WScript.Echo("Version discovery failed, aborting.");
578 WScript.Quit(error);
579}
William M. Brack6d13f332003-08-08 16:40:36 +0000580
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000581var outVerString = baseName + " version: " + verMajor + "." + verMinor + "." + verMicro;
582if (verMicroSuffix && verMicroSuffix != "")
583 outVerString += "-" + verMicroSuffix;
584if (verCvs && verCvs != "")
585 outVerString += "-" + verCvs;
586WScript.Echo(outVerString);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000587
588// Configure libxml.
589configureLibxml();
590if (error != 0) {
591 WScript.Echo("Configuration failed, aborting.");
592 WScript.Quit(error);
593}
William M. Brack6d13f332003-08-08 16:40:36 +0000594
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000595if (withPython == true) {
596 configureLibxmlPy();
597 if (error != 0) {
598 WScript.Echo("Configuration failed, aborting.");
599 WScript.Quit(error);
600 }
William M. Brack6d13f332003-08-08 16:40:36 +0000601
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000602}
603
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000604// Create the makefile.
605var fso = new ActiveXObject("Scripting.FileSystemObject");
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000606var makefile = ".\\Makefile.msvc";
607if (compiler == "mingw")
608 makefile = ".\\Makefile.mingw";
Igor Zlatkovice8b5b0f2003-06-16 07:12:50 +0000609else if (compiler == "bcb")
610 makefile = ".\\Makefile.bcb";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000611fso.CopyFile(makefile, ".\\Makefile", true);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000612WScript.Echo("Created Makefile.");
Igor Zlatkovic1bab92d2003-08-28 10:24:40 +0000613// Create the config.h.
614var confighsrc = "..\\include\\win32config.h";
615var configh = "..\\config.h";
Daniel Veillard6b9d6952003-11-05 09:50:55 +0000616var f = fso.FileExists(configh);
617if (f) {
618 var t = fso.GetFile(configh);
619 t.Attributes =0;
620}
Igor Zlatkovic1bab92d2003-08-28 10:24:40 +0000621fso.CopyFile(confighsrc, configh, true);
622WScript.Echo("Created config.h.");
623
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000624
625// Display the final configuration.
626var txtOut = "\nXML processor configuration\n";
627txtOut += "---------------------------\n";
628txtOut += " Trio: " + boolToStr(withTrio) + "\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000629txtOut += " Thread safety: " + withThreads + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000630txtOut += " FTP client: " + boolToStr(withFtp) + "\n";
631txtOut += " HTTP client: " + boolToStr(withHttp) + "\n";
632txtOut += " HTML processor: " + boolToStr(withHtml) + "\n";
633txtOut += " C14N support: " + boolToStr(withC14n) + "\n";
634txtOut += " Catalog support: " + boolToStr(withCatalog) + "\n";
635txtOut += " DocBook support: " + boolToStr(withDocb) + "\n";
636txtOut += " XPath support: " + boolToStr(withXpath) + "\n";
637txtOut += " XPointer support: " + boolToStr(withXptr) + "\n";
638txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000639txtOut += " iconv support: " + boolToStr(withIconv) + "\n";
William M. Brack6d13f332003-08-08 16:40:36 +0000640txtOut += " iso8859x support: " + boolToStr(withIso8859x) + "\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000641txtOut += " zlib support: " + boolToStr(withZlib) + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000642txtOut += " Debugging module: " + boolToStr(withDebug) + "\n";
643txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n";
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000644txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n";
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000645txtOut += " Regexp support: " + boolToStr(withRegExps) + "\n";
Daniel Veillardce1648b2005-01-04 15:10:22 +0000646txtOut += " Module support: " + boolToStr(withModules) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000647txtOut += " Tree support: " + boolToStr(withTree) + "\n";
648txtOut += " Reader support: " + boolToStr(withReader) + "\n";
Daniel Veillardea048932003-10-21 09:27:57 +0000649txtOut += " Writer support: " + boolToStr(withWriter) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000650txtOut += " Walker support: " + boolToStr(withWalker) + "\n";
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000651txtOut += " Pattern support: " + boolToStr(withPattern) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000652txtOut += " Push support: " + boolToStr(withPush) + "\n";
653txtOut += "Validation support: " + boolToStr(withValid) + "\n";
654txtOut += " SAX1 support: " + boolToStr(withSax1) + "\n";
655txtOut += " Legacy support: " + boolToStr(withLegacy) + "\n";
656txtOut += " Output support: " + boolToStr(withOutput) + "\n";
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000657txtOut += "XML Schema support: " + boolToStr(withSchemas) + "\n";
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000658txtOut += "Schematron support: " + boolToStr(withSchematron) + "\n";
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000659txtOut += " Python bindings: " + boolToStr(withPython) + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000660txtOut += "\n";
661txtOut += "Win32 build configuration\n";
662txtOut += "-------------------------\n";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000663txtOut += " Compiler: " + compiler + "\n";
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000664if (compiler == "msvc")
665 txtOut += " C-Runtime option: " + cruntime + "\n";
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000666else if (compiler == "bcb")
667 txtOut += " Use dynamic RTL: " + dynruntime + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000668txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n";
669txtOut += " Static xmllint: " + boolToStr(buildStatic) + "\n";
670txtOut += " Install prefix: " + buildPrefix + "\n";
671txtOut += " Put tools in: " + buildBinPrefix + "\n";
672txtOut += " Put headers in: " + buildIncPrefix + "\n";
673txtOut += "Put static libs in: " + buildLibPrefix + "\n";
674txtOut += "Put shared libs in: " + buildSoPrefix + "\n";
675txtOut += " Include path: " + buildInclude + "\n";
676txtOut += " Lib path: " + buildLib + "\n";
677WScript.Echo(txtOut);
678
William M. Brack6d13f332003-08-08 16:40:36 +0000679//
680