summaryrefslogtreecommitdiff
path: root/config_host
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-24 18:26:59 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-24 19:44:10 +0300
commit25d88d2b8eebb4782a016e03aa8562ad9fa15b7b (patch)
tree30b5cafa05573f31b9d044e314c170610310667d /config_host
parent95711f5b9e7b6a982d1762d37d5a38e0f40b86f9 (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 'config_host')
-rw-r--r--config_host/config_locales.h.in56
1 files changed, 56 insertions, 0 deletions
diff --git a/config_host/config_locales.h.in b/config_host/config_locales.h.in
new file mode 100644
index 000000000000..142f1b1f2d19
--- /dev/null
+++ b/config_host/config_locales.h.in
@@ -0,0 +1,56 @@
+/* Configuration of restriction on supported locales, by the
+ * --with-locales option.
+ *
+ * (Note that this is totally unrelated to what UI language(s) were
+ * configured with the --with-lang option.)
+ *
+ * Normally, especially for desktop OSes, LibreOffice is built to
+ * support all the locales and character encodings that it has code
+ * (data) for in the source code. By using the --with-locales
+ * configure switch, this can be restricted.
+ *
+ * This file defines feature test macros for those languages for which
+ * at least one locale is to be supported. In some cases, a feature
+ * test macro for a script is provided in addition or instead.
+ *
+ * Only languages for which there exists separate code and/or data in
+ * the source code need to be mentioned here.
+ */
+
+#ifndef CONFIG_LOCALES_H
+#define CONFIG_LOCALES_H
+
+/* In the normal case WITH_LOCALE_ALL is one and this
+ * overrides the others which are zero.
+ */
+#define WITH_LOCALE_ALL 0
+
+/* When --with-locales was used, WITH_LOCALE_ALL is zero and some of
+ * these are one.
+ */
+#define WITH_LOCALE_ca 0
+#define WITH_LOCALE_dz 0
+#define WITH_LOCALE_el 0
+#define WITH_LOCALE_he 0
+#define WITH_LOCALE_hi 0
+#define WITH_LOCALE_hr 0
+#define WITH_LOCALE_hu 0
+#define WITH_LOCALE_is 0
+#define WITH_LOCALE_ja 0
+#define WITH_LOCALE_ko 0
+#define WITH_LOCALE_ku 0
+#define WITH_LOCALE_ln 0
+#define WITH_LOCALE_my 0
+#define WITH_LOCALE_ne 0
+#define WITH_LOCALE_ro 0
+#define WITH_LOCALE_ru 0
+#define WITH_LOCALE_sid 0
+#define WITH_LOCALE_th 0
+#define WITH_LOCALE_tr 0
+#define WITH_LOCALE_uk 0
+#define WITH_LOCALE_zh 0
+
+#define WITH_LOCALE_FOR_SCRIPT_Cyrl 0
+#define WITH_LOCALE_FOR_SCRIPT_Deva 0
+
+#endif