mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
the "translation" patch series] Part 1: upgrading to gettext 0.14.6
* m4/*: * intl/*: * ABOUT-NLS: * po/Makefile.in.in: * po/POTFILES.in: * po/Makevars.template: * config/mkinstalldirs: * config/config.rpath: update from gettext 0.14.6 source. This enables translation to system language on Mac OS X git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19347 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
421acabc01
commit
f84a1c6e5c
@ -2,28 +2,13 @@
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2003 Free Software Foundation, Inc.
|
||||
# Copyright 1996-2005 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
@ -50,6 +35,8 @@ host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
@ -60,6 +47,13 @@ else
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | pw32* | os2*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
@ -71,13 +65,19 @@ else
|
||||
newsos6)
|
||||
;;
|
||||
linux*)
|
||||
case $CC in
|
||||
icc|ecc)
|
||||
case $cc_basename in
|
||||
icc* | ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc)
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
@ -96,6 +96,9 @@ else
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
@ -138,7 +141,7 @@ if test "$with_gnu_ld" = yes; then
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
@ -173,6 +176,13 @@ if test "$with_gnu_ld" = yes; then
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
linux*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
@ -266,7 +276,7 @@ else
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi4*)
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
@ -277,8 +287,17 @@ else
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
@ -295,7 +314,7 @@ else
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
freebsd* | kfreebsd*-gnu | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
@ -438,7 +457,7 @@ case "$host_os" in
|
||||
;;
|
||||
beos*)
|
||||
;;
|
||||
bsdi4*)
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
shrext=.dll
|
||||
@ -450,6 +469,8 @@ case "$host_os" in
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
;;
|
||||
freebsd*)
|
||||
;;
|
||||
gnu*)
|
||||
@ -486,11 +507,13 @@ case "$host_os" in
|
||||
;;
|
||||
linux*)
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
nto-qnx)
|
||||
nto-qnx*)
|
||||
;;
|
||||
openbsd*)
|
||||
;;
|
||||
@ -519,7 +542,7 @@ escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2005-02-02.21
|
||||
scriptversion=2004-02-15.20
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
@ -27,7 +27,7 @@ while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
@ -37,7 +37,7 @@ while test $# -gt 0 ; do
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
exit 0
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
|
@ -1,12 +1,4 @@
|
||||
2004-05-27 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
2005-05-23 GNU <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* .cvsignore: add libgnuintl.h
|
||||
* Version 0.14.5 released.
|
||||
|
||||
2004-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* libgnuintl.h: remove from cvs
|
||||
* plurar.c: update
|
||||
|
||||
2004-01-29 GNU <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Version 0.14.1 released.
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Makefile for directory with message catalog handling library of GNU gettext
|
||||
# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
@ -13,7 +13,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
@ -99,6 +99,7 @@ SOURCES = \
|
||||
plural-exp.c \
|
||||
localcharset.c \
|
||||
relocatable.c \
|
||||
langprefs.c \
|
||||
localename.c \
|
||||
log.c \
|
||||
printf.c \
|
||||
@ -124,6 +125,7 @@ OBJECTS = \
|
||||
plural-exp.$lo \
|
||||
localcharset.$lo \
|
||||
relocatable.$lo \
|
||||
langprefs.$lo \
|
||||
localename.$lo \
|
||||
log.$lo \
|
||||
printf.$lo \
|
||||
@ -153,7 +155,7 @@ libintl.a libgnuintl.a: $(OBJECTS)
|
||||
libintl.la libgnuintl.la: $(OBJECTS)
|
||||
$(LIBTOOL) --mode=link \
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
|
||||
$(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
|
||||
$(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) -lc \
|
||||
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
|
||||
-rpath $(libdir) \
|
||||
-no-undefined
|
||||
@ -164,7 +166,7 @@ libintl.la libgnuintl.la: $(OBJECTS)
|
||||
# Maintainers of other packages that include the intl directory must *not*
|
||||
# change these values.
|
||||
LTV_CURRENT=7
|
||||
LTV_REVISION=0
|
||||
LTV_REVISION=3
|
||||
LTV_AGE=4
|
||||
|
||||
.SUFFIXES:
|
||||
@ -213,6 +215,8 @@ localcharset.lo: $(srcdir)/localcharset.c
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
|
||||
relocatable.lo: $(srcdir)/relocatable.c
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
|
||||
langprefs.lo: $(srcdir)/langprefs.c
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c
|
||||
localename.lo: $(srcdir)/localename.c
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
|
||||
log.lo: $(srcdir)/log.c
|
||||
@ -272,7 +276,8 @@ install-exec: all
|
||||
: ; \
|
||||
fi
|
||||
if test "$(PACKAGE)" = "gettext-tools" \
|
||||
&& test '@USE_INCLUDED_LIBINTL@' = no; then \
|
||||
&& test '@USE_INCLUDED_LIBINTL@' = no \
|
||||
&& test @GLIBC2@ != no; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||
$(LIBTOOL) --mode=install \
|
||||
$(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
|
||||
@ -347,7 +352,8 @@ installdirs:
|
||||
: ; \
|
||||
fi
|
||||
if test "$(PACKAGE)" = "gettext-tools" \
|
||||
&& test '@USE_INCLUDED_LIBINTL@' = no; then \
|
||||
&& test '@USE_INCLUDED_LIBINTL@' = no \
|
||||
&& test @GLIBC2@ != no; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||
else \
|
||||
: ; \
|
||||
@ -377,7 +383,8 @@ uninstall:
|
||||
: ; \
|
||||
fi
|
||||
if test "$(PACKAGE)" = "gettext-tools" \
|
||||
&& test '@USE_INCLUDED_LIBINTL@' = no; then \
|
||||
&& test '@USE_INCLUDED_LIBINTL@' = no \
|
||||
&& test @GLIBC2@ != no; then \
|
||||
rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
|
||||
else \
|
||||
: ; \
|
||||
@ -479,7 +486,7 @@ dist distdir: Makefile
|
||||
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
|
||||
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
|
||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||
cp -p $$dir/$$file $(distdir); \
|
||||
cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
|
@ -1 +1 @@
|
||||
GNU gettext library from gettext-0.14.1
|
||||
GNU gettext library from gettext-0.14.5
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# The table consists of lines of the form
|
||||
@ -38,12 +38,12 @@
|
||||
# ISO-8859-4 Y osf solaris freebsd darwin
|
||||
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
|
||||
# ISO-8859-6 Y glibc aix hpux solaris
|
||||
# ISO-8859-7 Y glibc aix hpux irix osf solaris
|
||||
# ISO-8859-7 Y glibc aix hpux irix osf solaris darwin
|
||||
# ISO-8859-8 Y glibc aix hpux osf solaris
|
||||
# ISO-8859-9 Y glibc aix hpux irix osf solaris
|
||||
# ISO-8859-13 glibc
|
||||
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
|
||||
# ISO-8859-13 glibc darwin
|
||||
# ISO-8859-14 glibc
|
||||
# ISO-8859-15 glibc aix osf solaris freebsd
|
||||
# ISO-8859-15 glibc aix osf solaris freebsd darwin
|
||||
# KOI8-R Y glibc solaris freebsd darwin
|
||||
# KOI8-U Y glibc freebsd darwin
|
||||
# KOI8-T glibc
|
||||
@ -100,7 +100,7 @@
|
||||
# HP-KANA8 hpux
|
||||
# DEC-KANJI osf
|
||||
# DEC-HANYU osf
|
||||
# UTF-8 Y glibc aix hpux osf solaris
|
||||
# UTF-8 Y glibc aix hpux osf solaris darwin
|
||||
#
|
||||
# Note: Names which are not marked as being a MIME name should not be used in
|
||||
# Internet protocols for information interchange (mail, news, etc.).
|
||||
@ -396,7 +396,7 @@ case "$os" in
|
||||
echo "BIG5 BIG5"
|
||||
echo "SJIS SHIFT_JIS"
|
||||
;;
|
||||
darwin*)
|
||||
darwin[56]*)
|
||||
# Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
@ -437,6 +437,36 @@ case "$os" in
|
||||
echo "ja_JP.SJIS SHIFT_JIS"
|
||||
echo "ko_KR.EUC EUC-KR"
|
||||
;;
|
||||
darwin*)
|
||||
# Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
|
||||
# - It returns the empty string when LANG is set to a locale of the
|
||||
# form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
|
||||
# LC_CTYPE file.
|
||||
# - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
|
||||
# the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
|
||||
# - The documentation says:
|
||||
# "... all code that calls BSD system routines should ensure
|
||||
# that the const *char parameters of these routines are in UTF-8
|
||||
# encoding. All BSD system functions expect their string
|
||||
# parameters to be in UTF-8 encoding and nothing else."
|
||||
# It also says
|
||||
# "An additional caveat is that string parameters for files,
|
||||
# paths, and other file-system entities must be in canonical
|
||||
# UTF-8. In a canonical UTF-8 Unicode string, all decomposable
|
||||
# characters are decomposed ..."
|
||||
# but this is not true: You can pass non-decomposed UTF-8 strings
|
||||
# to file system functions, and it is the OS which will convert
|
||||
# them to decomposed UTF-8 before accessing the file system.
|
||||
# - The Apple Terminal application displays UTF-8 by default.
|
||||
# - However, other applications are free to use different encodings:
|
||||
# - xterm uses ISO-8859-1 by default.
|
||||
# - TextEdit uses MacRoman by default.
|
||||
# We prefer UTF-8 over decomposed UTF-8-MAC because one should
|
||||
# minimize the use of decomposed Unicode. Unfortunately, through the
|
||||
# Darwin file system, decomposed UTF-8 strings are leaked into user
|
||||
# space nevertheless.
|
||||
echo "* UTF-8"
|
||||
;;
|
||||
beos*)
|
||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||
echo "* UTF-8"
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Implementation of the internal dcigettext function.
|
||||
Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
@ -200,8 +200,8 @@ static void *mempcpy (void *dest, const void *src, size_t n);
|
||||
it may be concatenated to a directory pathname.
|
||||
IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
|
||||
*/
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS */
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, Cygwin, OS/2, DOS */
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
|
||||
# define HAS_DEVICE(P) \
|
||||
((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
|
||||
@ -1122,31 +1122,50 @@ category_to_name (int category)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Guess value of current locale from value of the environment variables. */
|
||||
/* Guess value of current locale from value of the environment variables
|
||||
or system-dependent defaults. */
|
||||
static const char *
|
||||
internal_function
|
||||
guess_category_value (int category, const char *categoryname)
|
||||
{
|
||||
const char *language;
|
||||
const char *retval;
|
||||
const char *locale;
|
||||
#ifndef _LIBC
|
||||
const char *language_default;
|
||||
int locale_defaulted;
|
||||
#endif
|
||||
|
||||
/* The highest priority value is the `LANGUAGE' environment
|
||||
variable. But we don't use the value if the currently selected
|
||||
locale is the C locale. This is a GNU extension. */
|
||||
language = getenv ("LANGUAGE");
|
||||
if (language != NULL && language[0] == '\0')
|
||||
language = NULL;
|
||||
/* We use the settings in the following order:
|
||||
1. The value of the environment variable 'LANGUAGE'. This is a GNU
|
||||
extension. Its value can be a colon-separated list of locale names.
|
||||
2. The value of the environment variable 'LC_ALL', 'LC_xxx', or 'LANG'.
|
||||
More precisely, the first among these that is set to a non-empty value.
|
||||
This is how POSIX specifies it. The value is a single locale name.
|
||||
3. A system-dependent preference list of languages. Its value can be a
|
||||
colon-separated list of locale names.
|
||||
4. A system-dependent default locale name.
|
||||
This way:
|
||||
- System-dependent settings can be overridden by environment variables.
|
||||
- If the system provides both a list of languages and a default locale,
|
||||
the former is used. */
|
||||
|
||||
/* We have to proceed with the POSIX methods of looking to `LC_ALL',
|
||||
/* Fetch the locale name, through the POSIX method of looking to `LC_ALL',
|
||||
`LC_xxx', and `LANG'. On some systems this can be done by the
|
||||
`setlocale' function itself. */
|
||||
#ifdef _LIBC
|
||||
retval = __current_locale_name (category);
|
||||
locale = __current_locale_name (category);
|
||||
#else
|
||||
retval = _nl_locale_name (category, categoryname);
|
||||
locale = _nl_locale_name_posix (category, categoryname);
|
||||
locale_defaulted = 0;
|
||||
if (locale == NULL)
|
||||
{
|
||||
locale = _nl_locale_name_default ();
|
||||
locale_defaulted = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Ignore LANGUAGE if the locale is set to "C" because
|
||||
/* Ignore LANGUAGE and its system-dependent analogon if the locale is set
|
||||
to "C" because
|
||||
1. "C" locale usually uses the ASCII encoding, and most international
|
||||
messages use non-ASCII characters. These characters get displayed
|
||||
as question marks (if using glibc's iconv()) or as invalid 8-bit
|
||||
@ -1154,8 +1173,28 @@ guess_category_value (int category, const char *categoryname)
|
||||
characters to ASCII). In any case, the output is ugly.
|
||||
2. The precise output of some programs in the "C" locale is specified
|
||||
by POSIX and should not depend on environment variables like
|
||||
"LANGUAGE". We allow such programs to use gettext(). */
|
||||
return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
|
||||
"LANGUAGE" or system-dependent information. We allow such programs
|
||||
to use gettext(). */
|
||||
if (strcmp (locale, "C") == 0)
|
||||
return locale;
|
||||
|
||||
/* The highest priority value is the value of the 'LANGUAGE' environment
|
||||
variable. */
|
||||
language = getenv ("LANGUAGE");
|
||||
if (language != NULL && language[0] != '\0')
|
||||
return language;
|
||||
#ifndef _LIBC
|
||||
/* The next priority value is the locale name, if not defaulted. */
|
||||
if (locale_defaulted)
|
||||
{
|
||||
/* The next priority value is the default language preferences list. */
|
||||
language_default = _nl_language_preferences_default ();
|
||||
if (language_default != NULL)
|
||||
return language_default;
|
||||
}
|
||||
/* The least priority value is the locale name, if defaulted. */
|
||||
#endif
|
||||
return locale;
|
||||
}
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef STATIC
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Header describing internals of libintl library.
|
||||
Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _GETTEXTP_H
|
||||
@ -151,6 +151,9 @@ struct binding
|
||||
extern int _nl_msg_cat_cntr;
|
||||
|
||||
#ifndef _LIBC
|
||||
const char *_nl_language_preferences_default (void);
|
||||
const char *_nl_locale_name_posix (int category, const char *categoryname);
|
||||
const char *_nl_locale_name_default (void);
|
||||
const char *_nl_locale_name (int category, const char *categoryname);
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _GETTEXT_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
|
||||
@ -67,8 +67,8 @@ static char *stpcpy (char *dest, const char *src);
|
||||
IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
|
||||
it may be concatenated to a directory pathname.
|
||||
*/
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS */
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, Cygwin, OS/2, DOS */
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
|
||||
# define HAS_DEVICE(P) \
|
||||
((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
|
||||
|
130
intl/langprefs.c
Normal file
130
intl/langprefs.c
Normal file
@ -0,0 +1,130 @@
|
||||
/* Determine the user's language preferences.
|
||||
Copyright (C) 2004-2005 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if HAVE_CFPREFERENCESCOPYAPPVALUE
|
||||
# include <string.h>
|
||||
# include <CFPreferences.h>
|
||||
# include <CFPropertyList.h>
|
||||
# include <CFArray.h>
|
||||
# include <CFString.h>
|
||||
extern void _nl_locale_name_canonicalize (char *name);
|
||||
#endif
|
||||
|
||||
/* Determine the user's language preferences, as a colon separated list of
|
||||
locale names in XPG syntax
|
||||
language[_territory[.codeset]][@modifier]
|
||||
The result must not be freed; it is statically allocated.
|
||||
The LANGUAGE environment variable does not need to be considered; it is
|
||||
already taken into account by the caller. */
|
||||
|
||||
const char *
|
||||
_nl_language_preferences_default (void)
|
||||
{
|
||||
#if HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
|
||||
{
|
||||
/* Cache the preferences list, since CoreFoundation calls are expensive. */
|
||||
static const char *cached_languages;
|
||||
static int cache_initialized;
|
||||
|
||||
if (!cache_initialized)
|
||||
{
|
||||
CFTypeRef preferences =
|
||||
CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"),
|
||||
kCFPreferencesCurrentApplication);
|
||||
if (preferences != NULL
|
||||
&& CFGetTypeID (preferences) == CFArrayGetTypeID ())
|
||||
{
|
||||
CFArrayRef prefArray = (CFArrayRef)preferences;
|
||||
int n = CFArrayGetCount (prefArray);
|
||||
char buf[256];
|
||||
size_t size = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
CFTypeRef element = CFArrayGetValueAtIndex (prefArray, i);
|
||||
if (element != NULL
|
||||
&& CFGetTypeID (element) == CFStringGetTypeID ()
|
||||
&& CFStringGetCString ((CFStringRef)element,
|
||||
buf, sizeof (buf),
|
||||
kCFStringEncodingASCII))
|
||||
{
|
||||
_nl_locale_name_canonicalize (buf);
|
||||
size += strlen (buf) + 1;
|
||||
/* Most GNU programs use msgids in English and don't ship
|
||||
an en.mo message catalog. Therefore when we see "en"
|
||||
in the preferences list, arrange for gettext() to
|
||||
return the msgid, and ignore all further elements of
|
||||
the preferences list. */
|
||||
if (strcmp (buf, "en") == 0)
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
if (size > 0)
|
||||
{
|
||||
char *languages = (char *) malloc (size);
|
||||
|
||||
if (languages != NULL)
|
||||
{
|
||||
char *p = languages;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
CFTypeRef element =
|
||||
CFArrayGetValueAtIndex (prefArray, i);
|
||||
if (element != NULL
|
||||
&& CFGetTypeID (element) == CFStringGetTypeID ()
|
||||
&& CFStringGetCString ((CFStringRef)element,
|
||||
buf, sizeof (buf),
|
||||
kCFStringEncodingASCII))
|
||||
{
|
||||
_nl_locale_name_canonicalize (buf);
|
||||
strcpy (p, buf);
|
||||
p += strlen (buf);
|
||||
*p++ = ':';
|
||||
if (strcmp (buf, "en") == 0)
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
*--p = '\0';
|
||||
|
||||
cached_languages = languages;
|
||||
}
|
||||
}
|
||||
}
|
||||
cache_initialized = 1;
|
||||
}
|
||||
if (cached_languages != NULL)
|
||||
return cached_languages;
|
||||
}
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1997, 2000-2004 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
@ -39,7 +39,7 @@
|
||||
/* Provide information about the supported file formats. Returns the
|
||||
maximum minor revision number supported for a given major revision. */
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
|
||||
((major) == 0 ? 1 : -1)
|
||||
((major) == 0 || (major) == 1 ? 1 : -1)
|
||||
|
||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||
precedence over _conio_gettext. */
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _LOADINFO_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2004 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>. */
|
||||
@ -73,8 +73,8 @@
|
||||
# define relocate(pathname) (pathname)
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS */
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, Cygwin, OS/2, DOS */
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
|
||||
#endif
|
||||
|
||||
@ -116,10 +116,16 @@ get_charset_aliases ()
|
||||
{
|
||||
#if !(defined VMS || defined WIN32)
|
||||
FILE *fp;
|
||||
const char *dir = relocate (LIBDIR);
|
||||
const char *dir;
|
||||
const char *base = "charset.alias";
|
||||
char *file_name;
|
||||
|
||||
/* Make it possible to override the charset.alias location. This is
|
||||
necessary for running the testsuite before "make install". */
|
||||
dir = getenv ("CHARSETALIASDIR");
|
||||
if (dir == NULL || dir[0] == '\0')
|
||||
dir = relocate (LIBDIR);
|
||||
|
||||
/* Concatenate dir and base into freshly allocated file_name. */
|
||||
{
|
||||
size_t dir_len = strlen (dir);
|
||||
@ -141,15 +147,17 @@ get_charset_aliases ()
|
||||
else
|
||||
{
|
||||
/* Parse the file's contents. */
|
||||
int c;
|
||||
char buf1[50+1];
|
||||
char buf2[50+1];
|
||||
char *res_ptr = NULL;
|
||||
size_t res_size = 0;
|
||||
size_t l1, l2;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
int c;
|
||||
char buf1[50+1];
|
||||
char buf2[50+1];
|
||||
size_t l1, l2;
|
||||
char *old_res_ptr;
|
||||
|
||||
c = getc (fp);
|
||||
if (c == EOF)
|
||||
break;
|
||||
@ -170,6 +178,7 @@ get_charset_aliases ()
|
||||
break;
|
||||
l1 = strlen (buf1);
|
||||
l2 = strlen (buf2);
|
||||
old_res_ptr = res_ptr;
|
||||
if (res_size == 0)
|
||||
{
|
||||
res_size = l1 + 1 + l2 + 1;
|
||||
@ -184,6 +193,8 @@ get_charset_aliases ()
|
||||
{
|
||||
/* Out of memory. */
|
||||
res_size = 0;
|
||||
if (old_res_ptr != NULL)
|
||||
free (old_res_ptr);
|
||||
break;
|
||||
}
|
||||
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _LOCALCHARSET_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
|
||||
# The format of this file is the same as for the corresponding file of
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Determine the current selected locale.
|
||||
Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@ -13,11 +13,12 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
|
||||
/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
|
||||
/* MacOS X code written by Bruno Haible <bruno@clisp.org>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@ -26,6 +27,16 @@
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
|
||||
# include <string.h>
|
||||
# include <CFString.h>
|
||||
# if HAVE_CFLOCALECOPYCURRENT
|
||||
# include <CFLocale.h>
|
||||
# elif HAVE_CFPREFERENCESCOPYAPPVALUE
|
||||
# include <CFPreferences.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined __WIN32__
|
||||
# undef WIN32 /* avoid warning on mingw32 */
|
||||
# define WIN32
|
||||
@ -683,6 +694,280 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
|
||||
/* MacOS X 10.2 or newer */
|
||||
|
||||
/* Canonicalize a MacOS X locale name to a Unix locale name.
|
||||
NAME is a sufficiently large buffer.
|
||||
On input, it contains the MacOS X locale name.
|
||||
On output, it contains the Unix locale name. */
|
||||
void
|
||||
_nl_locale_name_canonicalize (char *name)
|
||||
{
|
||||
/* This conversion is based on a posting by
|
||||
Deborah GoldSmith <goldsmit@apple.com> on 2005-03-08,
|
||||
http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
|
||||
|
||||
/* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
|
||||
ISO 3166) names. Prior to MacOS X 10.3, there is no API for doing this.
|
||||
Therefore we do it ourselves, using a table based on the results of the
|
||||
MacOS X 10.3.8 function
|
||||
CFLocaleCreateCanonicalLocaleIdentifierFromString(). */
|
||||
typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
|
||||
legacy_entry;
|
||||
static const legacy_entry legacy_table[] = {
|
||||
{ "Afrikaans", "af" },
|
||||
{ "Albanian", "sq" },
|
||||
{ "Amharic", "am" },
|
||||
{ "Arabic", "ar" },
|
||||
{ "Armenian", "hy" },
|
||||
{ "Assamese", "as" },
|
||||
{ "Aymara", "ay" },
|
||||
{ "Azerbaijani", "az" },
|
||||
{ "Basque", "eu" },
|
||||
{ "Belarusian", "be" },
|
||||
{ "Belorussian", "be" },
|
||||
{ "Bengali", "bn" },
|
||||
{ "Brazilian Portugese", "pt_BR" },
|
||||
{ "Brazilian Portuguese", "pt_BR" },
|
||||
{ "Breton", "br" },
|
||||
{ "Bulgarian", "bg" },
|
||||
{ "Burmese", "my" },
|
||||
{ "Byelorussian", "be" },
|
||||
{ "Catalan", "ca" },
|
||||
{ "Chewa", "ny" },
|
||||
{ "Chichewa", "ny" },
|
||||
{ "Chinese", "zh" },
|
||||
{ "Chinese, Simplified", "zh_CN" },
|
||||
{ "Chinese, Traditional", "zh_TW" },
|
||||
{ "Chinese, Tradtional", "zh_TW" },
|
||||
{ "Croatian", "hr" },
|
||||
{ "Czech", "cs" },
|
||||
{ "Danish", "da" },
|
||||
{ "Dutch", "nl" },
|
||||
{ "Dzongkha", "dz" },
|
||||
{ "English", "en" },
|
||||
{ "Esperanto", "eo" },
|
||||
{ "Estonian", "et" },
|
||||
{ "Faroese", "fo" },
|
||||
{ "Farsi", "fa" },
|
||||
{ "Finnish", "fi" },
|
||||
{ "Flemish", "nl_BE" },
|
||||
{ "French", "fr" },
|
||||
{ "Galician", "gl" },
|
||||
{ "Gallegan", "gl" },
|
||||
{ "Georgian", "ka" },
|
||||
{ "German", "de" },
|
||||
{ "Greek", "el" },
|
||||
{ "Greenlandic", "kl" },
|
||||
{ "Guarani", "gn" },
|
||||
{ "Gujarati", "gu" },
|
||||
{ "Hawaiian", "haw" }, /* Yes, "haw", not "cpe". */
|
||||
{ "Hebrew", "he" },
|
||||
{ "Hindi", "hi" },
|
||||
{ "Hungarian", "hu" },
|
||||
{ "Icelandic", "is" },
|
||||
{ "Indonesian", "id" },
|
||||
{ "Inuktitut", "iu" },
|
||||
{ "Irish", "ga" },
|
||||
{ "Italian", "it" },
|
||||
{ "Japanese", "ja" },
|
||||
{ "Javanese", "jv" },
|
||||
{ "Kalaallisut", "kl" },
|
||||
{ "Kannada", "kn" },
|
||||
{ "Kashmiri", "ks" },
|
||||
{ "Kazakh", "kk" },
|
||||
{ "Khmer", "km" },
|
||||
{ "Kinyarwanda", "rw" },
|
||||
{ "Kirghiz", "ky" },
|
||||
{ "Korean", "ko" },
|
||||
{ "Kurdish", "ku" },
|
||||
{ "Latin", "la" },
|
||||
{ "Latvian", "lv" },
|
||||
{ "Lithuanian", "lt" },
|
||||
{ "Macedonian", "mk" },
|
||||
{ "Malagasy", "mg" },
|
||||
{ "Malay", "ms" },
|
||||
{ "Malayalam", "ml" },
|
||||
{ "Maltese", "mt" },
|
||||
{ "Manx", "gv" },
|
||||
{ "Marathi", "mr" },
|
||||
{ "Moldavian", "mo" },
|
||||
{ "Mongolian", "mn" },
|
||||
{ "Nepali", "ne" },
|
||||
{ "Norwegian", "nb" }, /* Yes, "nb", not the obsolete "no". */
|
||||
{ "Nyanja", "ny" },
|
||||
{ "Nynorsk", "nn" },
|
||||
{ "Oriya", "or" },
|
||||
{ "Oromo", "om" },
|
||||
{ "Panjabi", "pa" },
|
||||
{ "Pashto", "ps" },
|
||||
{ "Persian", "fa" },
|
||||
{ "Polish", "pl" },
|
||||
{ "Portuguese", "pt" },
|
||||
{ "Portuguese, Brazilian", "pt_BR" },
|
||||
{ "Punjabi", "pa" },
|
||||
{ "Pushto", "ps" },
|
||||
{ "Quechua", "qu" },
|
||||
{ "Romanian", "ro" },
|
||||
{ "Ruanda", "rw" },
|
||||
{ "Rundi", "rn" },
|
||||
{ "Russian", "ru" },
|
||||
{ "Sami", "se_NO" }, /* Not just "se". */
|
||||
{ "Sanskrit", "sa" },
|
||||
{ "Scottish", "gd" },
|
||||
{ "Serbian", "sr" },
|
||||
{ "Simplified Chinese", "zh_CN" },
|
||||
{ "Sindhi", "sd" },
|
||||
{ "Sinhalese", "si" },
|
||||
{ "Slovak", "sk" },
|
||||
{ "Slovenian", "sl" },
|
||||
{ "Somali", "so" },
|
||||
{ "Spanish", "es" },
|
||||
{ "Sundanese", "su" },
|
||||
{ "Swahili", "sw" },
|
||||
{ "Swedish", "sv" },
|
||||
{ "Tagalog", "tl" },
|
||||
{ "Tajik", "tg" },
|
||||
{ "Tajiki", "tg" },
|
||||
{ "Tamil", "ta" },
|
||||
{ "Tatar", "tt" },
|
||||
{ "Telugu", "te" },
|
||||
{ "Thai", "th" },
|
||||
{ "Tibetan", "bo" },
|
||||
{ "Tigrinya", "ti" },
|
||||
{ "Tongan", "to" },
|
||||
{ "Traditional Chinese", "zh_TW" },
|
||||
{ "Turkish", "tr" },
|
||||
{ "Turkmen", "tk" },
|
||||
{ "Uighur", "ug" },
|
||||
{ "Ukrainian", "uk" },
|
||||
{ "Urdu", "ur" },
|
||||
{ "Uzbek", "uz" },
|
||||
{ "Vietnamese", "vi" },
|
||||
{ "Welsh", "cy" },
|
||||
{ "Yiddish", "yi" }
|
||||
};
|
||||
|
||||
/* Convert new-style locale names with language tags (ISO 639 and ISO 15924)
|
||||
to Unix (ISO 639 and ISO 3166) names. */
|
||||
typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
|
||||
langtag_entry;
|
||||
static const langtag_entry langtag_table[] = {
|
||||
/* MacOS X has "az-Arab", "az-Cyrl", "az-Latn".
|
||||
The default script for az on Unix is Latin. */
|
||||
{ "az-Latn", "az" },
|
||||
/* MacOS X has "ga-dots". Does not yet exist on Unix. */
|
||||
{ "ga-dots", "ga" },
|
||||
/* MacOS X has "kk-Cyrl". Does not yet exist on Unix. */
|
||||
/* MacOS X has "mn-Cyrl", "mn-Mong".
|
||||
The default script for mn on Unix is Cyrillic. */
|
||||
{ "mn-Cyrl", "mn" },
|
||||
/* MacOS X has "ms-Arab", "ms-Latn".
|
||||
The default script for ms on Unix is Latin. */
|
||||
{ "ms-Latn", "ms" },
|
||||
/* MacOS X has "tg-Cyrl".
|
||||
The default script for tg on Unix is Cyrillic. */
|
||||
{ "tg-Cyrl", "tg" },
|
||||
/* MacOS X has "tk-Cyrl". Does not yet exist on Unix. */
|
||||
/* MacOS X has "tt-Cyrl".
|
||||
The default script for tt on Unix is Cyrillic. */
|
||||
{ "tt-Cyrl", "tt" },
|
||||
/* MacOS X has "zh-Hans", "zh-Hant".
|
||||
Country codes are used to distinguish these on Unix. */
|
||||
{ "zh-Hans", "zh_CN" },
|
||||
{ "zh-Hant", "zh_TW" }
|
||||
};
|
||||
|
||||
/* Convert script names (ISO 15924) to Unix conventions.
|
||||
See http://www.unicode.org/iso15924/iso15924-codes.html */
|
||||
typedef struct { const char script[4+1]; const char unixy[9+1]; }
|
||||
script_entry;
|
||||
static const script_entry script_table[] = {
|
||||
{ "Arab", "arabic" },
|
||||
{ "Cyrl", "cyrillic" },
|
||||
{ "Mong", "mongolian" }
|
||||
};
|
||||
|
||||
/* Step 1: Convert using legacy_table. */
|
||||
if (name[0] >= 'A' && name[0] <= 'Z')
|
||||
{
|
||||
unsigned int i1, i2;
|
||||
i1 = 0;
|
||||
i2 = sizeof (legacy_table) / sizeof (legacy_entry);
|
||||
while (i2 - i1 > 1)
|
||||
{
|
||||
/* At this point we know that if name occurs in legacy_table,
|
||||
its index must be >= i1 and < i2. */
|
||||
unsigned int i = (i1 + i2) >> 1;
|
||||
const legacy_entry *p = &legacy_table[i];
|
||||
if (strcmp (name, p->legacy) < 0)
|
||||
i2 = i;
|
||||
else
|
||||
i1 = i;
|
||||
}
|
||||
if (strcmp (name, legacy_table[i1].legacy) == 0)
|
||||
{
|
||||
strcpy (name, legacy_table[i1].unixy);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 2: Convert using langtag_table and script_table. */
|
||||
if (strlen (name) == 7 && name[2] == '-')
|
||||
{
|
||||
unsigned int i1, i2;
|
||||
i1 = 0;
|
||||
i2 = sizeof (langtag_table) / sizeof (langtag_entry);
|
||||
while (i2 - i1 > 1)
|
||||
{
|
||||
/* At this point we know that if name occurs in langtag_table,
|
||||
its index must be >= i1 and < i2. */
|
||||
unsigned int i = (i1 + i2) >> 1;
|
||||
const langtag_entry *p = &langtag_table[i];
|
||||
if (strcmp (name, p->langtag) < 0)
|
||||
i2 = i;
|
||||
else
|
||||
i1 = i;
|
||||
}
|
||||
if (strcmp (name, langtag_table[i1].langtag) == 0)
|
||||
{
|
||||
strcpy (name, langtag_table[i1].unixy);
|
||||
return;
|
||||
}
|
||||
|
||||
i1 = 0;
|
||||
i2 = sizeof (script_table) / sizeof (script_entry);
|
||||
while (i2 - i1 > 1)
|
||||
{
|
||||
/* At this point we know that if (name + 3) occurs in script_table,
|
||||
its index must be >= i1 and < i2. */
|
||||
unsigned int i = (i1 + i2) >> 1;
|
||||
const script_entry *p = &script_table[i];
|
||||
if (strcmp (name + 3, p->script) < 0)
|
||||
i2 = i;
|
||||
else
|
||||
i1 = i;
|
||||
}
|
||||
if (strcmp (name + 3, script_table[i1].script) == 0)
|
||||
{
|
||||
name[2] = '@';
|
||||
strcpy (name + 3, script_table[i1].unixy);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 3: Convert new-style dash to Unix underscore. */
|
||||
{
|
||||
char *p;
|
||||
for (p = name; *p != '\0'; p++)
|
||||
if (*p == '-')
|
||||
*p = '_';
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* XPG3 defines the result of 'setlocale (category, NULL)' as:
|
||||
"Directs 'setlocale()' to query 'category' and return the current
|
||||
setting of 'local'."
|
||||
@ -700,60 +985,104 @@
|
||||
The result must not be freed; it is statically allocated. */
|
||||
|
||||
const char *
|
||||
_nl_locale_name (int category, const char *categoryname)
|
||||
_nl_locale_name_posix (int category, const char *categoryname)
|
||||
{
|
||||
const char *retval;
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
/* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
|
||||
On some systems this can be done by the 'setlocale' function itself. */
|
||||
# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
|
||||
retval = setlocale (category, NULL);
|
||||
# else
|
||||
/* Setting of LC_ALL overwrites all other. */
|
||||
#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
|
||||
return setlocale (category, NULL);
|
||||
#else
|
||||
const char *retval;
|
||||
|
||||
/* Setting of LC_ALL overrides all other. */
|
||||
retval = getenv ("LC_ALL");
|
||||
if (retval == NULL || retval[0] == '\0')
|
||||
{
|
||||
if (retval != NULL && retval[0] != '\0')
|
||||
return retval;
|
||||
/* Next comes the name of the desired category. */
|
||||
retval = getenv (categoryname);
|
||||
if (retval == NULL || retval[0] == '\0')
|
||||
{
|
||||
if (retval != NULL && retval[0] != '\0')
|
||||
return retval;
|
||||
/* Last possibility is the LANG environment variable. */
|
||||
retval = getenv ("LANG");
|
||||
if (retval == NULL || retval[0] == '\0')
|
||||
/* We use C as the default domain. POSIX says this is
|
||||
implementation defined. */
|
||||
retval = "C";
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
if (retval != NULL && retval[0] != '\0')
|
||||
return retval;
|
||||
|
||||
#else /* WIN32 */
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *
|
||||
_nl_locale_name_default (void)
|
||||
{
|
||||
/* POSIX:2001 says:
|
||||
"All implementations shall define a locale as the default locale, to be
|
||||
invoked when no environment variables are set, or set to the empty
|
||||
string. This default locale can be the POSIX locale or any other
|
||||
implementation-defined locale. Some implementations may provide
|
||||
facilities for local installation administrators to set the default
|
||||
locale, customizing it for each location. POSIX:2001 does not require
|
||||
such a facility. */
|
||||
|
||||
#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32))
|
||||
|
||||
/* The system does not have a way of setting the locale, other than the
|
||||
POSIX specified environment variables. We use C as default locale. */
|
||||
return "C";
|
||||
|
||||
#else
|
||||
|
||||
/* Return an XPG style locale name language[_territory][@modifier].
|
||||
Don't even bother determining the codeset; it's not useful in this
|
||||
context, because message catalogs are not specific to a single
|
||||
codeset. */
|
||||
|
||||
# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
|
||||
/* MacOS X 10.2 or newer */
|
||||
{
|
||||
/* Cache the locale name, since CoreFoundation calls are expensive. */
|
||||
static const char *cached_localename;
|
||||
|
||||
if (cached_localename == NULL)
|
||||
{
|
||||
char namebuf[256];
|
||||
# if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */
|
||||
CFLocaleRef locale = CFLocaleCopyCurrent ();
|
||||
CFStringRef name = CFLocaleGetIdentifier (locale);
|
||||
|
||||
if (CFStringGetCString (name, namebuf, sizeof(namebuf),
|
||||
kCFStringEncodingASCII))
|
||||
{
|
||||
_nl_locale_name_canonicalize (namebuf);
|
||||
cached_localename = strdup (namebuf);
|
||||
}
|
||||
CFRelease (locale);
|
||||
# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
|
||||
CFTypeRef value =
|
||||
CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
|
||||
kCFPreferencesCurrentApplication);
|
||||
if (value != NULL
|
||||
&& CFGetTypeID (value) == CFStringGetTypeID ()
|
||||
&& CFStringGetCString ((CFStringRef)value, namebuf, sizeof(namebuf),
|
||||
kCFStringEncodingASCII))
|
||||
{
|
||||
_nl_locale_name_canonicalize (namebuf);
|
||||
cached_localename = strdup (namebuf);
|
||||
}
|
||||
# endif
|
||||
if (cached_localename == NULL)
|
||||
cached_localename = "C";
|
||||
}
|
||||
return cached_localename;
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
# if defined(WIN32) /* WIN32 */
|
||||
{
|
||||
LCID lcid;
|
||||
LANGID langid;
|
||||
int primary, sub;
|
||||
|
||||
/* Let the user override the system settings through environment
|
||||
variables, as on POSIX systems. */
|
||||
retval = getenv ("LC_ALL");
|
||||
if (retval != NULL && retval[0] != '\0')
|
||||
return retval;
|
||||
retval = getenv (categoryname);
|
||||
if (retval != NULL && retval[0] != '\0')
|
||||
return retval;
|
||||
retval = getenv ("LANG");
|
||||
if (retval != NULL && retval[0] != '\0')
|
||||
return retval;
|
||||
|
||||
/* Use native Win32 API locale ID. */
|
||||
lcid = GetThreadLocale ();
|
||||
|
||||
@ -804,6 +1133,10 @@ _nl_locale_name (int category, const char *categoryname)
|
||||
}
|
||||
return "az";
|
||||
case LANG_BASQUE:
|
||||
switch (sub)
|
||||
{
|
||||
case SUBLANG_DEFAULT: return "eu_ES";
|
||||
}
|
||||
return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
|
||||
case LANG_BELARUSIAN: return "be_BY";
|
||||
case LANG_BENGALI:
|
||||
@ -986,6 +1319,10 @@ _nl_locale_name (int category, const char *categoryname)
|
||||
return "mni_IN";
|
||||
case LANG_MARATHI: return "mr_IN";
|
||||
case LANG_MONGOLIAN:
|
||||
switch (sub)
|
||||
{
|
||||
case SUBLANG_DEFAULT: return "mn_MN";
|
||||
}
|
||||
return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
|
||||
case LANG_NEPALI:
|
||||
switch (sub)
|
||||
@ -997,7 +1334,7 @@ _nl_locale_name (int category, const char *categoryname)
|
||||
case LANG_NORWEGIAN:
|
||||
switch (sub)
|
||||
{
|
||||
case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
|
||||
case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO";
|
||||
case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
|
||||
}
|
||||
return "no";
|
||||
@ -1032,6 +1369,10 @@ _nl_locale_name (int category, const char *categoryname)
|
||||
}
|
||||
return "ro";
|
||||
case LANG_RUSSIAN:
|
||||
switch (sub)
|
||||
{
|
||||
case SUBLANG_DEFAULT: return "ru_RU";
|
||||
}
|
||||
return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
|
||||
case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
|
||||
case LANG_SANSKRIT: return "sa_IN";
|
||||
@ -1096,6 +1437,10 @@ _nl_locale_name (int category, const char *categoryname)
|
||||
}
|
||||
return "ber_MA";
|
||||
case LANG_TAMIL:
|
||||
switch (sub)
|
||||
{
|
||||
case SUBLANG_DEFAULT: return "ta_IN";
|
||||
}
|
||||
return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
|
||||
case LANG_TATAR: return "tt_RU";
|
||||
case LANG_TELUGU: return "te_IN";
|
||||
@ -1137,6 +1482,19 @@ _nl_locale_name (int category, const char *categoryname)
|
||||
case LANG_ZULU: return "zu_ZA";
|
||||
default: return "C";
|
||||
}
|
||||
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *
|
||||
_nl_locale_name (int category, const char *categoryname)
|
||||
{
|
||||
const char *retval;
|
||||
|
||||
retval = _nl_locale_name_posix (category, categoryname);
|
||||
if (retval != NULL)
|
||||
return retval;
|
||||
|
||||
return _nl_locale_name_default ();
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>. */
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#define OS2_AWARE
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* When included from os2compat.h we need all the original definitions */
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#if defined __EMX__
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _PLURAL_EXP_H
|
||||
|
1589
intl/plural.c
1589
intl/plural.c
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* The bison generated parser uses alloca. AIX 3 forces us to put this
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _PRINTF_ARGS_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _PRINTF_PARSE_H
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -14,7 +14,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||
|
@ -14,7 +14,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Provide relocatable packages.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003-2004 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
|
||||
@ -72,20 +72,20 @@
|
||||
ISSLASH(C) tests whether C is a directory separator character.
|
||||
IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
|
||||
*/
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS */
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, Cygwin, OS/2, DOS */
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
|
||||
# define HAS_DEVICE(P) \
|
||||
((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
|
||||
&& (P)[1] == ':')
|
||||
# define IS_PATH_WITH_DIR(P) \
|
||||
(strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
|
||||
# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
|
||||
# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
|
||||
#else
|
||||
/* Unix */
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
|
||||
# define FILESYSTEM_PREFIX_LEN(P) 0
|
||||
# define FILE_SYSTEM_PREFIX_LEN(P) 0
|
||||
#endif
|
||||
|
||||
/* Original installation prefix. */
|
||||
@ -189,7 +189,7 @@ compute_curr_prefix (const char *orig_installprefix,
|
||||
|
||||
/* Determine the current installation directory. */
|
||||
{
|
||||
const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
|
||||
const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname);
|
||||
const char *p = curr_pathname + strlen (curr_pathname);
|
||||
char *q;
|
||||
|
||||
@ -216,7 +216,7 @@ compute_curr_prefix (const char *orig_installprefix,
|
||||
const char *rp = rel_installdir + strlen (rel_installdir);
|
||||
const char *cp = curr_installdir + strlen (curr_installdir);
|
||||
const char *cp_base =
|
||||
curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
|
||||
curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir);
|
||||
|
||||
while (rp > rel_installdir && cp > cp_base)
|
||||
{
|
||||
@ -234,8 +234,8 @@ compute_curr_prefix (const char *orig_installprefix,
|
||||
same = true;
|
||||
break;
|
||||
}
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS - case insignificant filesystem */
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, Cygwin, OS/2, DOS - case insignificant filesystem */
|
||||
if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
|
||||
!= (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
|
||||
break;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _RELOCATABLE_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* vsprintf with automatic memory allocation.
|
||||
Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2002-2005 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
|
||||
@ -41,7 +41,7 @@
|
||||
#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
|
||||
#include <string.h> /* memcpy(), strlen() */
|
||||
#include <errno.h> /* errno */
|
||||
#include <limits.h> /* CHAR_BIT */
|
||||
#include <limits.h> /* CHAR_BIT, INT_MAX */
|
||||
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
|
||||
#if WIDE_CHAR_VERSION
|
||||
# include "wprintf-parse.h"
|
||||
@ -52,6 +52,11 @@
|
||||
/* Checked size_t computations. */
|
||||
#include "xsize.h"
|
||||
|
||||
/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
|
||||
#ifndef EOVERFLOW
|
||||
# define EOVERFLOW E2BIG
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WCHAR_T
|
||||
# ifdef HAVE_WCSLEN
|
||||
# define local_wcslen wcslen
|
||||
@ -316,9 +321,8 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
|
||||
const CHAR_T *digitp = dp->precision_start + 1;
|
||||
|
||||
precision = 0;
|
||||
do
|
||||
while (digitp != dp->precision_end)
|
||||
precision = xsum (xtimes (precision, 10), *digitp++ - '0');
|
||||
while (digitp != dp->precision_end);
|
||||
}
|
||||
}
|
||||
|
||||
@ -864,8 +868,19 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
|
||||
free (buf_malloced);
|
||||
CLEANUP ();
|
||||
*lengthp = length;
|
||||
if (length > INT_MAX)
|
||||
goto length_overflow;
|
||||
return result;
|
||||
|
||||
length_overflow:
|
||||
/* We could produce such a big string, but its length doesn't fit into
|
||||
an 'int'. POSIX says that snprintf() fails with errno = EOVERFLOW in
|
||||
this case. */
|
||||
if (result != resultbuf)
|
||||
free (result);
|
||||
errno = EOVERFLOW;
|
||||
return NULL;
|
||||
|
||||
out_of_memory:
|
||||
if (!(result == resultbuf || result == NULL))
|
||||
free (result);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* vsprintf with automatic memory allocation.
|
||||
Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2004 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _VASNPRINTF_H
|
||||
@ -48,7 +48,24 @@ extern "C" {
|
||||
If successful, return the address of the string (this may be = RESULTBUF
|
||||
if no dynamic memory allocation was necessary) and set *LENGTHP to the
|
||||
number of resulting bytes, excluding the trailing NUL. Upon error, set
|
||||
errno and return NULL. */
|
||||
errno and return NULL.
|
||||
|
||||
When dynamic memory allocation occurs, the preallocated buffer is left
|
||||
alone (with possibly modified contents). This makes it possible to use
|
||||
a statically allocated or stack-allocated buffer, like this:
|
||||
|
||||
char buf[100];
|
||||
size_t len = sizeof (buf);
|
||||
char *output = vasnprintf (buf, &len, format, args);
|
||||
if (output == NULL)
|
||||
... error handling ...;
|
||||
else
|
||||
{
|
||||
... use the output string ...;
|
||||
if (output != buf)
|
||||
free (output);
|
||||
}
|
||||
*/
|
||||
extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _VASNWPRINTF_H
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _WPRINTF_PARSE_H
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _XSIZE_H
|
||||
|
@ -1,10 +1,8 @@
|
||||
# codeset.m4 serial AM1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
102
m4/gettext.m4
102
m4/gettext.m4
@ -1,10 +1,8 @@
|
||||
# gettext.m4 serial 28 (gettext-0.13)
|
||||
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# gettext.m4 serial 37 (gettext-0.14.4)
|
||||
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
@ -65,8 +63,8 @@ AC_DEFUN([AM_GNU_GETTEXT],
|
||||
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
|
||||
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
||||
])])])])
|
||||
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
|
||||
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
|
||||
define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
|
||||
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
|
||||
|
||||
AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
||||
ifelse(gt_included_intl, yes, [
|
||||
@ -92,6 +90,9 @@ AC_DEFUN([AM_GNU_GETTEXT],
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
])
|
||||
|
||||
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
|
||||
gt_INTL_MACOSX
|
||||
|
||||
dnl Set USE_NLS.
|
||||
AM_NLS
|
||||
|
||||
@ -138,7 +139,7 @@ changequote([,])dnl
|
||||
], [])[extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
||||
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
||||
gt_cv_func_gnugettext_libc=yes,
|
||||
gt_cv_func_gnugettext_libc=no)])
|
||||
|
||||
@ -172,9 +173,9 @@ extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
const char *_nl_expand_alias (const char *);],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
||||
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
|
||||
gt_cv_func_gnugettext_libintl=yes,
|
||||
gt_cv_func_gnugettext_libintl=no)
|
||||
dnl Now see whether libintl exists and depends on libiconv.
|
||||
@ -193,9 +194,9 @@ extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
const char *_nl_expand_alias (const char *);],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
||||
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
|
||||
[LIBINTL="$LIBINTL $LIBICONV"
|
||||
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
||||
gt_cv_func_gnugettext_libintl=yes
|
||||
@ -238,6 +239,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
|
||||
CATOBJEXT=
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions to use GNU gettext tools.
|
||||
@ -245,6 +247,15 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
|
||||
fi
|
||||
])
|
||||
|
||||
if test -n "$INTL_MACOSX_LIBS"; then
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Some extra flags are needed during linking.
|
||||
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
|
||||
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
@ -320,6 +331,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
|
||||
AC_SUBST(GENCAT)
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLOBJS=
|
||||
if test "$USE_INCLUDED_LIBINTL" = yes; then
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
fi
|
||||
@ -350,6 +362,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
|
||||
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([gt_GLIBC2])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
@ -358,22 +371,23 @@ AC_DEFUN([AM_INTL_SUBDIR],
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
|
||||
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
|
||||
AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
|
||||
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
|
||||
AC_REQUIRE([gt_TYPE_WINT_T])dnl
|
||||
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
|
||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
||||
AC_REQUIRE([gt_TYPE_INTMAX_T])
|
||||
AC_REQUIRE([gt_PRINTF_POSIX])
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([jm_GLIBC21])dnl
|
||||
AC_REQUIRE([gl_GLIBC21])dnl
|
||||
AC_REQUIRE([gt_INTDIV0])dnl
|
||||
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
|
||||
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
|
||||
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
|
||||
AC_REQUIRE([gt_INTTYPES_PRI])dnl
|
||||
AC_REQUIRE([gl_XSIZE])dnl
|
||||
AC_REQUIRE([gt_INTL_MACOSX])dnl
|
||||
|
||||
AC_CHECK_TYPE([ptrdiff_t], ,
|
||||
[AC_DEFINE([ptrdiff_t], [long],
|
||||
@ -427,7 +441,11 @@ __fsetlocking])
|
||||
AM_ICONV
|
||||
AM_LANGINFO_CODESET
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
AM_LC_MESSAGES
|
||||
gt_LC_MESSAGES
|
||||
fi
|
||||
|
||||
if test -n "$INTL_MACOSX_LIBS"; then
|
||||
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
|
||||
fi
|
||||
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
@ -463,6 +481,50 @@ changequote([,])dnl
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for special options needed on MacOS X.
|
||||
dnl Defines INTL_MACOSX_LIBS.
|
||||
AC_DEFUN([gt_INTL_MACOSX],
|
||||
[
|
||||
dnl Check for API introduced in MacOS X 10.2.
|
||||
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
|
||||
gt_cv_func_CFPreferencesCopyAppValue,
|
||||
[gt_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -framework CoreFoundation"
|
||||
AC_TRY_LINK([#include <CFPreferences.h>],
|
||||
[CFPreferencesCopyAppValue(NULL, NULL)],
|
||||
[gt_cv_func_CFPreferencesCopyAppValue=yes],
|
||||
[gt_cv_func_CFPreferencesCopyAppValue=no])
|
||||
CPPFLAGS="$gt_save_CPPFLAGS"
|
||||
LIBS="$gt_save_LIBS"])
|
||||
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
|
||||
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
|
||||
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
|
||||
fi
|
||||
dnl Check for API introduced in MacOS X 10.3.
|
||||
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
|
||||
[gt_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -framework CoreFoundation"
|
||||
AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
|
||||
[gt_cv_func_CFLocaleCopyCurrent=yes],
|
||||
[gt_cv_func_CFLocaleCopyCurrent=no])
|
||||
CPPFLAGS="$gt_save_CPPFLAGS"
|
||||
LIBS="$gt_save_LIBS"])
|
||||
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
|
||||
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
|
||||
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
|
||||
fi
|
||||
INTL_MACOSX_LIBS=
|
||||
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
|
||||
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
|
||||
fi
|
||||
AC_SUBST([INTL_MACOSX_LIBS])
|
||||
])
|
||||
|
||||
|
||||
dnl gt_CHECK_DECL(FUNC, INCLUDES)
|
||||
dnl Check whether a function is declared.
|
||||
AC_DEFUN([gt_CHECK_DECL],
|
||||
|
30
m4/glibc2.m4
Normal file
30
m4/glibc2.m4
Normal file
@ -0,0 +1,30 @@
|
||||
# glibc2.m4 serial 1
|
||||
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Test for the GNU C Library, version 2.0 or newer.
|
||||
# From Bruno Haible.
|
||||
|
||||
AC_DEFUN([gt_GLIBC2],
|
||||
[
|
||||
AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
|
||||
ac_cv_gnu_library_2,
|
||||
[AC_EGREP_CPP([Lucky GNU user],
|
||||
[
|
||||
#include <features.h>
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#if (__GLIBC__ >= 2)
|
||||
Lucky GNU user
|
||||
#endif
|
||||
#endif
|
||||
],
|
||||
ac_cv_gnu_library_2=yes,
|
||||
ac_cv_gnu_library_2=no)
|
||||
]
|
||||
)
|
||||
AC_SUBST(GLIBC2)
|
||||
GLIBC2="$ac_cv_gnu_library_2"
|
||||
]
|
||||
)
|
@ -1,15 +1,13 @@
|
||||
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# glibc21.m4 serial 3
|
||||
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Test for the GNU C Library, version 2.1 or newer.
|
||||
# From Bruno Haible.
|
||||
|
||||
AC_DEFUN([jm_GLIBC21],
|
||||
AC_DEFUN([gl_GLIBC21],
|
||||
[
|
||||
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
|
||||
ac_cv_gnu_library_2_1,
|
||||
|
@ -1,10 +1,8 @@
|
||||
# iconv.m4 serial AM4 (gettext-0.11.3)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
# intdiv0.m4 serial 1 (gettext-0.11.3)
|
||||
dnl Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
16
m4/intmax.m4
16
m4/intmax.m4
@ -1,10 +1,8 @@
|
||||
# intmax.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# intmax.m4 serial 2 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
|
||||
@ -12,8 +10,8 @@ dnl find a replacement if it is lacking.
|
||||
|
||||
AC_DEFUN([gt_TYPE_INTMAX_T],
|
||||
[
|
||||
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
|
||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
||||
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stddef.h>
|
||||
|
@ -1,10 +1,8 @@
|
||||
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
|
||||
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
# inttypes.m4 serial 1 (gettext-0.11.4)
|
||||
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
|
@ -1,26 +1,24 @@
|
||||
# inttypes_h.m4 serial 5 (gettext-0.12)
|
||||
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# inttypes_h.m4 serial 6
|
||||
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
|
||||
# doesn't clash with <sys/types.h>, and declares uintmax_t.
|
||||
|
||||
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
|
||||
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
|
||||
[
|
||||
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
|
||||
AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>
|
||||
#include <inttypes.h>],
|
||||
[uintmax_t i = (uintmax_t) -1;],
|
||||
jm_ac_cv_header_inttypes_h=yes,
|
||||
jm_ac_cv_header_inttypes_h=no)])
|
||||
if test $jm_ac_cv_header_inttypes_h = yes; then
|
||||
gl_cv_header_inttypes_h=yes,
|
||||
gl_cv_header_inttypes_h=no)])
|
||||
if test $gl_cv_header_inttypes_h = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
|
||||
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
|
||||
and declares uintmax_t. ])
|
||||
|
@ -1,10 +1,8 @@
|
||||
# isc-posix.m4 serial 2 (gettext-0.11.2)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
# lcmessage.m4 serial 3 (gettext-0.11.3)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# lcmessage.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
@ -20,12 +18,12 @@ dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
|
||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
|
||||
AC_DEFUN([AM_LC_MESSAGES],
|
||||
AC_DEFUN([gt_LC_MESSAGES],
|
||||
[
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
|
||||
if test $gt_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||
[Define if your <locale.h> file defines LC_MESSAGES.])
|
||||
fi
|
||||
|
@ -1,10 +1,8 @@
|
||||
# lib-ld.m4 serial 3 (gettext-0.13)
|
||||
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
|
@ -1,13 +1,13 @@
|
||||
# lib-link.m4 serial 4 (gettext-0.12)
|
||||
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# lib-link.m4 serial 6 (gettext-0.14.3)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
@ -95,6 +95,8 @@ dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
||||
dnl hardcode_direct, hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
@ -350,7 +352,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
@ -399,7 +401,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
@ -1,10 +1,8 @@
|
||||
# lib-prefix.m4 serial 3 (gettext-0.13)
|
||||
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# lib-prefix.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
@ -71,7 +69,7 @@ AC_DEFUN([AC_LIB_PREFIX],
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
@ -1,10 +1,8 @@
|
||||
# longdouble.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether the compiler supports the 'long double' type.
|
||||
|
@ -1,16 +1,14 @@
|
||||
# longlong.m4 serial 4
|
||||
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# longlong.m4 serial 5
|
||||
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_LONG_LONG if 'long long' works.
|
||||
|
||||
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
|
||||
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
|
||||
[
|
||||
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
|
||||
[AC_TRY_LINK([long long ll = 1LL; int i = 63;],
|
||||
|
16
m4/nls.m4
16
m4/nls.m4
@ -1,10 +1,8 @@
|
||||
# nls.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# nls.m4 serial 2 (gettext-0.14.3)
|
||||
dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
@ -19,6 +17,8 @@ dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
AC_DEFUN([AM_NLS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether NLS is requested])
|
||||
@ -32,6 +32,8 @@ AC_DEFUN([AM_NLS],
|
||||
|
||||
AC_DEFUN([AM_MKINSTALLDIRS],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||
dnl Try to locate it.
|
||||
|
33
m4/po.m4
33
m4/po.m4
@ -1,10 +1,8 @@
|
||||
# po.m4 serial 3 (gettext-0.14)
|
||||
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# po.m4 serial 7 (gettext-0.14.3)
|
||||
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
@ -19,6 +17,8 @@ dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl Checks for all prerequisites of the po subdirectory.
|
||||
AC_DEFUN([AM_PO_SUBDIRS],
|
||||
[
|
||||
@ -34,7 +34,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
|
||||
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
||||
dnl The second test excludes FreeBSD msgfmt.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
|
||||
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
|
||||
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
@ -43,7 +43,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
|
||||
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
||||
dnl The second test excludes FreeBSD xgettext.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
|
||||
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
|
||||
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
@ -51,7 +51,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
|
||||
|
||||
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
||||
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
|
||||
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
@ -106,6 +106,9 @@ AC_DEFUN([AM_PO_SUBDIRS],
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
# Treat a directory as a PO directory if and only if it has a
|
||||
# POTFILES.in file. This allows packages to have multiple PO
|
||||
# directories under different names or in different locations.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
@ -119,7 +122,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
|
||||
if test -n "$OBSOLETE_ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
# Hide the ALL_LINGUAS assigment from automake.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
|
||||
@ -298,7 +301,7 @@ changequote([,])dnl
|
||||
fi
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
|
||||
else
|
||||
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
|
||||
@ -348,7 +351,7 @@ changequote([,])dnl
|
||||
QMFILES="$QMFILES $srcdirpre$lang.qm"
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
@ -389,7 +392,7 @@ changequote([,])dnl
|
||||
QTCATALOGS="$QTCATALOGS $lang.qm"
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
|
||||
done
|
||||
fi
|
||||
@ -409,7 +412,7 @@ EOF
|
||||
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
|
||||
# Add dependencies that cannot be formulated as a simple suffix rule.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
cat >> "$ac_file.tmp" <<EOF
|
||||
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
|
||||
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
|
||||
|
@ -1,10 +1,8 @@
|
||||
# printf-posix.m4 serial 2 (gettext-0.13.1)
|
||||
dnl Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether the printf() function supports POSIX/XSI format strings with
|
||||
|
@ -1,10 +1,8 @@
|
||||
# progtest.m4 serial 3 (gettext-0.12)
|
||||
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# progtest.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
@ -18,6 +16,8 @@ dnl They are *not* in the public domain.
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
# Search path for a program which passes the given test.
|
||||
|
||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
@ -67,6 +67,7 @@ AC_CACHE_VAL(ac_cv_path_$1,
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
|
||||
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
|
||||
if [$3]; then
|
||||
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
|
||||
break 2
|
||||
|
@ -1,10 +1,8 @@
|
||||
# signed.m4 serial 1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
# size_max.m4 serial 2
|
||||
dnl Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
@ -1,26 +1,24 @@
|
||||
# stdint_h.m4 serial 3 (gettext-0.12)
|
||||
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# stdint_h.m4 serial 5
|
||||
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
|
||||
# doesn't clash with <sys/types.h>, and declares uintmax_t.
|
||||
|
||||
AC_DEFUN([jm_AC_HEADER_STDINT_H],
|
||||
AC_DEFUN([gl_AC_HEADER_STDINT_H],
|
||||
[
|
||||
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
|
||||
AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>
|
||||
#include <stdint.h>],
|
||||
[uintmax_t i = (uintmax_t) -1;],
|
||||
jm_ac_cv_header_stdint_h=yes,
|
||||
jm_ac_cv_header_stdint_h=no)])
|
||||
if test $jm_ac_cv_header_stdint_h = yes; then
|
||||
gl_cv_header_stdint_h=yes,
|
||||
gl_cv_header_stdint_h=no)])
|
||||
if test $gl_cv_header_stdint_h = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
|
||||
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
|
||||
and declares uintmax_t. ])
|
||||
|
@ -1,10 +1,8 @@
|
||||
# uintmax_t.m4 serial 7 (gettext-0.12)
|
||||
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# uintmax_t.m4 serial 9
|
||||
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
@ -13,12 +11,12 @@ AC_PREREQ(2.13)
|
||||
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
|
||||
# if it is not already defined in <stdint.h> or <inttypes.h>.
|
||||
|
||||
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
|
||||
AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
|
||||
[
|
||||
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
|
||||
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
|
||||
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
|
||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
||||
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
|
||||
AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
|
||||
test $ac_cv_type_unsigned_long_long = yes \
|
||||
&& ac_type='unsigned long long' \
|
||||
|| ac_type='unsigned long'
|
||||
|
@ -1,16 +1,14 @@
|
||||
# ulonglong.m4 serial 3
|
||||
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# ulonglong.m4 serial 4
|
||||
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
|
||||
|
||||
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
|
||||
AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
|
||||
[
|
||||
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
|
||||
[AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
|
||||
|
@ -1,10 +1,8 @@
|
||||
# wchar_t.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether <stddef.h> has the 'wchar_t' type.
|
||||
|
@ -1,10 +1,8 @@
|
||||
# wint_t.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether <wchar.h> has the 'wint_t' type.
|
||||
|
13
m4/xsize.m4
13
m4/xsize.m4
@ -1,14 +1,13 @@
|
||||
# xsize.m4 serial 2
|
||||
dnl Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
# xsize.m4 serial 3
|
||||
dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_XSIZE],
|
||||
[
|
||||
dnl Prerequisites of lib/xsize.h.
|
||||
AC_REQUIRE([gl_SIZE_MAX])
|
||||
AC_REQUIRE([AC_C_INLINE])
|
||||
AC_CHECK_HEADERS(stdint.h)
|
||||
])
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Makefile for PO directory in any package using GNU gettext.
|
||||
# Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
@ -8,10 +8,11 @@
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
#
|
||||
# Origin: gettext-0.14
|
||||
# Origin: gettext-0.14.4
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
@ -32,7 +33,6 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
AWK = @AWK@
|
||||
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
@ -49,11 +49,11 @@ UPDATEPOFILES = @UPDATEPOFILES@
|
||||
DUMMYPOFILES = @DUMMYPOFILES@
|
||||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
||||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
|
||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
|
||||
$(POFILES) $(GMOFILES) \
|
||||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
||||
|
||||
DISTFILES.extra1 = lyx_pot.py
|
||||
DISTFILES.extra1 = lyx_pot.py postats.sh pocheck.pl
|
||||
|
||||
POTFILE_IN_DEPS = $(shell find $(top_srcdir)/src -name Makefile.am)
|
||||
|
||||
@ -86,6 +86,12 @@ all: all-@USE_NLS@
|
||||
all-yes: stamp-po
|
||||
all-no:
|
||||
|
||||
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
|
||||
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
|
||||
# we don't want to bother translators with empty POT files). We assume that
|
||||
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
|
||||
# In this case, stamp-po is a nop (i.e. a phony target).
|
||||
|
||||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
||||
# been loosely updated. Its purpose is that when a developer or translator
|
||||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
||||
@ -95,10 +101,13 @@ all-no:
|
||||
# $(POFILES) has been designed to not touch files that don't need to be
|
||||
# changed.
|
||||
stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
test ! -f $(srcdir)/$(DOMAIN).pot || \
|
||||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
|
||||
@echo "touch stamp-po"
|
||||
@echo timestamp > stamp-poT
|
||||
@mv stamp-poT stamp-po
|
||||
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
|
||||
echo "touch stamp-po" && \
|
||||
echo timestamp > stamp-poT && \
|
||||
mv stamp-poT stamp-po; \
|
||||
}
|
||||
|
||||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
@ -108,11 +117,16 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
$(MAKE) l10n_pots
|
||||
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
|
||||
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
|
||||
else \
|
||||
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
|
||||
fi; \
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
|
||||
--msgid-bugs-address="$$msgid_bugs_address"
|
||||
test ! -f $(DOMAIN).po || { \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||
@ -297,11 +311,14 @@ dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: $(DISTFILES)
|
||||
dist2: stamp-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
dists="$$dists Makevars.template"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
dists="$$dists $(DOMAIN).pot stamp-po"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/ChangeLog; then \
|
||||
dists="$$dists ChangeLog"; \
|
||||
fi; \
|
||||
@ -313,9 +330,9 @@ dist2: $(DISTFILES)
|
||||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
||||
for file in $$dists; do \
|
||||
if test -f $$file; then \
|
||||
cp -p $$file $(distdir); \
|
||||
cp -p $$file $(distdir) || exit 1; \
|
||||
else \
|
||||
cp -p $(srcdir)/$$file $(distdir); \
|
||||
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
@ -362,7 +379,7 @@ $(DUMMYPOFILES):
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
|
||||
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
41
po/Makevars.template
Normal file
41
po/Makevars.template
Normal file
@ -0,0 +1,41 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS =
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
@ -121,6 +121,7 @@ src/insets/InsetRef.cpp
|
||||
src/insets/InsetTOC.cpp
|
||||
src/insets/InsetTabular.cpp
|
||||
src/insets/InsetText.cpp
|
||||
src/insets/InsetTheorem.cpp
|
||||
src/insets/InsetUrl.cpp
|
||||
src/insets/InsetVSpace.cpp
|
||||
src/insets/InsetWrap.cpp
|
||||
@ -128,6 +129,7 @@ src/insets/RenderGraphic.cpp
|
||||
src/insets/RenderPreview.cpp
|
||||
src/lengthcommon.cpp
|
||||
src/lyxfind.cpp
|
||||
src/mathed/InsetFormulaMacro.cpp
|
||||
src/mathed/InsetMathAMSArray.cpp
|
||||
src/mathed/InsetMathCases.cpp
|
||||
src/mathed/InsetMathGrid.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user