/* Configure script for libxslt, specific for Windows with Scripting Host. * * This script will configure the libxslt 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 baseDir = ".."; var srcDirXslt = baseDir + "\\libxslt"; var srcDirExslt = baseDir + "\\libexslt"; var srcDirUtils = baseDir + "\\xsltproc"; /* The directory where we put the binaries after compilation. */ var binDir = "binaries"; /* Base name of what we are building. */ var baseNameXslt = "libxslt"; var baseNameExslt = "libexslt"; /* Configure file which contains the version and the output file where we can store our build configuration. */ var configFile = baseDir + "\\configure.in"; var versionFile = ".\\config.msvc"; /* Input and output files regarding the lib(e)xml features. The second output file is there for the compatibility reasons, otherwise it is identical to the first. */ var optsFileInXslt = srcDirXslt + "\\xsltconfig.h.in"; var optsFileXslt = srcDirXslt + "\\xsltconfig.h"; var optsFileInExslt = srcDirExslt + "\\exsltconfig.h.in"; var optsFileExslt = srcDirExslt + "\\exsltconfig.h"; /* Version strings for the binary distribution. Will be filled later in the code. */ var verMajorXslt; var verMinorXslt; var verMicroXslt; var verMajorExslt; var verMinorExslt; var verMicroExslt; var verCvs; var useCvsVer = true; /* Libxslt features. */ var withTrio = false; var withXsltDebug = true; var withMemDebug = false; var withDebugger = true; var withIconv = true; var withZlib = false; var withCrypto = true; var withModules = false; var withLocale = true; /* Win32 build options. */ var dirSep = "\\"; var compiler = "msvc"; var cruntime = "/MD"; var vcmanifest = false; var buildDebug = 0; var buildStatic = 0; var buildPrefix = "."; var buildBinPrefix = ""; var buildIncPrefix = ""; var buildLibPrefix = ""; var buildSoPrefix = ""; 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 "no"; else if (opt == true) return "yes"; error = 1; return "*** undefined ***"; } /* Helper function, transforms the argument string into the 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