summaryrefslogtreecommitdiffstats
path: root/gl/m4/locale-ja.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/locale-ja.m4')
-rw-r--r--gl/m4/locale-ja.m479
1 files changed, 30 insertions, 49 deletions
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4
index c80c5af9..93605764 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
2dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl 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([
16changequote(,)dnl
17 case "$host_os" in
18 darwin[56]*) ;;
19 darwin*) macosx=yes;;
20 esac
21changequote([,])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([
34changequote(,)dnl 16changequote(,)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}
81changequote([,])dnl 63changequote([,])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])