/* Configure script for libxml, specific for Windows with Scripting Host. * * This script will configure the libxml build process and create necessary files. * Run it with an 'help', or an invalid option and it will tell you what options * it accepts. * * March 2002, Igor Zlatkovic */ /* The source directory, relative to the one where this file resides. */ var srcDirXml = ".."; var srcDirUtils = ".."; /* The directory where we put the binaries after compilation. */ var binDir = "binaries"; /* Base name of what we are building. */ var baseName = "libxml2"; /* Configure file which contains the version and the output file where we can store our build configuration. */ var configFile = srcDirXml + "\\configure.in"; var versionFile = ".\\configure.txt"; /* Input and output files regarding the libxml features. The second output file is there for the compatibility reasons, otherwise it is identical to the first. */ var optsFileIn = srcDirXml + "\\include\\libxml\\xmlversion.h.in"; var optsFile = srcDirXml + "\\include\\libxml\\xmlversion.h"; var optsFile2 = srcDirXml + "\\include\\libxml\\xmlwin32version.h"; /* Version strings for the binary distribution. Will be filled later in the code. */ var verMajor; var verMinor; var verMicro; /* Libxml features. */ var withTrio = false; var withThreads = false; var withFtp = true; var withHttp = true; var withHtml = true; var withC14n = true; var withCatalog = true; var withDocb = true; var withXpath = true; var withXptr = true; var withXinclude = true; var withIconv = true; var withZlib = false; var withDebug = true; var withMemDebug = false; var withSchemas = true; var withRegExps = true; /* Win32 build options. */ var buildDebug = 0; var buildStatic = 0; var buildPrefix = "."; var buildBinPrefix = "$(PREFIX)\\bin"; var buildIncPrefix = "$(PREFIX)\\include"; var buildLibPrefix = "$(PREFIX)\\lib"; var buildSoPrefix = "$(PREFIX)\\lib"; var buildInclude = "."; var buildLib = "."; /* Local stuff */ var error = 0; /* Helper function, transforms the option variable into the 'Enabled' or 'Disabled' string. */ function boolToStr(opt) { if (opt == false) return "Disabled"; else if (opt == true) return "Enabled"; error = 1; return "Undefined"; } /* Helper function, transforms the argument string into a boolean value. */ function strToBool(opt) { if (opt == 0 || opt == "no") return false; else if (opt == 1 || opt == "yes") return true; error = 1; return false; } /* Displays the details about how to use this script. */ function usage() { var txt; txt = "Usage:\n"; txt += " cscript " + WScript.ScriptName + " \n"; txt += " cscript " + WScript.ScriptName + " help\n\n"; txt += "Options can be specified in the form