1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-29 15:41:13 +03:00

Rework locale feature tests

Support glibc 2.26 which removes xlocale.h. Fixes bug 788264. Thanks to
Quentin Minster for the report.

Drop support for ancient glibc 2.2.x. This allows to replace the test
program in configure.ac with a simple check for strxfrm_l.

Always use WinAPI locales on Windows.

Define macros in xsltlocale.h and rename XSLT_LOCALE_XLOCALE to
XSLT_LOCALE_POSIX.
This commit is contained in:
Nick Wellnhofer
2017-10-08 14:34:06 +02:00
parent 43b6edbfaf
commit 8b4babb8f7
6 changed files with 26 additions and 111 deletions

View File

@ -47,7 +47,6 @@ var withIconv = true;
var withZlib = false;
var withCrypto = true;
var withModules = false;
var withLocale = true;
/* Win32 build options. */
var dirSep = "\\";
var compiler = "msvc";
@ -107,7 +106,6 @@ function usage()
txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n";
txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n";
txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n";
txt += " locale: Enable Locale support, requires unicode OS support (" + (withLocale? "yes" : "no") + ")\n";
txt += "\nWin32 build options, default value given in parentheses:\n\n";
txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n";
txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
@ -242,10 +240,6 @@ function configureXslt()
of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
} else if (s.search(/\@WITH_MODULES\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
} else if (s.search(/\@XSLT_LOCALE_XLOCALE\@/) != -1) {
of.WriteLine(s.replace(/\@XSLT_LOCALE_XLOCALE\@/, "0"));
} else if (s.search(/\@XSLT_LOCALE_WINAPI\@/) != -1) {
of.WriteLine(s.replace(/\@XSLT_LOCALE_WINAPI\@/, withLocale? "1" : "0"));
} else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) {
of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL"));
} else
@ -349,8 +343,6 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
withCrypto = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "modules")
withModules = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "locale")
withLocale = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "compiler")
compiler = arg.substring(opt.length + 1, arg.length);
else if (opt == "cruntime")
@ -485,7 +477,6 @@ txtOut += " Use iconv: " + boolToStr(withIconv) + "\n";
txtOut += " With zlib: " + boolToStr(withZlib) + "\n";
txtOut += " Crypto: " + boolToStr(withCrypto) + "\n";
txtOut += " Modules: " + boolToStr(withModules) + "\n";
txtOut += " Locale: " + boolToStr(withLocale) + "\n";
txtOut += "\n";
txtOut += "Win32 build configuration\n";
txtOut += "-------------------------\n";