~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to m4/locale-fr.m4

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# locale-fr.m4 serial 13
2
 
dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
 
1
# locale-fr.m4 serial 17
 
2
dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
26
26
int main () {
27
27
  /* Check whether the given locale name is recognized by the system.  */
28
28
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
29
  /* On native Windows, setlocale(category, "") looks at the system settings,
30
30
     not at the environment variables.  Also, when an encoding suffix such
31
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
31
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32
32
     category of the locale to "C".  */
33
33
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34
34
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37
37
  if (setlocale (LC_ALL, "") == NULL) return 1;
38
38
#endif
39
39
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
40
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
41
41
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42
42
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43
43
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
63
63
     one byte long. This excludes the UTF-8 encoding.  */
64
64
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65
65
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
66
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
66
67
  /* Check whether the decimal separator is a comma.
67
68
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
68
69
     are nl_langinfo(RADIXCHAR) are both ".".  */
69
70
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
71
#endif
70
72
  return 0;
71
73
}
72
74
changequote([,])dnl
80
82
        # "ja" as "Japanese" or "Japanese_Japan.932",
81
83
        # and similar.
82
84
        mingw*)
83
 
          # Test for the native Win32 locale name.
 
85
          # Test for the native Windows locale name.
84
86
          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
85
87
            gt_cv_locale_fr=French_France.1252
86
88
          else
90
92
          ;;
91
93
        *)
92
94
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
93
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
95
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
94
96
          # configure script would override the LC_ALL setting. Likewise for
95
97
          # LC_CTYPE, which is also set at the beginning of the configure script.
96
98
          # Test for the usual locale name.
152
154
#if !(defined __BEOS__ || defined __HAIKU__)
153
155
  /* Check whether the given locale name is recognized by the system.  */
154
156
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
155
 
  /* On native Win32, setlocale(category, "") looks at the system settings,
 
157
  /* On native Windows, setlocale(category, "") looks at the system settings,
156
158
     not at the environment variables.  Also, when an encoding suffix such
157
 
     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
 
159
     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
158
160
     category of the locale to "C".  */
159
161
  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
160
162
      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
163
165
  if (setlocale (LC_ALL, "") == NULL) return 1;
164
166
# endif
165
167
  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
166
 
     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
 
168
     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
167
169
     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
168
170
     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
169
171
     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
189
191
      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
190
192
    return 1;
191
193
#endif
 
194
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
192
195
  /* Check whether the decimal separator is a comma.
193
196
     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
194
197
     are nl_langinfo(RADIXCHAR) are both ".".  */
195
198
  if (localeconv () ->decimal_point[0] != ',') return 1;
 
199
#endif
196
200
  return 0;
197
201
}
198
202
changequote([,])dnl
206
210
        # "ja" as "Japanese" or "Japanese_Japan.932",
207
211
        # and similar.
208
212
        mingw*)
209
 
          # Test for the hypothetical native Win32 locale name.
 
213
          # Test for the hypothetical native Windows locale name.
210
214
          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
211
215
            gt_cv_locale_fr_utf8=French_France.65001
212
216
          else
216
220
          ;;
217
221
        *)
218
222
          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
219
 
          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
 
223
          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
220
224
          # configure script would override the LC_ALL setting. Likewise for
221
225
          # LC_CTYPE, which is also set at the beginning of the configure script.
222
226
          # Test for the usual locale name.