diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2009-05-19 22:32:10 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2009-05-19 22:32:10 (GMT) |
commit | 50b3ff7b91e78a61aca93247bee586d6d7eb27c8 (patch) | |
tree | db4c7eee24479ac7ee6888ce1562facf60159b71 /gl/m4/locale-ja.m4 | |
parent | 2701ccd500e60537a8c2977a81549ff33eeaef3f (diff) | |
download | monitoring-plugins-50b3ff7b91e78a61aca93247bee586d6d7eb27c8.tar.gz |
Sync with the latest Gnulib code (cb75dc5)
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Diffstat (limited to 'gl/m4/locale-ja.m4')
-rw-r--r-- | gl/m4/locale-ja.m4 | 79 |
1 files changed, 30 insertions, 49 deletions
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4 index c80c5af..9360576 100644 --- a/gl/m4/locale-ja.m4 +++ b/gl/m4/locale-ja.m4 | |||
@@ -1,4 +1,4 @@ | |||
1 | # locale-ja.m4 serial 6 | 1 | # locale-ja.m4 serial 7 |
2 | dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
@@ -12,25 +12,7 @@ AC_DEFUN([gt_LOCALE_JA], | |||
12 | AC_REQUIRE([AC_CANONICAL_HOST]) | 12 | AC_REQUIRE([AC_CANONICAL_HOST]) |
13 | AC_REQUIRE([AM_LANGINFO_CODESET]) | 13 | AC_REQUIRE([AM_LANGINFO_CODESET]) |
14 | AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ | 14 | AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ |
15 | macosx= | 15 | AC_LANG_CONFTEST([AC_LANG_SOURCE([ |
16 | changequote(,)dnl | ||
17 | case "$host_os" in | ||
18 | darwin[56]*) ;; | ||
19 | darwin*) macosx=yes;; | ||
20 | esac | ||
21 | changequote([,])dnl | ||
22 | if test -n "$macosx"; then | ||
23 | # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8 | ||
24 | # encodings, but the kernel does not support them. The documentation | ||
25 | # says: | ||
26 | # "... all code that calls BSD system routines should ensure | ||
27 | # that the const *char parameters of these routines are in UTF-8 | ||
28 | # encoding. All BSD system functions expect their string | ||
29 | # parameters to be in UTF-8 encoding and nothing else." | ||
30 | # See the comments in config.charset. Therefore we bypass the test. | ||
31 | gt_cv_locale_ja=none | ||
32 | else | ||
33 | AC_LANG_CONFTEST([AC_LANG_SOURCE([ | ||
34 | changequote(,)dnl | 16 | changequote(,)dnl |
35 | #include <locale.h> | 17 | #include <locale.h> |
36 | #include <time.h> | 18 | #include <time.h> |
@@ -79,47 +61,46 @@ int main () | |||
79 | return 0; | 61 | return 0; |
80 | } | 62 | } |
81 | changequote([,])dnl | 63 | changequote([,])dnl |
82 | ])]) | 64 | ])]) |
83 | if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then | 65 | if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then |
84 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because | 66 | # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because |
85 | # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the | 67 | # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the |
86 | # configure script would override the LC_ALL setting. Likewise for | 68 | # configure script would override the LC_ALL setting. Likewise for |
87 | # LC_CTYPE, which is also set at the beginning of the configure script. | 69 | # LC_CTYPE, which is also set at the beginning of the configure script. |
88 | # Test for the AIX locale name. | 70 | # Test for the AIX locale name. |
89 | if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 71 | if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
90 | gt_cv_locale_ja=ja_JP | 72 | gt_cv_locale_ja=ja_JP |
73 | else | ||
74 | # Test for the locale name with explicit encoding suffix. | ||
75 | if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | ||
76 | gt_cv_locale_ja=ja_JP.EUC-JP | ||
91 | else | 77 | else |
92 | # Test for the locale name with explicit encoding suffix. | 78 | # Test for the HP-UX, OSF/1, NetBSD locale name. |
93 | if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 79 | if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
94 | gt_cv_locale_ja=ja_JP.EUC-JP | 80 | gt_cv_locale_ja=ja_JP.eucJP |
95 | else | 81 | else |
96 | # Test for the HP-UX, OSF/1, NetBSD locale name. | 82 | # Test for the IRIX, FreeBSD locale name. |
97 | if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 83 | if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
98 | gt_cv_locale_ja=ja_JP.eucJP | 84 | gt_cv_locale_ja=ja_JP.EUC |
99 | else | 85 | else |
100 | # Test for the IRIX, FreeBSD locale name. | 86 | # Test for the Solaris 7 locale name. |
101 | if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 87 | if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then |
102 | gt_cv_locale_ja=ja_JP.EUC | 88 | gt_cv_locale_ja=ja |
103 | else | 89 | else |
104 | # Test for the Solaris 7 locale name. | 90 | # Special test for NetBSD 1.6. |
105 | if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then | 91 | if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then |
106 | gt_cv_locale_ja=ja | 92 | gt_cv_locale_ja=ja_JP.eucJP |
107 | else | 93 | else |
108 | # Special test for NetBSD 1.6. | 94 | # None found. |
109 | if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then | 95 | gt_cv_locale_ja=none |
110 | gt_cv_locale_ja=ja_JP.eucJP | ||
111 | else | ||
112 | # None found. | ||
113 | gt_cv_locale_ja=none | ||
114 | fi | ||
115 | fi | 96 | fi |
116 | fi | 97 | fi |
117 | fi | 98 | fi |
118 | fi | 99 | fi |
119 | fi | 100 | fi |
120 | fi | 101 | fi |
121 | rm -fr conftest* | ||
122 | fi | 102 | fi |
103 | rm -fr conftest* | ||
123 | ]) | 104 | ]) |
124 | LOCALE_JA=$gt_cv_locale_ja | 105 | LOCALE_JA=$gt_cv_locale_ja |
125 | AC_SUBST([LOCALE_JA]) | 106 | AC_SUBST([LOCALE_JA]) |