summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2010-04-14 14:44:53 -0700
committerRoland McGrath <roland@redhat.com>2010-04-14 14:44:53 -0700
commit6823414c51fce039e6652b50e7fa65e3faee8ff4 (patch)
tree781a124caa1277018716ecf7bda2d0006d9e4981 /m4
parentAdd missing file for dist. (diff)
downloadelfutils-6823414c51fce039e6652b50e7fa65e3faee8ff4.tar.gz
elfutils-6823414c51fce039e6652b50e7fa65e3faee8ff4.tar.bz2
elfutils-6823414c51fce039e6652b50e7fa65e3faee8ff4.tar.xz
Update gettext boilerplate from 0.17. Add LINGUAS file so translations get installed.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog6
-rw-r--r--m4/gettext.m442
-rw-r--r--m4/iconv.m487
-rw-r--r--m4/po.m425
4 files changed, 114 insertions, 46 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index d116ccdc..d4f2bc1b 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,9 @@
12010-04-14 Roland McGrath <roland@redhat.com>
2
3 * gettext.m4: Upgrade to gettext-0.17.
4 * iconv.m4: Upgrade to gettext-0.17.
5 * po.m4: Upgrade to gettext-0.17.
6
12009-08-26 Roland McGrath <roland@redhat.com> 72009-08-26 Roland McGrath <roland@redhat.com>
2 8
3 * zip.m4 (eu_ZIPLIB): Don't apply lib/LIB suffix to args. 9 * zip.m4 (eu_ZIPLIB): Don't apply lib/LIB suffix to args.
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index 91c345e9..c9ae1f7d 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -1,5 +1,5 @@
1# gettext.m4 serial 59 (gettext-0.16.1) 1# gettext.m4 serial 60 (gettext-0.17)
2dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -362,44 +362,6 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
362]) 362])
363 363
364 364
365dnl Checks for special options needed on MacOS X.
366dnl Defines INTL_MACOSX_LIBS.
367AC_DEFUN([gt_INTL_MACOSX],
368[
369 dnl Check for API introduced in MacOS X 10.2.
370 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
371 gt_cv_func_CFPreferencesCopyAppValue,
372 [gt_save_LIBS="$LIBS"
373 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
374 AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
375 [CFPreferencesCopyAppValue(NULL, NULL)],
376 [gt_cv_func_CFPreferencesCopyAppValue=yes],
377 [gt_cv_func_CFPreferencesCopyAppValue=no])
378 LIBS="$gt_save_LIBS"])
379 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
380 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
381 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
382 fi
383 dnl Check for API introduced in MacOS X 10.3.
384 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
385 [gt_save_LIBS="$LIBS"
386 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
387 AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
388 [gt_cv_func_CFLocaleCopyCurrent=yes],
389 [gt_cv_func_CFLocaleCopyCurrent=no])
390 LIBS="$gt_save_LIBS"])
391 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
392 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
393 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
394 fi
395 INTL_MACOSX_LIBS=
396 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
397 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
398 fi
399 AC_SUBST([INTL_MACOSX_LIBS])
400])
401
402
403dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. 365dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
404m4_define([gt_NEEDS_INIT], 366m4_define([gt_NEEDS_INIT],
405[ 367[
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 654c4158..66bc76f4 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,5 +1,5 @@
1# iconv.m4 serial AM4 (gettext-0.11.3) 1# iconv.m4 serial AM6 (gettext-0.17)
2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -21,6 +21,7 @@ AC_DEFUN([AM_ICONV_LINK],
21[ 21[
22 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 22 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
23 dnl those with the standalone portable GNU libiconv installed). 23 dnl those with the standalone portable GNU libiconv installed).
24 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
24 25
25 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 26 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
26 dnl accordingly. 27 dnl accordingly.
@@ -33,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK],
33 am_save_CPPFLAGS="$CPPFLAGS" 34 am_save_CPPFLAGS="$CPPFLAGS"
34 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
35 36
36 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 37 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
37 am_cv_func_iconv="no, consider installing GNU libiconv" 38 am_cv_func_iconv="no, consider installing GNU libiconv"
38 am_cv_lib_iconv=no 39 am_cv_lib_iconv=no
39 AC_TRY_LINK([#include <stdlib.h> 40 AC_TRY_LINK([#include <stdlib.h>
@@ -56,7 +57,85 @@ AC_DEFUN([AM_ICONV_LINK],
56 fi 57 fi
57 ]) 58 ])
58 if test "$am_cv_func_iconv" = yes; then 59 if test "$am_cv_func_iconv" = yes; then
59 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 60 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
61 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
62 am_save_LIBS="$LIBS"
63 if test $am_cv_lib_iconv = yes; then
64 LIBS="$LIBS $LIBICONV"
65 fi
66 AC_TRY_RUN([
67#include <iconv.h>
68#include <string.h>
69int main ()
70{
71 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
72 returns. */
73 {
74 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
75 if (cd_utf8_to_88591 != (iconv_t)(-1))
76 {
77 static const char input[] = "\342\202\254"; /* EURO SIGN */
78 char buf[10];
79 const char *inptr = input;
80 size_t inbytesleft = strlen (input);
81 char *outptr = buf;
82 size_t outbytesleft = sizeof (buf);
83 size_t res = iconv (cd_utf8_to_88591,
84 (char **) &inptr, &inbytesleft,
85 &outptr, &outbytesleft);
86 if (res == 0)
87 return 1;
88 }
89 }
90#if 0 /* This bug could be worked around by the caller. */
91 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
92 {
93 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
94 if (cd_88591_to_utf8 != (iconv_t)(-1))
95 {
96 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
97 char buf[50];
98 const char *inptr = input;
99 size_t inbytesleft = strlen (input);
100 char *outptr = buf;
101 size_t outbytesleft = sizeof (buf);
102 size_t res = iconv (cd_88591_to_utf8,
103 (char **) &inptr, &inbytesleft,
104 &outptr, &outbytesleft);
105 if ((int)res > 0)
106 return 1;
107 }
108 }
109#endif
110 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
111 provided. */
112 if (/* Try standardized names. */
113 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
114 /* Try IRIX, OSF/1 names. */
115 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
116 /* Try AIX names. */
117 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
118 /* Try HP-UX names. */
119 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
120 return 1;
121 return 0;
122}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
123 [case "$host_os" in
124 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
125 *) am_cv_func_iconv_works="guessing yes" ;;
126 esac])
127 LIBS="$am_save_LIBS"
128 ])
129 case "$am_cv_func_iconv_works" in
130 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
131 *) am_func_iconv=yes ;;
132 esac
133 else
134 am_func_iconv=no am_cv_lib_iconv=no
135 fi
136 if test "$am_func_iconv" = yes; then
137 AC_DEFINE(HAVE_ICONV, 1,
138 [Define if you have the iconv() function and it works.])
60 fi 139 fi
61 if test "$am_cv_lib_iconv" = yes; then 140 if test "$am_cv_lib_iconv" = yes; then
62 AC_MSG_CHECKING([how to link with libiconv]) 141 AC_MSG_CHECKING([how to link with libiconv])
diff --git a/m4/po.m4 b/m4/po.m4
index 00133ef3..0734762a 100644
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -1,5 +1,5 @@
1# po.m4 serial 13 (gettext-0.15) 1# po.m4 serial 15 (gettext-0.17)
2dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -27,6 +27,10 @@ AC_DEFUN([AM_PO_SUBDIRS],
27 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake 27 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
28 AC_REQUIRE([AM_NLS])dnl 28 AC_REQUIRE([AM_NLS])dnl
29 29
30 dnl Release version of the gettext macros. This is used to ensure that
31 dnl the gettext macros and po/Makefile.in.in are in sync.
32 AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
33
30 dnl Perform the following tests also if --disable-nls has been given, 34 dnl Perform the following tests also if --disable-nls has been given,
31 dnl because they are needed for "make dist" to work. 35 dnl because they are needed for "make dist" to work.
32 36
@@ -84,6 +88,10 @@ changequote([,])dnl
84 test -n "$localedir" || localedir='${datadir}/locale' 88 test -n "$localedir" || localedir='${datadir}/locale'
85 AC_SUBST([localedir]) 89 AC_SUBST([localedir])
86 90
91 dnl Support for AM_XGETTEXT_OPTION.
92 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
93 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
94
87 AC_CONFIG_COMMANDS([po-directories], [[ 95 AC_CONFIG_COMMANDS([po-directories], [[
88 for ac_file in $CONFIG_FILES; do 96 for ac_file in $CONFIG_FILES; do
89 # Support "outfile[:infile[:infile...]]" 97 # Support "outfile[:infile[:infile...]]"
@@ -426,3 +434,16 @@ EOF
426 fi 434 fi
427 mv "$ac_file.tmp" "$ac_file" 435 mv "$ac_file.tmp" "$ac_file"
428]) 436])
437
438dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
439AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
440[
441 XGETTEXT_EXTRA_OPTIONS=
442])
443
444dnl Registers an option to be passed to xgettext in the po subdirectory.
445AC_DEFUN([AM_XGETTEXT_OPTION],
446[
447 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
448 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
449])