Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 1 | /* 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 | * |
| 7 | * March 2002, Igor Zlatkovic <igor@stud.fh-frankfurt.de> |
| 8 | */ |
| 9 | |
| 10 | /* The source directory, relative to the one where this file resides. */ |
| 11 | var srcDirXml = ".."; |
| 12 | var srcDirUtils = ".."; |
| 13 | /* The directory where we put the binaries after compilation. */ |
| 14 | var binDir = "binaries"; |
| 15 | /* Base name of what we are building. */ |
| 16 | var baseName = "libxml2"; |
| 17 | /* Configure file which contains the version and the output file where |
| 18 | we can store our build configuration. */ |
| 19 | var configFile = srcDirXml + "\\configure.in"; |
| 20 | var versionFile = ".\\configure.txt"; |
| 21 | /* Input and output files regarding the libxml features. The second |
| 22 | output file is there for the compatibility reasons, otherwise it |
| 23 | is identical to the first. */ |
| 24 | var optsFileIn = srcDirXml + "\\include\\libxml\\xmlversion.h.in"; |
| 25 | var optsFile = srcDirXml + "\\include\\libxml\\xmlversion.h"; |
| 26 | var optsFile2 = srcDirXml + "\\include\\libxml\\xmlwin32version.h"; |
| 27 | /* Version strings for the binary distribution. Will be filled later |
| 28 | in the code. */ |
| 29 | var verMajor; |
| 30 | var verMinor; |
| 31 | var verMicro; |
| 32 | /* Libxml features. */ |
| 33 | var withTrio = false; |
| 34 | var withThreads = false; |
| 35 | var withFtp = true; |
| 36 | var withHttp = true; |
| 37 | var withHtml = true; |
| 38 | var withC14n = true; |
| 39 | var withCatalog = true; |
| 40 | var withDocb = true; |
| 41 | var withXpath = true; |
| 42 | var withXptr = true; |
| 43 | var withXinclude = true; |
| 44 | var withIconv = true; |
| 45 | var withDebug = true; |
| 46 | var withMemDebug = false; |
Igor Zlatkovic | a6f2d90 | 2002-04-16 17:57:17 +0000 | [diff] [blame^] | 47 | var withSchemas = true; |
Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 48 | /* Win32 build options. */ |
| 49 | var buildDebug = 0; |
| 50 | var buildStatic = 0; |
| 51 | var buildPrefix = "."; |
| 52 | var buildBinPrefix = "$(PREFIX)\\bin"; |
| 53 | var buildIncPrefix = "$(PREFIX)\\include"; |
| 54 | var buildLibPrefix = "$(PREFIX)\\lib"; |
| 55 | var buildSoPrefix = "$(PREFIX)\\lib"; |
| 56 | var buildInclude = "."; |
| 57 | var buildLib = "."; |
| 58 | /* Local stuff */ |
| 59 | var error = 0; |
| 60 | |
| 61 | /* Helper function, transforms the option variable into the 'Enabled' |
| 62 | or 'Disabled' string. */ |
| 63 | function boolToStr(opt) |
| 64 | { |
| 65 | if (opt == false) |
| 66 | return "Disabled"; |
| 67 | else if (opt == true) |
| 68 | return "Enabled"; |
| 69 | error = 1; |
| 70 | return "Undefined"; |
| 71 | } |
| 72 | |
| 73 | /* Helper function, transforms the argument string into a boolean |
| 74 | value. */ |
| 75 | function strToBool(opt) |
| 76 | { |
| 77 | if (opt == 0 || opt == "no") |
| 78 | return false; |
| 79 | else if (opt == 1 || opt == "yes") |
| 80 | return true; |
| 81 | error = 1; |
| 82 | return false; |
| 83 | } |
| 84 | |
| 85 | /* Displays the details about how to use this script. */ |
| 86 | function usage() |
| 87 | { |
| 88 | var txt; |
| 89 | txt = "Usage:\n"; |
| 90 | txt += " cscript " + WScript.ScriptName + " <options>\n"; |
| 91 | txt += " cscript " + WScript.ScriptName + " help\n\n"; |
| 92 | txt += "Options can be specified in the form <option>=<value>, where the value is\n"; |
| 93 | txt += "either 'yes' or 'no'.\n\n"; |
| 94 | txt += "XML processor options, default value given in parentheses:\n\n"; |
| 95 | txt += " trio: Enable TRIO string manipulator (" + (withTrio? "yes" : "no") + ")\n"; |
| 96 | txt += " threads: Enable thread safety (" + (withThreads? "yes" : "no") + ") \n"; |
| 97 | txt += " ftp: Enable FTP client (" + (withFtp? "yes" : "no") + ")\n"; |
| 98 | txt += " http: Enable HTTP client (" + (withHttp? "yes" : "no") + ")\n"; |
| 99 | txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n"; |
| 100 | txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n"; |
| 101 | txt += " catalog: Enable catalog support (" + (withCatalog? "yes" : "no") + ")\n"; |
| 102 | txt += " docb: Enable DocBook support (" + (withDocb? "yes" : "no") + ")\n"; |
| 103 | txt += " xpath: Enable XPath support (" + (withXpath? "yes" : "no") + ")\n"; |
| 104 | txt += " xptr: Enable XPointer support (" + (withXptr? "yes" : "no") + ")\n"; |
| 105 | txt += " xinclude: Enable XInclude support (" + (withXinclude? "yes" : "no") + ")\n"; |
| 106 | txt += " iconv: Enable ICONV support (" + (withIconv? "yes" : "no") + ")\n"; |
| 107 | txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n"; |
| 108 | txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" : "no") + ")\n"; |
Igor Zlatkovic | a6f2d90 | 2002-04-16 17:57:17 +0000 | [diff] [blame^] | 109 | txt += " schemas: Enable XML Schema support (" + (withSchemas? "yes" : "no") + ")\n"; |
Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 110 | txt += "\nWin32 build options, default value given in parentheses:\n\n"; |
| 111 | txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n"; |
| 112 | txt += " static: Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no") + ")\n"; |
| 113 | txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n"; |
| 114 | txt += " bindir: Directory where xmllint and friends should be installed\n"; |
| 115 | txt += " (" + buildBinPrefix + ")\n"; |
| 116 | txt += " incdir: Directory where headers should be installed\n"; |
| 117 | txt += " (" + buildIncPrefix + ")\n"; |
| 118 | txt += " libdir: Directory where static and import libraries should be\n"; |
| 119 | txt += " installed (" + buildLibPrefix + ")\n"; |
| 120 | txt += " sodir: Directory where shared libraries should be installed\n"; |
| 121 | txt += " (" + buildSoPrefix + ")\n"; |
| 122 | txt += " include: Additional search path for the compiler, particularily\n"; |
| 123 | txt += " where iconv headers can be found (" + buildInclude + ")\n"; |
| 124 | txt += " lib: Additional search path for the linker, particularily\n"; |
| 125 | txt += " where iconv library can be found (" + buildLib + ")\n"; |
| 126 | WScript.Echo(txt); |
| 127 | } |
| 128 | |
| 129 | /* Discovers the version we are working with by reading the apropriate |
| 130 | configuration file. Despite its name, this also writes the configuration |
| 131 | file included by our makefile. */ |
| 132 | function discoverVersion() |
| 133 | { |
| 134 | var fso, cf, vf, ln, s; |
| 135 | fso = new ActiveXObject("Scripting.FileSystemObject"); |
| 136 | cf = fso.OpenTextFile(configFile, 1); |
| 137 | vf = fso.CreateTextFile(versionFile, true); |
| 138 | vf.WriteLine("# " + versionFile); |
| 139 | vf.WriteLine("# This file is generated automatically by " + WScript.ScriptName + "."); |
| 140 | vf.WriteBlankLines(1); |
| 141 | while (cf.AtEndOfStream != true) { |
| 142 | ln = cf.ReadLine(); |
| 143 | s = new String(ln); |
| 144 | if (s.search(/^LIBXML_MAJOR_VERSION/) != -1) { |
| 145 | vf.WriteLine(s); |
| 146 | verMajor = s.substring(s.indexOf("=") + 1, s.length) |
| 147 | } else if(s.search(/^LIBXML_MINOR_VERSION/) != -1) { |
| 148 | vf.WriteLine(s); |
| 149 | verMinor = s.substring(s.indexOf("=") + 1, s.length) |
| 150 | } else if(s.search(/^LIBXML_MICRO_VERSION/) != -1) { |
| 151 | vf.WriteLine(s); |
| 152 | verMicro = s.substring(s.indexOf("=") + 1, s.length) |
| 153 | } |
| 154 | } |
| 155 | cf.Close(); |
| 156 | vf.WriteLine("XML_SRCDIR=" + srcDirXml); |
| 157 | vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils); |
| 158 | vf.WriteLine("BINDIR=" + binDir); |
| 159 | vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0")); |
| 160 | vf.WriteLine("WITH_THREADS=" + (withThreads? "1" : "0")); |
| 161 | vf.WriteLine("WITH_FTP=" + (withFtp? "1" : "0")); |
| 162 | vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0")); |
| 163 | vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0")); |
| 164 | vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0")); |
| 165 | vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0")); |
| 166 | vf.WriteLine("WITH_DOCB=" + (withDocb? "1" : "0")); |
| 167 | vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0")); |
| 168 | vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0")); |
| 169 | vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0")); |
| 170 | vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0")); |
| 171 | vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0")); |
| 172 | vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0")); |
Igor Zlatkovic | a6f2d90 | 2002-04-16 17:57:17 +0000 | [diff] [blame^] | 173 | vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0")); |
Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 174 | vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0")); |
| 175 | vf.WriteLine("STATIC=" + (buildStatic? "1" : "0")); |
| 176 | vf.WriteLine("PREFIX=" + buildPrefix); |
| 177 | vf.WriteLine("BINPREFIX=" + buildBinPrefix); |
| 178 | vf.WriteLine("INCPREFIX=" + buildIncPrefix); |
| 179 | vf.WriteLine("LIBPREFIX=" + buildLibPrefix); |
| 180 | vf.WriteLine("SOPREFIX=" + buildSoPrefix); |
| 181 | vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude); |
| 182 | vf.WriteLine("LIB=$(LIB);" + buildLib); |
| 183 | vf.Close(); |
| 184 | } |
| 185 | |
| 186 | /* Configures libxml. This one will generate xmlversion.h from xmlversion.h.in |
| 187 | taking what the user passed on the command line into account. */ |
| 188 | function configureLibxml() |
| 189 | { |
| 190 | var fso, ofi, of, ln, s; |
| 191 | fso = new ActiveXObject("Scripting.FileSystemObject"); |
| 192 | ofi = fso.OpenTextFile(optsFileIn, 1); |
| 193 | of = fso.CreateTextFile(optsFile, true); |
| 194 | while (ofi.AtEndOfStream != true) { |
| 195 | ln = ofi.ReadLine(); |
| 196 | s = new String(ln); |
| 197 | if (s.search(/\@VERSION\@/) != -1) { |
| 198 | of.WriteLine(s.replace(/\@VERSION\@/, |
| 199 | verMajor + "." + verMinor + "." + verMicro)); |
| 200 | } else if (s.search(/\@LIBXML_VERSION_NUMBER\@/) != -1) { |
| 201 | of.WriteLine(s.replace(/\@LIBXML_VERSION_NUMBER\@/, |
| 202 | verMajor*10000 + verMinor*100 + verMicro*1)); |
| 203 | } else if (s.search(/\@WITH_TRIO\@/) != -1) { |
| 204 | of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0")); |
| 205 | } else if (s.search(/\@WITH_THREADS\@/) != -1) { |
| 206 | of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads? "1" : "0")); |
| 207 | } else if (s.search(/\@WITH_FTP\@/) != -1) { |
| 208 | of.WriteLine(s.replace(/\@WITH_FTP\@/, withFtp? "1" : "0")); |
| 209 | } else if (s.search(/\@WITH_HTTP\@/) != -1) { |
| 210 | of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0")); |
| 211 | } else if (s.search(/\@WITH_HTML\@/) != -1) { |
| 212 | of.WriteLine(s.replace(/\@WITH_HTML\@/, withHtml? "1" : "0")); |
| 213 | } else if (s.search(/\@WITH_C14N\@/) != -1) { |
| 214 | of.WriteLine(s.replace(/\@WITH_C14N\@/, withC14n? "1" : "0")); |
| 215 | } else if (s.search(/\@WITH_CATALOG\@/) != -1) { |
| 216 | of.WriteLine(s.replace(/\@WITH_CATALOG\@/, withCatalog? "1" : "0")); |
| 217 | } else if (s.search(/\@WITH_DOCB\@/) != -1) { |
| 218 | of.WriteLine(s.replace(/\@WITH_DOCB\@/, withDocb? "1" : "0")); |
| 219 | } else if (s.search(/\@WITH_XPATH\@/) != -1) { |
| 220 | of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0")); |
| 221 | } else if (s.search(/\@WITH_XPTR\@/) != -1) { |
| 222 | of.WriteLine(s.replace(/\@WITH_XPTR\@/, withXptr? "1" : "0")); |
| 223 | } else if (s.search(/\@WITH_XINCLUDE\@/) != -1) { |
| 224 | of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0")); |
| 225 | } else if (s.search(/\@WITH_ICONV\@/) != -1) { |
| 226 | of.WriteLine(s.replace(/\@WITH_ICONV\@/, withIconv? "1" : "0")); |
| 227 | } else if (s.search(/\@WITH_DEBUG\@/) != -1) { |
| 228 | of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0")); |
| 229 | } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) { |
| 230 | of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0")); |
Igor Zlatkovic | a6f2d90 | 2002-04-16 17:57:17 +0000 | [diff] [blame^] | 231 | } else if (s.search(/\@WITH_SCHEMAS\@/) != -1) { |
| 232 | of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0")); |
Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 233 | } else |
| 234 | of.WriteLine(ln); |
| 235 | } |
| 236 | ofi.Close(); |
| 237 | of.Close(); |
| 238 | fso.CopyFile(optsFile, optsFile2, true); |
| 239 | } |
| 240 | |
| 241 | /* Creates the readme file for the binary distribution of 'bname', for the |
| 242 | version 'ver' in the file 'file'. This one is called from the Makefile when |
| 243 | generating a binary distribution. The parameters are passed by make. */ |
| 244 | function genReadme(bname, ver, file) |
| 245 | { |
| 246 | var fso, f; |
| 247 | fso = new ActiveXObject("Scripting.FileSystemObject"); |
| 248 | f = fso.CreateTextFile(file, true); |
| 249 | f.WriteLine(" " + bname + " " + ver); |
| 250 | f.WriteLine(" --------------"); |
| 251 | f.WriteBlankLines(1); |
| 252 | f.WriteLine(" This is " + bname + ", version " + ver + ", binary package for the native Win32/IA32"); |
| 253 | f.WriteLine("platform."); |
| 254 | f.WriteBlankLines(1); |
| 255 | f.WriteLine(" The directory named 'include' contains the header files. Place its"); |
| 256 | f.WriteLine("contents somewhere where it can be found by the compiler."); |
| 257 | f.WriteLine(" The directory which answers to the name 'lib' contains the static and"); |
| 258 | f.WriteLine("dynamic libraries. Place them somewhere where they can be found by the"); |
| 259 | f.WriteLine("linker. The files whose names end with '_a.lib' are aimed for static"); |
| 260 | f.WriteLine("linking, the other files are lib/dll pairs."); |
| 261 | f.WriteLine(" The directory called 'util' contains various programs which count as a"); |
| 262 | f.WriteLine("part of " + bname + "."); |
| 263 | f.WriteBlankLines(1); |
| 264 | f.WriteLine(" If there is something you cannot keep for yourself, such as a problem,"); |
| 265 | f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using"); |
| 266 | f.WriteLine("the address below."); |
| 267 | f.WriteBlankLines(1); |
| 268 | f.WriteLine(" Igor Zlatkovic (igor@stud.fh-frankfurt.de)"); |
| 269 | f.Close(); |
| 270 | } |
| 271 | |
| 272 | /* |
| 273 | * main(), |
| 274 | * Execution begins here. |
| 275 | */ |
| 276 | |
| 277 | // Parse the command-line arguments. |
| 278 | for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { |
| 279 | var arg, opt; |
| 280 | arg = WScript.Arguments(i); |
| 281 | opt = arg.substring(0, arg.indexOf("=")); |
| 282 | if (opt.length == 0) |
| 283 | opt = arg.substring(0, arg.indexOf(":")); |
| 284 | if (opt.length > 0) { |
| 285 | if (opt == "trio") |
| 286 | withTrio = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 287 | else if (opt == "threads") |
| 288 | withThreads = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 289 | else if (opt == "ftp") |
| 290 | withFtp = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 291 | else if (opt == "http") |
| 292 | withHttp = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 293 | else if (opt == "html") |
| 294 | withHtml = strToBool(arg.substring(opt.length + 1, arg.length)); |
Igor Zlatkovic | 9425ce2 | 2002-04-10 21:57:11 +0000 | [diff] [blame] | 295 | else if (opt == "c14n") |
| 296 | withC14n = strToBool(arg.substring(opt.length + 1, arg.length)); |
Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 297 | else if (opt == "catalog") |
| 298 | withCatalog = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 299 | else if (opt == "docb") |
| 300 | withDocb = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 301 | else if (opt == "xpath") |
| 302 | withXpath = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 303 | else if (opt == "xptr") |
| 304 | withXptr = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 305 | else if (opt == "xinclude") |
| 306 | withXinclude = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 307 | else if (opt == "iconv") |
| 308 | withIconv = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 309 | else if (opt == "xml_debug") |
| 310 | withDebug = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 311 | else if (opt == "mem_debug") |
| 312 | withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length)); |
Igor Zlatkovic | a6f2d90 | 2002-04-16 17:57:17 +0000 | [diff] [blame^] | 313 | else if (opt == "schemas") |
| 314 | withSchemas = strToBool(arg.substring(opt.length + 1, arg.length)); |
Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 315 | else if (opt == "debug") |
| 316 | buildDebug = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 317 | else if (opt == "static") |
| 318 | buildStatic = strToBool(arg.substring(opt.length + 1, arg.length)); |
| 319 | else if (opt == "prefix") |
| 320 | buildPrefix = arg.substring(opt.length + 1, arg.length); |
| 321 | else if (opt == "incdir") |
| 322 | buildIncPrefix = arg.substring(opt.length + 1, arg.length); |
| 323 | else if (opt == "bindir") |
| 324 | buildBinPrefix = arg.substring(opt.length + 1, arg.length); |
| 325 | else if (opt == "libdir") |
| 326 | buildLibPrefix = arg.substring(opt.length + 1, arg.length); |
| 327 | else if (opt == "sodir") |
| 328 | buildSoPrefix = arg.substring(opt.length + 1, arg.length); |
| 329 | else if (opt == "incdir") |
| 330 | buildIncPrefix = arg.substring(opt.length + 1, arg.length); |
| 331 | else if (opt == "include") |
| 332 | buildInclude = arg.substring(opt.length + 1, arg.length); |
| 333 | else if (opt == "lib") |
| 334 | buildLib = arg.substring(opt.length + 1, arg.length); |
| 335 | else |
| 336 | error = 1; |
| 337 | } else if (i == 0) { |
| 338 | if (arg == "genreadme") { |
| 339 | // This command comes from the Makefile and will not be checked |
| 340 | // for errors, because Makefile will always supply right the parameters. |
| 341 | genReadme(WScript.Arguments(1), WScript.Arguments(2), WScript.Arguments(3)); |
| 342 | WScript.Quit(0); |
| 343 | } else if (arg == "help") { |
| 344 | usage(); |
| 345 | WScript.Quit(0); |
| 346 | } |
| 347 | } else |
| 348 | error = 1; |
| 349 | } |
| 350 | |
| 351 | // If we fail here, it is because the user supplied an unrecognised argument. |
| 352 | if (error != 0) { |
| 353 | usage(); |
| 354 | WScript.Quit(error); |
| 355 | } |
| 356 | |
| 357 | // Discover the version. |
| 358 | discoverVersion(); |
| 359 | if (error != 0) { |
| 360 | WScript.Echo("Version discovery failed, aborting."); |
| 361 | WScript.Quit(error); |
| 362 | } |
| 363 | WScript.Echo(baseName + " version: " + verMajor + "." + verMinor + "." + verMicro); |
| 364 | |
| 365 | // Configure libxml. |
| 366 | configureLibxml(); |
| 367 | if (error != 0) { |
| 368 | WScript.Echo("Configuration failed, aborting."); |
| 369 | WScript.Quit(error); |
| 370 | } |
| 371 | |
| 372 | // Create the makefile. |
| 373 | var fso = new ActiveXObject("Scripting.FileSystemObject"); |
| 374 | fso.CopyFile(".\\Makefile.msvc", ".\\Makefile", true); |
| 375 | WScript.Echo("Created Makefile."); |
| 376 | |
| 377 | // Display the final configuration. |
| 378 | var txtOut = "\nXML processor configuration\n"; |
| 379 | txtOut += "---------------------------\n"; |
| 380 | txtOut += " Trio: " + boolToStr(withTrio) + "\n"; |
| 381 | txtOut += " Thread safety: " + boolToStr(withThreads) + "\n"; |
| 382 | txtOut += " FTP client: " + boolToStr(withFtp) + "\n"; |
| 383 | txtOut += " HTTP client: " + boolToStr(withHttp) + "\n"; |
| 384 | txtOut += " HTML processor: " + boolToStr(withHtml) + "\n"; |
| 385 | txtOut += " C14N support: " + boolToStr(withC14n) + "\n"; |
| 386 | txtOut += " Catalog support: " + boolToStr(withCatalog) + "\n"; |
| 387 | txtOut += " DocBook support: " + boolToStr(withDocb) + "\n"; |
| 388 | txtOut += " XPath support: " + boolToStr(withXpath) + "\n"; |
| 389 | txtOut += " XPointer support: " + boolToStr(withXptr) + "\n"; |
| 390 | txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n"; |
| 391 | txtOut += " ICONV support: " + boolToStr(withIconv) + "\n"; |
| 392 | txtOut += " Debugging module: " + boolToStr(withDebug) + "\n"; |
| 393 | txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n"; |
Igor Zlatkovic | a6f2d90 | 2002-04-16 17:57:17 +0000 | [diff] [blame^] | 394 | txtOut += "XML Schema support: " + boolToStr(withSchemas) + "\n"; |
Igor Zlatkovic | ac97f6e | 2002-03-24 21:00:26 +0000 | [diff] [blame] | 395 | txtOut += "\n"; |
| 396 | txtOut += "Win32 build configuration\n"; |
| 397 | txtOut += "-------------------------\n"; |
| 398 | txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n"; |
| 399 | txtOut += " Static xmllint: " + boolToStr(buildStatic) + "\n"; |
| 400 | txtOut += " Install prefix: " + buildPrefix + "\n"; |
| 401 | txtOut += " Put tools in: " + buildBinPrefix + "\n"; |
| 402 | txtOut += " Put headers in: " + buildIncPrefix + "\n"; |
| 403 | txtOut += "Put static libs in: " + buildLibPrefix + "\n"; |
| 404 | txtOut += "Put shared libs in: " + buildSoPrefix + "\n"; |
| 405 | txtOut += " Include path: " + buildInclude + "\n"; |
| 406 | txtOut += " Lib path: " + buildLib + "\n"; |
| 407 | WScript.Echo(txtOut); |
| 408 | |
| 409 | // Done. |