| OLD | NEW |
| 1 /* Configure script for libxslt, specific for Windows with Scripting Host. | 1 /* Configure script for libxslt, specific for Windows with Scripting Host. |
| 2 * | 2 * |
| 3 * This script will configure the libxslt build process and create necessary fil
es. | 3 * This script will configure the libxslt build process and create necessary fil
es. |
| 4 * Run it with an 'help', or an invalid option and it will tell you what options | 4 * Run it with an 'help', or an invalid option and it will tell you what options |
| 5 * it accepts. | 5 * it accepts. |
| 6 * | 6 * |
| 7 * March 2002, Igor Zlatkovic <igor@zlatkovic.com> | 7 * March 2002, Igor Zlatkovic <igor@zlatkovic.com> |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /* The source directory, relative to the one where this file resides. */ | 10 /* The source directory, relative to the one where this file resides. */ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 var useCvsVer = true; | 40 var useCvsVer = true; |
| 41 /* Libxslt features. */ | 41 /* Libxslt features. */ |
| 42 var withTrio = false; | 42 var withTrio = false; |
| 43 var withXsltDebug = true; | 43 var withXsltDebug = true; |
| 44 var withMemDebug = false; | 44 var withMemDebug = false; |
| 45 var withDebugger = true; | 45 var withDebugger = true; |
| 46 var withIconv = true; | 46 var withIconv = true; |
| 47 var withZlib = false; | 47 var withZlib = false; |
| 48 var withCrypto = true; | 48 var withCrypto = true; |
| 49 var withModules = false; | 49 var withModules = false; |
| 50 var withLocale = true; |
| 50 /* Win32 build options. */ | 51 /* Win32 build options. */ |
| 51 var dirSep = "\\"; | 52 var dirSep = "\\"; |
| 52 var compiler = "msvc"; | 53 var compiler = "msvc"; |
| 53 var cruntime = "/MD"; | 54 var cruntime = "/MD"; |
| 54 var vcmanifest = false; | 55 var vcmanifest = false; |
| 55 var buildDebug = 0; | 56 var buildDebug = 0; |
| 56 var buildStatic = 0; | 57 var buildStatic = 0; |
| 57 var buildPrefix = "."; | 58 var buildPrefix = "."; |
| 58 var buildBinPrefix = ""; | 59 var buildBinPrefix = ""; |
| 59 var buildIncPrefix = ""; | 60 var buildIncPrefix = ""; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 txt += "either 'yes' or 'no'.\n\n"; | 100 txt += "either 'yes' or 'no'.\n\n"; |
| 100 txt += "XSLT processor options, default value given in parentheses:\n\n"
; | 101 txt += "XSLT processor options, default value given in parentheses:\n\n"
; |
| 101 txt += " trio: Enable TRIO string manipulator (" + (withTrio? "ye
s" : "no") + ")\n"; | 102 txt += " trio: Enable TRIO string manipulator (" + (withTrio? "ye
s" : "no") + ")\n"; |
| 102 txt += " xslt_debug: Enable XSLT debbugging module (" + (withXsltDebug?
"yes" : "no") + ")\n"; | 103 txt += " xslt_debug: Enable XSLT debbugging module (" + (withXsltDebug?
"yes" : "no") + ")\n"; |
| 103 txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" :
"no") + ")\n"; | 104 txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" :
"no") + ")\n"; |
| 104 txt += " debugger: Enable external debugger support (" + (withDebugge
r? "yes" : "no") + ")\n"; | 105 txt += " debugger: Enable external debugger support (" + (withDebugge
r? "yes" : "no") + ")\n"; |
| 105 txt += " iconv: Use iconv library (" + (withIconv? "yes" : "no")
+ ")\n"; | 106 txt += " iconv: Use iconv library (" + (withIconv? "yes" : "no")
+ ")\n"; |
| 106 txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + "
)\n"; | 107 txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + "
)\n"; |
| 107 txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "n
o") + ")\n"; | 108 txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "n
o") + ")\n"; |
| 108 txt += " modules: Enable Module support (" + (withModules? "yes" : "
no") + ")\n"; | 109 txt += " modules: Enable Module support (" + (withModules? "yes" : "
no") + ")\n"; |
| 110 txt += " locale: Enable Locale support, requires unicode OS support
(" + (withLocale? "yes" : "no") + ")\n"; |
| 109 txt += "\nWin32 build options, default value given in parentheses:\n\n"; | 111 txt += "\nWin32 build options, default value given in parentheses:\n\n"; |
| 110 txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + "
)\n"; | 112 txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + "
)\n"; |
| 111 txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntim
e + ")\n"; | 113 txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntim
e + ")\n"; |
| 112 txt += " vcmanifest: Embed VC manifest (only msvc) (" + (vcmanifest? "y
es" : "no") + ")\n"; | 114 txt += " vcmanifest: Embed VC manifest (only msvc) (" + (vcmanifest? "y
es" : "no") + ")\n"; |
| 113 txt += " debug: Build unoptimised debug executables (" + (buildDeb
ug? "yes" : "no") + ")\n"; | 115 txt += " debug: Build unoptimised debug executables (" + (buildDeb
ug? "yes" : "no") + ")\n"; |
| 114 txt += " static: Link xsltproc statically to libxslt (" + (buildSta
tic? "yes" : "no") + ")\n"; | 116 txt += " static: Link xsltproc statically to libxslt (" + (buildSta
tic? "yes" : "no") + ")\n"; |
| 115 txt += " Note: automatically enabled if cruntime is not /MD
or /MDd\n"; | 117 txt += " Note: automatically enabled if cruntime is not /MD
or /MDd\n"; |
| 116 txt += " prefix: Base directory for the installation (" + buildPref
ix + ")\n"; | 118 txt += " prefix: Base directory for the installation (" + buildPref
ix + ")\n"; |
| 117 txt += " bindir: Directory where xsltproc and friends should be ins
talled\n"; | 119 txt += " bindir: Directory where xsltproc and friends should be ins
talled\n"; |
| 118 txt += " (" + buildBinPrefix + ")\n"; | 120 txt += " (" + buildBinPrefix + ")\n"; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } else if (s.search(/\@WITH_TRIO\@/) != -1) { | 235 } else if (s.search(/\@WITH_TRIO\@/) != -1) { |
| 234 of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" :
"0")); | 236 of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" :
"0")); |
| 235 } else if (s.search(/\@WITH_XSLT_DEBUG\@/) != -1) { | 237 } else if (s.search(/\@WITH_XSLT_DEBUG\@/) != -1) { |
| 236 of.WriteLine(s.replace(/\@WITH_XSLT_DEBUG\@/, withXsltDe
bug? "1" : "0")); | 238 of.WriteLine(s.replace(/\@WITH_XSLT_DEBUG\@/, withXsltDe
bug? "1" : "0")); |
| 237 } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) { | 239 } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) { |
| 238 of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebu
g? "1" : "0")); | 240 of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebu
g? "1" : "0")); |
| 239 } else if (s.search(/\@WITH_DEBUGGER\@/) != -1) { | 241 } else if (s.search(/\@WITH_DEBUGGER\@/) != -1) { |
| 240 of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger
? "1" : "0")); | 242 of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger
? "1" : "0")); |
| 241 } else if (s.search(/\@WITH_MODULES\@/) != -1) { | 243 } else if (s.search(/\@WITH_MODULES\@/) != -1) { |
| 242 of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules?
"1" : "0")); | 244 of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules?
"1" : "0")); |
| 245 } else if (s.search(/\@XSLT_LOCALE_XLOCALE\@/) != -1) { |
| 246 of.WriteLine(s.replace(/\@XSLT_LOCALE_XLOCALE\@/, "0")); |
| 247 } else if (s.search(/\@XSLT_LOCALE_WINAPI\@/) != -1) { |
| 248 of.WriteLine(s.replace(/\@XSLT_LOCALE_WINAPI\@/, withLoc
ale? "1" : "0")); |
| 243 } else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) { | 249 } else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) { |
| 244 of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@
/, "NULL")); | 250 of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@
/, "NULL")); |
| 245 } else | 251 } else |
| 246 of.WriteLine(ln); | 252 of.WriteLine(ln); |
| 247 } | 253 } |
| 248 ofi.Close(); | 254 ofi.Close(); |
| 249 of.Close(); | 255 of.Close(); |
| 250 } | 256 } |
| 251 | 257 |
| 252 /* Configures libexslt. This one will generate exsltconfig.h from exsltconfig.h.
in | 258 /* Configures libexslt. This one will generate exsltconfig.h from exsltconfig.h.
in |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 else if (opt == "debug") | 342 else if (opt == "debug") |
| 337 buildDebug = strToBool(arg.substring(opt.length + 1, arg
.length)); | 343 buildDebug = strToBool(arg.substring(opt.length + 1, arg
.length)); |
| 338 else if (opt == "iconv") | 344 else if (opt == "iconv") |
| 339 withIconv = strToBool(arg.substring(opt.length + 1, arg.
length)); | 345 withIconv = strToBool(arg.substring(opt.length + 1, arg.
length)); |
| 340 else if (opt == "zlib") | 346 else if (opt == "zlib") |
| 341 withZlib = strToBool(arg.substring(opt.length + 1, arg.
length)); | 347 withZlib = strToBool(arg.substring(opt.length + 1, arg.
length)); |
| 342 else if (opt == "crypto") | 348 else if (opt == "crypto") |
| 343 withCrypto = strToBool(arg.substring(opt.length + 1, arg
.length)); | 349 withCrypto = strToBool(arg.substring(opt.length + 1, arg
.length)); |
| 344 else if (opt == "modules") | 350 else if (opt == "modules") |
| 345 withModules = strToBool(arg.substring(opt.length + 1, ar
g.length)); | 351 withModules = strToBool(arg.substring(opt.length + 1, ar
g.length)); |
| 352 else if (opt == "locale") |
| 353 withLocale = strToBool(arg.substring(opt.length + 1, arg
.length)); |
| 346 else if (opt == "compiler") | 354 else if (opt == "compiler") |
| 347 compiler = arg.substring(opt.length + 1, arg.length); | 355 compiler = arg.substring(opt.length + 1, arg.length); |
| 348 else if (opt == "cruntime") | 356 else if (opt == "cruntime") |
| 349 cruntime = arg.substring(opt.length + 1, arg.length); | 357 cruntime = arg.substring(opt.length + 1, arg.length); |
| 350 else if (opt == "vcmanifest") | 358 else if (opt == "vcmanifest") |
| 351 vcmanifest = strToBool(arg.substring(opt.length + 1, arg
.length)); | 359 vcmanifest = strToBool(arg.substring(opt.length + 1, arg
.length)); |
| 352 else if (opt == "static") | 360 else if (opt == "static") |
| 353 buildStatic = strToBool(arg.substring(opt.length + 1, ar
g.length)); | 361 buildStatic = strToBool(arg.substring(opt.length + 1, ar
g.length)); |
| 354 else if (opt == "prefix") | 362 else if (opt == "prefix") |
| 355 buildPrefix = arg.substring(opt.length + 1, arg.length); | 363 buildPrefix = arg.substring(opt.length + 1, arg.length); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 457 } |
| 450 | 458 |
| 451 // Create the Makefile. | 459 // Create the Makefile. |
| 452 var fso = new ActiveXObject("Scripting.FileSystemObject"); | 460 var fso = new ActiveXObject("Scripting.FileSystemObject"); |
| 453 var makefile = ".\\Makefile.msvc"; | 461 var makefile = ".\\Makefile.msvc"; |
| 454 if (compiler == "mingw") | 462 if (compiler == "mingw") |
| 455 makefile = ".\\Makefile.mingw"; | 463 makefile = ".\\Makefile.mingw"; |
| 456 var new_makefile = ".\\Makefile"; | 464 var new_makefile = ".\\Makefile"; |
| 457 var f = fso.FileExists(new_makefile); | 465 var f = fso.FileExists(new_makefile); |
| 458 if (f) { | 466 if (f) { |
| 459 » var t = fso.GetFile(new_makefile); | 467 var t = fso.GetFile(new_makefile); |
| 460 » t.Attributes =0; | 468 t.Attributes =0; |
| 461 } | 469 } |
| 462 fso.CopyFile(makefile, new_makefile, true); | 470 fso.CopyFile(makefile, new_makefile, true); |
| 463 WScript.Echo("Created Makefile."); | 471 WScript.Echo("Created Makefile."); |
| 464 // Create the config.h. | 472 // Create the config.h. |
| 465 var confighsrc = "..\\libxslt\\win32config.h"; | 473 var confighsrc = "..\\libxslt\\win32config.h"; |
| 466 var configh = "..\\config.h"; | 474 var configh = "..\\config.h"; |
| 467 var f = fso.FileExists(configh); | 475 var f = fso.FileExists(configh); |
| 468 if (f) { | 476 if (f) { |
| 469 var t = fso.GetFile(configh); | 477 var t = fso.GetFile(configh); |
| 470 t.Attributes =0; | 478 t.Attributes =0; |
| 471 } | 479 } |
| 472 fso.CopyFile(confighsrc, configh, true); | 480 fso.CopyFile(confighsrc, configh, true); |
| 473 WScript.Echo("Created config.h."); | 481 WScript.Echo("Created config.h."); |
| 474 | 482 |
| 475 // Display the final configuration. | 483 // Display the final configuration. |
| 476 var txtOut = "\nXSLT processor configuration\n"; | 484 var txtOut = "\nXSLT processor configuration\n"; |
| 477 txtOut += "----------------------------\n"; | 485 txtOut += "----------------------------\n"; |
| 478 txtOut += " Trio: " + boolToStr(withTrio) + "\n"; | 486 txtOut += " Trio: " + boolToStr(withTrio) + "\n"; |
| 479 txtOut += " Debugging module: " + boolToStr(withXsltDebug) + "\n"; | 487 txtOut += " Debugging module: " + boolToStr(withXsltDebug) + "\n"; |
| 480 txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n"; | 488 txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n"; |
| 481 txtOut += " Debugger support: " + boolToStr(withDebugger) + "\n"; | 489 txtOut += " Debugger support: " + boolToStr(withDebugger) + "\n"; |
| 482 txtOut += " Use iconv: " + boolToStr(withIconv) + "\n"; | 490 txtOut += " Use iconv: " + boolToStr(withIconv) + "\n"; |
| 483 txtOut += " With zlib: " + boolToStr(withZlib) + "\n"; | 491 txtOut += " With zlib: " + boolToStr(withZlib) + "\n"; |
| 484 txtOut += " Crypto: " + boolToStr(withCrypto) + "\n"; | 492 txtOut += " Crypto: " + boolToStr(withCrypto) + "\n"; |
| 485 txtOut += " Modules: " + boolToStr(withModules) + "\n"; | 493 txtOut += " Modules: " + boolToStr(withModules) + "\n"; |
| 494 txtOut += " Locale: " + boolToStr(withLocale) + "\n"; |
| 486 txtOut += "\n"; | 495 txtOut += "\n"; |
| 487 txtOut += "Win32 build configuration\n"; | 496 txtOut += "Win32 build configuration\n"; |
| 488 txtOut += "-------------------------\n"; | 497 txtOut += "-------------------------\n"; |
| 489 txtOut += " Compiler: " + compiler + "\n"; | 498 txtOut += " Compiler: " + compiler + "\n"; |
| 490 if (compiler == "msvc") | 499 if (compiler == "msvc") |
| 491 txtOut += " C-Runtime option: " + cruntime + "\n"; | 500 txtOut += " C-Runtime option: " + cruntime + "\n"; |
| 492 txtOut += " Embed Manifest: " + boolToStr(vcmanifest) + "\n"; | 501 txtOut += " Embed Manifest: " + boolToStr(vcmanifest) + "\n"; |
| 493 txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n"; | 502 txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n"; |
| 494 txtOut += " Static xsltproc: " + boolToStr(buildStatic) + "\n"; | 503 txtOut += " Static xsltproc: " + boolToStr(buildStatic) + "\n"; |
| 495 txtOut += " Install prefix: " + buildPrefix + "\n"; | 504 txtOut += " Install prefix: " + buildPrefix + "\n"; |
| 496 txtOut += " Put tools in: " + buildBinPrefix + "\n"; | 505 txtOut += " Put tools in: " + buildBinPrefix + "\n"; |
| 497 txtOut += " Put headers in: " + buildIncPrefix + "\n"; | 506 txtOut += " Put headers in: " + buildIncPrefix + "\n"; |
| 498 txtOut += "Put static libs in: " + buildLibPrefix + "\n"; | 507 txtOut += "Put static libs in: " + buildLibPrefix + "\n"; |
| 499 txtOut += "Put shared libs in: " + buildSoPrefix + "\n"; | 508 txtOut += "Put shared libs in: " + buildSoPrefix + "\n"; |
| 500 txtOut += " Include path: " + buildInclude + "\n"; | 509 txtOut += " Include path: " + buildInclude + "\n"; |
| 501 txtOut += " Lib path: " + buildLib + "\n"; | 510 txtOut += " Lib path: " + buildLib + "\n"; |
| 502 WScript.Echo(txtOut); | 511 WScript.Echo(txtOut); |
| 503 | 512 |
| 504 // Done. | 513 // Done. |
| OLD | NEW |