/* Configure script for xmlsec, specific for Windows with Scripting Host. * * This script will configure the libxmlsec 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 * Created for LibXML and LibXSLT * April 2002, Aleksey Sanin * Modified for XMLSec Libary */ /* The source directory, relative to the one where this file resides. */ var baseDir = ".."; var srcDir = baseDir + "\\src"; var srcDirApps = baseDir + "\\apps"; /* The directory where we put the binaries after compilation. */ var binDir = "binaries"; /* Base name of what we are building. */ var baseName = "libxmlsec"; /* Configure file which contains the version and the output file where we can store our build configuration. */ var configFile = baseDir + "\\configure.in"; var versionFile = ".\\configure.txt"; /* 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 optsFileIn = baseDir + "\\config.h.in"; var optsFile = baseDir + "\\config.h"; /* Version strings for the binary distribution. Will be filled later in the code. */ var verMajorXmlSec; var verMinorXmlSec; var verMicroXmlSec; /* Libxmlsec features. */ var withCrypto = "openssl"; var withDefaultCrypto = "openssl"; var withOpenSSL = 0; var withOpenSSLVersion = ""; var withNss = 0; var withMSCrypto = 0; var withLibXSLT = 1; var withIconv = 1; var withNT4 = 1; /* Win32 build options. */ var buildUnicode = 1; var buildDebug = 0; var buildStatic = 1; var buildWithDLSupport = 1; 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 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