diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-04-24 18:26:59 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-04-24 19:44:10 +0300 |
commit | 25d88d2b8eebb4782a016e03aa8562ad9fa15b7b (patch) | |
tree | 30b5cafa05573f31b9d044e314c170610310667d /configure.ac | |
parent | 95711f5b9e7b6a982d1762d37d5a38e0f40b86f9 (diff) |
More hacking on --with-locales
Propagate the restriction of locales into <config_locales.h>. Note that in the
normal case, with no locale restrictions, all the WITH_LOCALE_xx macros are
zero anyway, but WITH_LOCALE_ALL is one.
Restrict which character encodings are handled in
sal/textencsal/textenc/tables.cxx based on the WITH_LOCALE_ macros. (Don't
simply always do it for iOS.)
Massage the affected unit tests to not crash when only partial character
encoding information is present.
Change-Id: Ie2c882c262ebd0d2b37dde66b8fe3c3e2570da14
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e14c6f2b4f3a..6621afbf529d 100644 --- a/configure.ac +++ b/configure.ac @@ -12201,6 +12201,26 @@ AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS) if test -n "$with_locales"; then WITH_LOCALES="$with_locales" + + just_langs="`echo $WITH_LOCALES | sed -e 's/_[A-Z]*//g'`" + # Only languages and scripts for which we actually have ifdefs need to be handled. Also see + # config_host/config_locales.h.in + for locale in $WITH_LOCALES; do + lang=${locale%_*} + + AC_DEFINE_UNQUOTED(WITH_LOCALE_$lang, 1) + + case $lang in + hi|mr*ne) + AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Deva) + ;; + bg|ru) + AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Cyrl) + ;; + esac + done +else + AC_DEFINE(WITH_LOCALE_ALL) fi AC_SUBST(WITH_LOCALES) @@ -12759,6 +12779,7 @@ AC_CONFIG_HEADERS([config_host/config_gcc.h]) AC_CONFIG_HEADERS([config_host/config_global.h]) AC_CONFIG_HEADERS([config_host/config_graphite.h]) AC_CONFIG_HEADERS([config_host/config_lgpl.h]) +AC_CONFIG_HEADERS([config_host/config_locales.h]) AC_CONFIG_HEADERS([config_host/config_mpl.h]) AC_CONFIG_HEADERS([config_host/config_orcus.h]) AC_CONFIG_HEADERS([config_host/config_kde4.h]) |