summaryrefslogtreecommitdiffstats
path: root/gl/m4/locale-fr.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/locale-fr.m4')
-rw-r--r--gl/m4/locale-fr.m473
1 files changed, 27 insertions, 46 deletions
diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4
index e471839..653a5bc 100644
--- a/gl/m4/locale-fr.m4
+++ b/gl/m4/locale-fr.m4
@@ -1,4 +1,4 @@
1# locale-fr.m4 serial 10 1# locale-fr.m4 serial 11
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_FR],
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 french locale], [gt_cv_locale_fr], [ 14 AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
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_fr=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>
@@ -75,42 +57,41 @@ int main () {
75 return 0; 57 return 0;
76} 58}
77changequote([,])dnl 59changequote([,])dnl
78 ])]) 60 ])])
79 if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then 61 if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
80 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 62 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
81 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the 63 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
82 # configure script would override the LC_ALL setting. Likewise for 64 # configure script would override the LC_ALL setting. Likewise for
83 # LC_CTYPE, which is also set at the beginning of the configure script. 65 # LC_CTYPE, which is also set at the beginning of the configure script.
84 # Test for the usual locale name. 66 # Test for the usual locale name.
85 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 67 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
86 gt_cv_locale_fr=fr_FR 68 gt_cv_locale_fr=fr_FR
69 else
70 # Test for the locale name with explicit encoding suffix.
71 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
72 gt_cv_locale_fr=fr_FR.ISO-8859-1
87 else 73 else
88 # Test for the locale name with explicit encoding suffix. 74 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
89 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 75 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
90 gt_cv_locale_fr=fr_FR.ISO-8859-1 76 gt_cv_locale_fr=fr_FR.ISO8859-1
91 else 77 else
92 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. 78 # Test for the HP-UX locale name.
93 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 79 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
94 gt_cv_locale_fr=fr_FR.ISO8859-1 80 gt_cv_locale_fr=fr_FR.iso88591
95 else 81 else
96 # Test for the HP-UX locale name. 82 # Test for the Solaris 7 locale name.
97 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 83 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
98 gt_cv_locale_fr=fr_FR.iso88591 84 gt_cv_locale_fr=fr
99 else 85 else
100 # Test for the Solaris 7 locale name. 86 # None found.
101 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 87 gt_cv_locale_fr=none
102 gt_cv_locale_fr=fr
103 else
104 # None found.
105 gt_cv_locale_fr=none
106 fi
107 fi 88 fi
108 fi 89 fi
109 fi 90 fi
110 fi 91 fi
111 fi 92 fi
112 rm -fr conftest*
113 fi 93 fi
94 rm -fr conftest*
114 ]) 95 ])
115 LOCALE_FR=$gt_cv_locale_fr 96 LOCALE_FR=$gt_cv_locale_fr
116 AC_SUBST([LOCALE_FR]) 97 AC_SUBST([LOCALE_FR])