blob: a7cf8370e6709c7d5391f582645d2ad9a80ba15b [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;
Rob Richards90ee8df2007-06-08 19:47:37 +000068var vcmanifest = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000069var buildDebug = 0;
70var buildStatic = 0;
71var buildPrefix = ".";
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +000072var buildBinPrefix = "";
73var buildIncPrefix = "";
74var buildLibPrefix = "";
75var buildSoPrefix = "";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000076var buildInclude = ".";
77var buildLib = ".";
78/* Local stuff */
79var error = 0;
80
81/* Helper function, transforms the option variable into the 'Enabled'
82 or 'Disabled' string. */
83function boolToStr(opt)
84{
85 if (opt == false)
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000086 return "no";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000087 else if (opt == true)
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000088 return "yes";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000089 error = 1;
Igor Zlatkovic8f536a82002-10-31 16:01:00 +000090 return "*** undefined ***";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +000091}
92
93/* Helper function, transforms the argument string into a boolean
94 value. */
95function strToBool(opt)
96{
97 if (opt == 0 || opt == "no")
98 return false;
99 else if (opt == 1 || opt == "yes")
100 return true;
101 error = 1;
102 return false;
103}
104
105/* Displays the details about how to use this script. */
106function usage()
107{
108 var txt;
109 txt = "Usage:\n";
110 txt += " cscript " + WScript.ScriptName + " <options>\n";
111 txt += " cscript " + WScript.ScriptName + " help\n\n";
112 txt += "Options can be specified in the form <option>=<value>, where the value is\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000113 txt += "either 'yes' or 'no', if not stated otherwise.\n\n";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000114 txt += "\nXML processor options, default value given in parentheses:\n\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000115 txt += " trio: Enable TRIO string manipulator (" + (withTrio? "yes" : "no") + ")\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000116 txt += " threads: Enable thread safety [no|ctls|native|posix] (" + (withThreads) + ") \n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000117 txt += " ftp: Enable FTP client (" + (withFtp? "yes" : "no") + ")\n";
118 txt += " http: Enable HTTP client (" + (withHttp? "yes" : "no") + ")\n";
119 txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n";
120 txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n";
121 txt += " catalog: Enable catalog support (" + (withCatalog? "yes" : "no") + ")\n";
122 txt += " docb: Enable DocBook support (" + (withDocb? "yes" : "no") + ")\n";
123 txt += " xpath: Enable XPath support (" + (withXpath? "yes" : "no") + ")\n";
124 txt += " xptr: Enable XPointer support (" + (withXptr? "yes" : "no") + ")\n";
125 txt += " xinclude: Enable XInclude support (" + (withXinclude? "yes" : "no") + ")\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000126 txt += " iconv: Enable iconv support (" + (withIconv? "yes" : "no") + ")\n";
William M. Brack6d13f332003-08-08 16:40:36 +0000127 txt += " iso8859x: Enable ISO8859X support (" + (withIso8859x? "yes" : "no") + ")\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000128 txt += " zlib: Enable zlib support (" + (withZlib? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000129 txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n";
130 txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" : "no") + ")\n";
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000131 txt += " run_debug: Enable memory debugger (" + (withRunDebug? "yes" : "no") + ")\n";
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000132 txt += " regexps: Enable regular expressions (" + (withRegExps? "yes" : "no") + ")\n";
Daniel Veillardce1648b2005-01-04 15:10:22 +0000133 txt += " modules: Enable module support (" + (withModules? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000134 txt += " tree: Enable tree api (" + (withTree? "yes" : "no") + ")\n";
135 txt += " reader: Enable xmlReader api (" + (withReader? "yes" : "no") + ")\n";
Daniel Veillardea048932003-10-21 09:27:57 +0000136 txt += " writer: Enable xmlWriter api (" + (withWriter? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000137 txt += " walker: Enable xmlDocWalker api (" + (withWalker? "yes" : "no") + ")\n";
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000138 txt += " pattern: Enable xmlPattern api (" + (withPattern? "yes" : "no") + ")\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000139 txt += " push: Enable push api (" + (withPush? "yes" : "no") + ")\n";
140 txt += " valid: Enable DTD validation support (" + (withValid? "yes" : "no") + ")\n";
141 txt += " sax1: Enable SAX1 api (" + (withSax1? "yes" : "no") + ")\n";
142 txt += " legacy: Enable Deprecated api's (" + (withLegacy? "yes" : "no") + ")\n";
143 txt += " output: Enable serialization support (" + (withOutput? "yes" : "no") + ")\n";
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000144 txt += " schemas: Enable XML Schema support (" + (withSchemas? "yes" : "no") + ")\n";
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000145 txt += " schematron: Enable Schematron support (" + (withSchematron? "yes" : "no") + ")\n";
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000146 txt += " python: Build Python bindings (" + (withPython? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000147 txt += "\nWin32 build options, default value given in parentheses:\n\n";
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000148 txt += " compiler: Compiler to be used [msvc|mingw|bcb] (" + compiler + ")\n";
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000149 txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000150 txt += " dynruntime: Use the dynamic RTL (only bcb) (" + dynruntime + ")\n";
Rob Richards90ee8df2007-06-08 19:47:37 +0000151 txt += " vcmanifest: Embed VC manifest (only msvc) (" + (vcmanifest? "yes" : "no") + ")\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000152 txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n";
153 txt += " static: Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no") + ")\n";
Daniel Veillard53516952005-01-27 23:59:14 +0000154 txt += " Note: automatically enabled if cruntime is not /MD or /MDd\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000155 txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n";
156 txt += " bindir: Directory where xmllint and friends should be installed\n";
157 txt += " (" + buildBinPrefix + ")\n";
158 txt += " incdir: Directory where headers should be installed\n";
159 txt += " (" + buildIncPrefix + ")\n";
160 txt += " libdir: Directory where static and import libraries should be\n";
161 txt += " installed (" + buildLibPrefix + ")\n";
162 txt += " sodir: Directory where shared libraries should be installed\n";
163 txt += " (" + buildSoPrefix + ")\n";
164 txt += " include: Additional search path for the compiler, particularily\n";
165 txt += " where iconv headers can be found (" + buildInclude + ")\n";
166 txt += " lib: Additional search path for the linker, particularily\n";
167 txt += " where iconv library can be found (" + buildLib + ")\n";
168 WScript.Echo(txt);
169}
170
171/* Discovers the version we are working with by reading the apropriate
172 configuration file. Despite its name, this also writes the configuration
173 file included by our makefile. */
174function discoverVersion()
175{
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000176 var fso, cf, vf, ln, s, iDot, iSlash;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000177 fso = new ActiveXObject("Scripting.FileSystemObject");
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000178 verCvs = "";
179 if (useCvsVer && fso.FileExists("..\\CVS\\Entries")) {
180 cf = fso.OpenTextFile("..\\CVS\\Entries", 1);
181 while (cf.AtEndOfStream != true) {
182 ln = cf.ReadLine();
183 s = new String(ln);
184 if (s.search(/^\/ChangeLog\//) != -1) {
185 iDot = s.indexOf(".");
186 iSlash = s.indexOf("/", iDot);
187 verCvs = "CVS" + s.substring(iDot + 1, iSlash);
188 break;
189 }
190 }
191 cf.Close();
192 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000193 cf = fso.OpenTextFile(configFile, 1);
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000194 if (compiler == "msvc")
195 versionFile = ".\\config.msvc";
196 else if (compiler == "mingw")
197 versionFile = ".\\config.mingw";
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000198 else if (compiler == "bcb")
199 versionFile = ".\\config.bcb";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000200 vf = fso.CreateTextFile(versionFile, true);
201 vf.WriteLine("# " + versionFile);
202 vf.WriteLine("# This file is generated automatically by " + WScript.ScriptName + ".");
203 vf.WriteBlankLines(1);
204 while (cf.AtEndOfStream != true) {
205 ln = cf.ReadLine();
206 s = new String(ln);
Daniel Veillard70b18562003-09-24 21:45:21 +0000207 if (s.search(/^LIBXML_MAJOR_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000208 vf.WriteLine(s);
209 verMajor = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000210 } else if(s.search(/^LIBXML_MINOR_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000211 vf.WriteLine(s);
212 verMinor = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000213 } else if(s.search(/^LIBXML_MICRO_VERSION=/) != -1) {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000214 vf.WriteLine(s);
215 verMicro = s.substring(s.indexOf("=") + 1, s.length)
Daniel Veillard70b18562003-09-24 21:45:21 +0000216 } else if(s.search(/^LIBXML_MICRO_VERSION_SUFFIX=/) != -1) {
217 vf.WriteLine(s);
218 verMicroSuffix = s.substring(s.indexOf("=") + 1, s.length)
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000219 }
220 }
221 cf.Close();
222 vf.WriteLine("XML_SRCDIR=" + srcDirXml);
223 vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000224 vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0"));
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000225 vf.WriteLine("WITH_THREADS=" + withThreads);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000226 vf.WriteLine("WITH_FTP=" + (withFtp? "1" : "0"));
227 vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0"));
228 vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0"));
229 vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0"));
230 vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0"));
231 vf.WriteLine("WITH_DOCB=" + (withDocb? "1" : "0"));
232 vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0"));
233 vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0"));
234 vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0"));
235 vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
William M. Brack6d13f332003-08-08 16:40:36 +0000236 vf.WriteLine("WITH_ISO8859X=" + (withIso8859x? "1" : "0"));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000237 vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000238 vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0"));
239 vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000240 vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0"));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000241 vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0"));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000242 vf.WriteLine("WITH_SCHEMATRON=" + (withSchematron? "1" : "0"));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000243 vf.WriteLine("WITH_REGEXPS=" + (withRegExps? "1" : "0"));
Daniel Veillardce1648b2005-01-04 15:10:22 +0000244 vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000245 vf.WriteLine("WITH_TREE=" + (withTree? "1" : "0"));
246 vf.WriteLine("WITH_READER=" + (withReader? "1" : "0"));
Daniel Veillardea048932003-10-21 09:27:57 +0000247 vf.WriteLine("WITH_WRITER=" + (withWriter? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000248 vf.WriteLine("WITH_WALKER=" + (withWalker? "1" : "0"));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000249 vf.WriteLine("WITH_PATTERN=" + (withPattern? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000250 vf.WriteLine("WITH_PUSH=" + (withPush? "1" : "0"));
251 vf.WriteLine("WITH_VALID=" + (withValid? "1" : "0"));
252 vf.WriteLine("WITH_SAX1=" + (withSax1? "1" : "0"));
253 vf.WriteLine("WITH_LEGACY=" + (withLegacy? "1" : "0"));
254 vf.WriteLine("WITH_OUTPUT=" + (withOutput? "1" : "0"));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000255 vf.WriteLine("WITH_PYTHON=" + (withPython? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000256 vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
257 vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
258 vf.WriteLine("PREFIX=" + buildPrefix);
259 vf.WriteLine("BINPREFIX=" + buildBinPrefix);
260 vf.WriteLine("INCPREFIX=" + buildIncPrefix);
261 vf.WriteLine("LIBPREFIX=" + buildLibPrefix);
262 vf.WriteLine("SOPREFIX=" + buildSoPrefix);
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000263 if (compiler == "msvc") {
264 vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude);
265 vf.WriteLine("LIB=$(LIB);" + buildLib);
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000266 vf.WriteLine("CRUNTIME=" + cruntime);
Rob Richards90ee8df2007-06-08 19:47:37 +0000267 vf.WriteLine("VCMANIFEST=" + (vcmanifest? "1" : "0"));
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000268 } else if (compiler == "mingw") {
269 vf.WriteLine("INCLUDE+=;" + buildInclude);
270 vf.WriteLine("LIB+=;" + buildLib);
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000271 } else if (compiler == "bcb") {
272 vf.WriteLine("INCLUDE=" + buildInclude);
273 vf.WriteLine("LIB=" + buildLib);
Rob Richards90ee8df2007-06-08 19:47:37 +0000274 vf.WriteLine("DYNRUNTIME=" + (dynruntime? "1" : "0"));
Igor Zlatkovic72f92a82003-06-14 16:48:26 +0000275 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000276 vf.Close();
277}
278
279/* Configures libxml. This one will generate xmlversion.h from xmlversion.h.in
280 taking what the user passed on the command line into account. */
281function configureLibxml()
282{
283 var fso, ofi, of, ln, s;
284 fso = new ActiveXObject("Scripting.FileSystemObject");
285 ofi = fso.OpenTextFile(optsFileIn, 1);
286 of = fso.CreateTextFile(optsFile, true);
287 while (ofi.AtEndOfStream != true) {
288 ln = ofi.ReadLine();
289 s = new String(ln);
290 if (s.search(/\@VERSION\@/) != -1) {
291 of.WriteLine(s.replace(/\@VERSION\@/,
Daniel Veillard70b18562003-09-24 21:45:21 +0000292 verMajor + "." + verMinor + "." + verMicro + verMicroSuffix));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000293 } else if (s.search(/\@LIBXML_VERSION_NUMBER\@/) != -1) {
294 of.WriteLine(s.replace(/\@LIBXML_VERSION_NUMBER\@/,
295 verMajor*10000 + verMinor*100 + verMicro*1));
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000296 } else if (s.search(/\@LIBXML_VERSION_EXTRA\@/) != -1) {
297 of.WriteLine(s.replace(/\@LIBXML_VERSION_EXTRA\@/, verCvs));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000298 } else if (s.search(/\@WITH_TRIO\@/) != -1) {
299 of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
300 } else if (s.search(/\@WITH_THREADS\@/) != -1) {
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000301 of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000302 } else if (s.search(/\@WITH_FTP\@/) != -1) {
303 of.WriteLine(s.replace(/\@WITH_FTP\@/, withFtp? "1" : "0"));
304 } else if (s.search(/\@WITH_HTTP\@/) != -1) {
305 of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0"));
306 } else if (s.search(/\@WITH_HTML\@/) != -1) {
307 of.WriteLine(s.replace(/\@WITH_HTML\@/, withHtml? "1" : "0"));
308 } else if (s.search(/\@WITH_C14N\@/) != -1) {
309 of.WriteLine(s.replace(/\@WITH_C14N\@/, withC14n? "1" : "0"));
310 } else if (s.search(/\@WITH_CATALOG\@/) != -1) {
311 of.WriteLine(s.replace(/\@WITH_CATALOG\@/, withCatalog? "1" : "0"));
312 } else if (s.search(/\@WITH_DOCB\@/) != -1) {
313 of.WriteLine(s.replace(/\@WITH_DOCB\@/, withDocb? "1" : "0"));
314 } else if (s.search(/\@WITH_XPATH\@/) != -1) {
315 of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0"));
316 } else if (s.search(/\@WITH_XPTR\@/) != -1) {
317 of.WriteLine(s.replace(/\@WITH_XPTR\@/, withXptr? "1" : "0"));
318 } else if (s.search(/\@WITH_XINCLUDE\@/) != -1) {
319 of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0"));
320 } else if (s.search(/\@WITH_ICONV\@/) != -1) {
321 of.WriteLine(s.replace(/\@WITH_ICONV\@/, withIconv? "1" : "0"));
William M. Brack6d13f332003-08-08 16:40:36 +0000322 } else if (s.search(/\@WITH_ISO8859X\@/) != -1) {
323 of.WriteLine(s.replace(/\@WITH_ISO8859X\@/, withIso8859x? "1" : "0"));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000324 } else if (s.search(/\@WITH_ZLIB\@/) != -1) {
325 of.WriteLine(s.replace(/\@WITH_ZLIB\@/, withZlib? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000326 } else if (s.search(/\@WITH_DEBUG\@/) != -1) {
327 of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0"));
328 } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
329 of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000330 } else if (s.search(/\@WITH_RUN_DEBUG\@/) != -1) {
331 of.WriteLine(s.replace(/\@WITH_RUN_DEBUG\@/, withRunDebug? "1" : "0"));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000332 } else if (s.search(/\@WITH_SCHEMAS\@/) != -1) {
333 of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0"));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000334 } else if (s.search(/\@WITH_SCHEMATRON\@/) != -1) {
335 of.WriteLine(s.replace(/\@WITH_SCHEMATRON\@/, withSchematron? "1" : "0"));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000336 } else if (s.search(/\@WITH_REGEXPS\@/) != -1) {
337 of.WriteLine(s.replace(/\@WITH_REGEXPS\@/, withRegExps? "1" : "0"));
Daniel Veillardce1648b2005-01-04 15:10:22 +0000338 } else if (s.search(/\@WITH_MODULES\@/) != -1) {
339 of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
340 } else if (s.search(/\@MODULE_EXTENSION\@/) != -1) {
341 of.WriteLine(s.replace(/\@MODULE_EXTENSION\@/, ".dll"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000342 } else if (s.search(/\@WITH_TREE\@/) != -1) {
343 of.WriteLine(s.replace(/\@WITH_TREE\@/, withTree? "1" : "0"));
344 } else if (s.search(/\@WITH_READER\@/) != -1) {
345 of.WriteLine(s.replace(/\@WITH_READER\@/, withReader? "1" : "0"));
Daniel Veillardea048932003-10-21 09:27:57 +0000346 } else if (s.search(/\@WITH_WRITER\@/) != -1) {
347 of.WriteLine(s.replace(/\@WITH_WRITER\@/, withWriter? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000348 } else if (s.search(/\@WITH_WALKER\@/) != -1) {
349 of.WriteLine(s.replace(/\@WITH_WALKER\@/, withWalker? "1" : "0"));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000350 } else if (s.search(/\@WITH_PATTERN\@/) != -1) {
351 of.WriteLine(s.replace(/\@WITH_PATTERN\@/, withPattern? "1" : "0"));
Daniel Veillard141310a2003-10-06 08:47:56 +0000352 } else if (s.search(/\@WITH_PUSH\@/) != -1) {
353 of.WriteLine(s.replace(/\@WITH_PUSH\@/, withPush? "1" : "0"));
354 } else if (s.search(/\@WITH_VALID\@/) != -1) {
355 of.WriteLine(s.replace(/\@WITH_VALID\@/, withValid? "1" : "0"));
356 } else if (s.search(/\@WITH_SAX1\@/) != -1) {
357 of.WriteLine(s.replace(/\@WITH_SAX1\@/, withSax1? "1" : "0"));
358 } else if (s.search(/\@WITH_LEGACY\@/) != -1) {
359 of.WriteLine(s.replace(/\@WITH_LEGACY\@/, withLegacy? "1" : "0"));
360 } else if (s.search(/\@WITH_OUTPUT\@/) != -1) {
361 of.WriteLine(s.replace(/\@WITH_OUTPUT\@/, withOutput? "1" : "0"));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000362 } else
363 of.WriteLine(ln);
364 }
365 ofi.Close();
366 of.Close();
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000367}
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000368/* Configures Python bindings. Otherwise identical to the above */
369function configureLibxmlPy()
370{
371 var pyOptsFileIn = srcDirXml + "\\python\\setup.py.in";
372 var pyOptsFile = srcDirXml + "\\python\\setup.py";
373 var fso, ofi, of, ln, s;
374 fso = new ActiveXObject("Scripting.FileSystemObject");
375 ofi = fso.OpenTextFile(pyOptsFileIn, 1);
376 of = fso.CreateTextFile(pyOptsFile, true);
377 while (ofi.AtEndOfStream != true) {
378 ln = ofi.ReadLine();
379 s = new String(ln);
380 if (s.search(/\@LIBXML_VERSION\@/) != -1) {
381 of.WriteLine(s.replace(/\@LIBXML_VERSION\@/,
382 verMajor + "." + verMinor + "." + verMicro));
383 } else if (s.search(/\@prefix\@/) != -1) {
384 of.WriteLine(s.replace(/\@prefix\@/, buildPrefix));
Daniel Veillard94bb2f12003-04-27 22:14:07 +0000385 } else if (s.search(/\@WITH_THREADS\@/) != -1) {
386 of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000387 } else
388 of.WriteLine(ln);
389 }
390 ofi.Close();
391 of.Close();
392}
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000393
394/* Creates the readme file for the binary distribution of 'bname', for the
395 version 'ver' in the file 'file'. This one is called from the Makefile when
396 generating a binary distribution. The parameters are passed by make. */
397function genReadme(bname, ver, file)
398{
399 var fso, f;
400 fso = new ActiveXObject("Scripting.FileSystemObject");
401 f = fso.CreateTextFile(file, true);
402 f.WriteLine(" " + bname + " " + ver);
403 f.WriteLine(" --------------");
404 f.WriteBlankLines(1);
405 f.WriteLine(" This is " + bname + ", version " + ver + ", binary package for the native Win32/IA32");
406 f.WriteLine("platform.");
407 f.WriteBlankLines(1);
Igor Zlatkovic72c28582004-06-09 14:32:47 +0000408 f.WriteLine(" The files in this package do not require any special installation");
409 f.WriteLine("steps. Extract the contents of the archive whereever you wish and");
410 f.WriteLine("make sure that your tools which use " + bname + " can find it.");
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000411 f.WriteBlankLines(1);
Igor Zlatkovic72c28582004-06-09 14:32:47 +0000412 f.WriteLine(" For example, if you want to run the supplied utilities from the command");
413 f.WriteLine("line, you can, if you wish, add the 'bin' subdirectory to the PATH");
414 f.WriteLine("environment variable.");
415 f.WriteLine(" If you want to make programmes in C which use " + bname + ", you'll");
416 f.WriteLine("likely know how to use the contents of this package. If you don't, please");
417 f.WriteLine("refer to your compiler's documentation.");
Igor Zlatkovic0ceeb8e2002-09-10 19:07:02 +0000418 f.WriteBlankLines(1);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000419 f.WriteLine(" If there is something you cannot keep for yourself, such as a problem,");
420 f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using");
421 f.WriteLine("the address below.");
422 f.WriteBlankLines(1);
Daniel Veillardbeb70bd2002-12-18 14:53:54 +0000423 f.WriteLine(" Igor Zlatkovic (igor@zlatkovic.com)");
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000424 f.Close();
425}
426
William M. Brack6d13f332003-08-08 16:40:36 +0000427
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000428/*
429 * main(),
430 * Execution begins here.
431 */
432
433// Parse the command-line arguments.
434for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
435 var arg, opt;
436 arg = WScript.Arguments(i);
437 opt = arg.substring(0, arg.indexOf("="));
438 if (opt.length == 0)
439 opt = arg.substring(0, arg.indexOf(":"));
440 if (opt.length > 0) {
441 if (opt == "trio")
442 withTrio = strToBool(arg.substring(opt.length + 1, arg.length));
443 else if (opt == "threads")
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000444 withThreads = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000445 else if (opt == "ftp")
446 withFtp = strToBool(arg.substring(opt.length + 1, arg.length));
447 else if (opt == "http")
448 withHttp = strToBool(arg.substring(opt.length + 1, arg.length));
449 else if (opt == "html")
450 withHtml = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic9425ce22002-04-10 21:57:11 +0000451 else if (opt == "c14n")
452 withC14n = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000453 else if (opt == "catalog")
454 withCatalog = strToBool(arg.substring(opt.length + 1, arg.length));
455 else if (opt == "docb")
456 withDocb = strToBool(arg.substring(opt.length + 1, arg.length));
457 else if (opt == "xpath")
458 withXpath = strToBool(arg.substring(opt.length + 1, arg.length));
459 else if (opt == "xptr")
460 withXptr = strToBool(arg.substring(opt.length + 1, arg.length));
461 else if (opt == "xinclude")
462 withXinclude = strToBool(arg.substring(opt.length + 1, arg.length));
463 else if (opt == "iconv")
464 withIconv = strToBool(arg.substring(opt.length + 1, arg.length));
William M. Brack6d13f332003-08-08 16:40:36 +0000465 else if (opt == "iso8859x")
466 withIso8859x = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000467 else if (opt == "zlib")
468 withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000469 else if (opt == "xml_debug")
470 withDebug = strToBool(arg.substring(opt.length + 1, arg.length));
471 else if (opt == "mem_debug")
472 withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000473 else if (opt == "run_debug")
474 withRunDebug = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000475 else if (opt == "schemas")
476 withSchemas = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000477 else if (opt == "schematron")
478 withSchematron = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000479 else if (opt == "regexps")
480 withRegExps = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillardc2aa6152005-08-02 11:27:54 +0000481 else if (opt == "modules")
482 withModules = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000483 else if (opt == "tree")
484 withTree = strToBool(arg.substring(opt.length + 1, arg.length));
485 else if (opt == "reader")
486 withReader = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillardea048932003-10-21 09:27:57 +0000487 else if (opt == "writer")
488 withWriter = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000489 else if (opt == "walker")
490 withWalker = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000491 else if (opt == "pattern")
492 withPattern = strToBool(arg.substring(opt.length + 1, arg.length));
Daniel Veillard141310a2003-10-06 08:47:56 +0000493 else if (opt == "push")
494 withPush = strToBool(arg.substring(opt.length + 1, arg.length));
495 else if (opt == "valid")
496 withValid = strToBool(arg.substring(opt.length + 1, arg.length));
497 else if (opt == "sax1")
498 withSax1 = strToBool(arg.substring(opt.length + 1, arg.length));
499 else if (opt == "legacy")
500 withLegacy = strToBool(arg.substring(opt.length + 1, arg.length));
501 else if (opt == "output")
502 withOutput = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000503 else if (opt == "python")
504 withPython = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000505 else if (opt == "compiler")
506 compiler = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000507 else if (opt == "cruntime")
508 cruntime = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000509 else if (opt == "dynruntime")
510 dynruntime = strToBool(arg.substring(opt.length + 1, arg.length));
Rob Richards90ee8df2007-06-08 19:47:37 +0000511 else if (opt == "vcmanifest")
512 vcmanifest = strToBool(arg.substring(opt.length + 1, arg.length));
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000513 else if (opt == "debug")
514 buildDebug = strToBool(arg.substring(opt.length + 1, arg.length));
515 else if (opt == "static")
516 buildStatic = strToBool(arg.substring(opt.length + 1, arg.length));
517 else if (opt == "prefix")
518 buildPrefix = arg.substring(opt.length + 1, arg.length);
519 else if (opt == "incdir")
520 buildIncPrefix = arg.substring(opt.length + 1, arg.length);
521 else if (opt == "bindir")
522 buildBinPrefix = arg.substring(opt.length + 1, arg.length);
523 else if (opt == "libdir")
524 buildLibPrefix = arg.substring(opt.length + 1, arg.length);
525 else if (opt == "sodir")
526 buildSoPrefix = arg.substring(opt.length + 1, arg.length);
527 else if (opt == "incdir")
528 buildIncPrefix = arg.substring(opt.length + 1, arg.length);
529 else if (opt == "include")
530 buildInclude = arg.substring(opt.length + 1, arg.length);
531 else if (opt == "lib")
532 buildLib = arg.substring(opt.length + 1, arg.length);
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000533 else if (opt == "release")
534 useCvsVer = false;
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000535 else
536 error = 1;
537 } else if (i == 0) {
538 if (arg == "genreadme") {
539 // This command comes from the Makefile and will not be checked
540 // for errors, because Makefile will always supply right the parameters.
541 genReadme(WScript.Arguments(1), WScript.Arguments(2), WScript.Arguments(3));
542 WScript.Quit(0);
543 } else if (arg == "help") {
544 usage();
545 WScript.Quit(0);
546 }
William M. Brack6d13f332003-08-08 16:40:36 +0000547
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000548 } else {
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000549 error = 1;
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000550 }
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000551}
552
William M. Brack6d13f332003-08-08 16:40:36 +0000553
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000554// If we fail here, it is because the user supplied an unrecognised argument.
555if (error != 0) {
556 usage();
557 WScript.Quit(error);
558}
Daniel Veillard53516952005-01-27 23:59:14 +0000559
560// if user choses to link the c-runtime library statically into libxml2
561// with /MT and friends, then we need to enable static linking for xmllint
562if (cruntime == "/MT" || cruntime == "/MTd" ||
563 cruntime == "/ML" || cruntime == "/MLd") {
564 buildStatic = 1;
565}
566
Igor Zlatkovic01c0ced2003-08-28 10:49:25 +0000567dirSep = "\\";
568if (compiler == "mingw")
569 dirSep = "/";
570if (buildBinPrefix == "")
571 buildBinPrefix = "$(PREFIX)" + dirSep + "bin";
572if (buildIncPrefix == "")
573 buildIncPrefix = "$(PREFIX)" + dirSep + "include";
574if (buildLibPrefix == "")
575 buildLibPrefix = "$(PREFIX)" + dirSep + "lib";
576if (buildSoPrefix == "")
577 buildSoPrefix = "$(PREFIX)" + dirSep + "lib";
William M. Brack6d13f332003-08-08 16:40:36 +0000578
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000579// Discover the version.
580discoverVersion();
581if (error != 0) {
582 WScript.Echo("Version discovery failed, aborting.");
583 WScript.Quit(error);
584}
William M. Brack6d13f332003-08-08 16:40:36 +0000585
Igor Zlatkovic8ea667f2004-08-24 14:42:29 +0000586var outVerString = baseName + " version: " + verMajor + "." + verMinor + "." + verMicro;
587if (verMicroSuffix && verMicroSuffix != "")
588 outVerString += "-" + verMicroSuffix;
589if (verCvs && verCvs != "")
590 outVerString += "-" + verCvs;
591WScript.Echo(outVerString);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000592
593// Configure libxml.
594configureLibxml();
595if (error != 0) {
596 WScript.Echo("Configuration failed, aborting.");
597 WScript.Quit(error);
598}
William M. Brack6d13f332003-08-08 16:40:36 +0000599
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000600if (withPython == true) {
601 configureLibxmlPy();
602 if (error != 0) {
603 WScript.Echo("Configuration failed, aborting.");
604 WScript.Quit(error);
605 }
William M. Brack6d13f332003-08-08 16:40:36 +0000606
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000607}
608
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000609// Create the makefile.
610var fso = new ActiveXObject("Scripting.FileSystemObject");
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000611var makefile = ".\\Makefile.msvc";
612if (compiler == "mingw")
613 makefile = ".\\Makefile.mingw";
Igor Zlatkovice8b5b0f2003-06-16 07:12:50 +0000614else if (compiler == "bcb")
615 makefile = ".\\Makefile.bcb";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000616fso.CopyFile(makefile, ".\\Makefile", true);
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000617WScript.Echo("Created Makefile.");
Igor Zlatkovic1bab92d2003-08-28 10:24:40 +0000618// Create the config.h.
619var confighsrc = "..\\include\\win32config.h";
620var configh = "..\\config.h";
Daniel Veillard6b9d6952003-11-05 09:50:55 +0000621var f = fso.FileExists(configh);
622if (f) {
623 var t = fso.GetFile(configh);
624 t.Attributes =0;
625}
Igor Zlatkovic1bab92d2003-08-28 10:24:40 +0000626fso.CopyFile(confighsrc, configh, true);
627WScript.Echo("Created config.h.");
628
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000629
630// Display the final configuration.
631var txtOut = "\nXML processor configuration\n";
632txtOut += "---------------------------\n";
633txtOut += " Trio: " + boolToStr(withTrio) + "\n";
Igor Zlatkovic8f536a82002-10-31 16:01:00 +0000634txtOut += " Thread safety: " + withThreads + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000635txtOut += " FTP client: " + boolToStr(withFtp) + "\n";
636txtOut += " HTTP client: " + boolToStr(withHttp) + "\n";
637txtOut += " HTML processor: " + boolToStr(withHtml) + "\n";
638txtOut += " C14N support: " + boolToStr(withC14n) + "\n";
639txtOut += " Catalog support: " + boolToStr(withCatalog) + "\n";
640txtOut += " DocBook support: " + boolToStr(withDocb) + "\n";
641txtOut += " XPath support: " + boolToStr(withXpath) + "\n";
642txtOut += " XPointer support: " + boolToStr(withXptr) + "\n";
643txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000644txtOut += " iconv support: " + boolToStr(withIconv) + "\n";
William M. Brack6d13f332003-08-08 16:40:36 +0000645txtOut += " iso8859x support: " + boolToStr(withIso8859x) + "\n";
Igor Zlatkovic3acadf42002-09-20 16:40:17 +0000646txtOut += " zlib support: " + boolToStr(withZlib) + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000647txtOut += " Debugging module: " + boolToStr(withDebug) + "\n";
648txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n";
Kasimier T. Buchcik4a113f92005-12-14 17:43:03 +0000649txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n";
Igor Zlatkovic8e040972002-09-20 13:39:53 +0000650txtOut += " Regexp support: " + boolToStr(withRegExps) + "\n";
Daniel Veillardce1648b2005-01-04 15:10:22 +0000651txtOut += " Module support: " + boolToStr(withModules) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000652txtOut += " Tree support: " + boolToStr(withTree) + "\n";
653txtOut += " Reader support: " + boolToStr(withReader) + "\n";
Daniel Veillardea048932003-10-21 09:27:57 +0000654txtOut += " Writer support: " + boolToStr(withWriter) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000655txtOut += " Walker support: " + boolToStr(withWalker) + "\n";
Igor Zlatkovicc5a29ca2003-12-11 13:56:54 +0000656txtOut += " Pattern support: " + boolToStr(withPattern) + "\n";
Daniel Veillard141310a2003-10-06 08:47:56 +0000657txtOut += " Push support: " + boolToStr(withPush) + "\n";
658txtOut += "Validation support: " + boolToStr(withValid) + "\n";
659txtOut += " SAX1 support: " + boolToStr(withSax1) + "\n";
660txtOut += " Legacy support: " + boolToStr(withLegacy) + "\n";
661txtOut += " Output support: " + boolToStr(withOutput) + "\n";
Igor Zlatkovica6f2d902002-04-16 17:57:17 +0000662txtOut += "XML Schema support: " + boolToStr(withSchemas) + "\n";
Daniel Veillard5fe95a82005-07-31 14:05:18 +0000663txtOut += "Schematron support: " + boolToStr(withSchematron) + "\n";
Igor Zlatkovic853514f2002-11-22 21:41:09 +0000664txtOut += " Python bindings: " + boolToStr(withPython) + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000665txtOut += "\n";
666txtOut += "Win32 build configuration\n";
667txtOut += "-------------------------\n";
Igor Zlatkovicbd1a3062002-11-14 17:43:24 +0000668txtOut += " Compiler: " + compiler + "\n";
Rob Richards90ee8df2007-06-08 19:47:37 +0000669if (compiler == "msvc") {
Igor Zlatkovic4f928212003-11-27 18:39:01 +0000670 txtOut += " C-Runtime option: " + cruntime + "\n";
Rob Richards90ee8df2007-06-08 19:47:37 +0000671 txtOut += " Embed Manifest: " + boolToStr(vcmanifest) + "\n";
672} else if (compiler == "bcb")
Igor Zlatkovicc7646e62003-12-01 11:33:27 +0000673 txtOut += " Use dynamic RTL: " + dynruntime + "\n";
Igor Zlatkovicac97f6e2002-03-24 21:00:26 +0000674txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n";
675txtOut += " Static xmllint: " + boolToStr(buildStatic) + "\n";
676txtOut += " Install prefix: " + buildPrefix + "\n";
677txtOut += " Put tools in: " + buildBinPrefix + "\n";
678txtOut += " Put headers in: " + buildIncPrefix + "\n";
679txtOut += "Put static libs in: " + buildLibPrefix + "\n";
680txtOut += "Put shared libs in: " + buildSoPrefix + "\n";
681txtOut += " Include path: " + buildInclude + "\n";
682txtOut += " Lib path: " + buildLib + "\n";
683WScript.Echo(txtOut);
684
William M. Brack6d13f332003-08-08 16:40:36 +0000685//
686