~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to gettext-tools/m4/locale-fr.m4

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# locale-fr.m4 serial 1 (gettext-0.13)
 
2
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
3
dnl This file is free software, distributed under the terms of the GNU
 
4
dnl General Public License.  As a special exception to the GNU General
 
5
dnl Public License, this file may be distributed as part of a program
 
6
dnl that contains a configuration script generated by Autoconf, under
 
7
dnl the same distribution terms as the rest of that program.
 
8
 
 
9
dnl From Bruno Haible.
 
10
 
 
11
dnl Determine the name of a french locale with traditional encoding.
 
12
AC_DEFUN([gt_LOCALE_FR],
 
13
[
 
14
  AC_CACHE_CHECK([for a traditional french locale], gt_cv_locale_fr, [
 
15
changequote(,)dnl
 
16
    cat <<EOF > conftest.$ac_ext
 
17
#include <locale.h>
 
18
#include <time.h>
 
19
struct tm t;
 
20
char buf[16];
 
21
int main () {
 
22
  /* Check whether the given locale name is recognized by the system.  */
 
23
  if (setlocale (LC_ALL, "") == NULL) return 1;
 
24
  /* Check whether in the abbreviation of the second month, the second
 
25
     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
 
26
     one byte long. This excludes the UTF-8 encoding.  */
 
27
  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
 
28
  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
 
29
  return 0;
 
30
}
 
31
EOF
 
32
changequote([,])dnl
 
33
    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
 
34
      # Test for the usual locale name.
 
35
      if (LC_ALL=fr_FR ./conftest; exit) 2>/dev/null; then
 
36
        gt_cv_locale_fr=fr_FR
 
37
      else
 
38
        # Test for the locale name with explicit encoding suffix.
 
39
        if (LC_ALL=fr_FR.ISO-8859-1 ./conftest; exit) 2>/dev/null; then
 
40
          gt_cv_locale_fr=fr_FR.ISO-8859-1
 
41
        else
 
42
          # Test for the AIX, OSF/1, FreeBSD, NetBSD locale name.
 
43
          if (LC_ALL=fr_FR.ISO8859-1 ./conftest; exit) 2>/dev/null; then
 
44
            gt_cv_locale_fr=fr_FR.ISO8859-1
 
45
          else
 
46
            # Test for the HP-UX locale name.
 
47
            if (LC_ALL=fr_FR.iso88591 ./conftest; exit) 2>/dev/null; then
 
48
              gt_cv_locale_fr=fr_FR.iso88591
 
49
            else
 
50
              # Test for the Solaris 7 locale name.
 
51
              if (LC_ALL=fr ./conftest; exit) 2>/dev/null; then
 
52
                gt_cv_locale_fr=fr
 
53
              else
 
54
                # Special test for NetBSD 1.6.
 
55
                if test -f /usr/share/locale/fr_FR.ISO8859-1/LC_CTYPE; then
 
56
                  gt_cv_locale_fr=fr_FR.ISO8859-1
 
57
                else
 
58
                  # None found.
 
59
                  gt_cv_locale_fr=fr_FR
 
60
                fi
 
61
              fi
 
62
            fi
 
63
          fi
 
64
        fi
 
65
      fi
 
66
    fi
 
67
    rm -fr conftest*
 
68
  ])
 
69
  LOCALE_FR=$gt_cv_locale_fr
 
70
  AC_SUBST([LOCALE_FR])
 
71
])