diff options
Diffstat (limited to 'm4/gettext.m4')
-rw-r--r-- | m4/gettext.m4 | 102 |
1 files changed, 20 insertions, 82 deletions
diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 624a8078..a374f03f 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 | |||
@@ -1,8 +1,10 @@ | |||
1 | # gettext.m4 serial 37 (gettext-0.14.4) | 1 | # gettext.m4 serial 28 (gettext-0.13) |
2 | dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software, distributed under the terms of the GNU |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl General Public License. As a special exception to the GNU General |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl Public License, this file may be distributed as part of a program |
6 | dnl that contains a configuration script generated by Autoconf, under | ||
7 | dnl the same distribution terms as the rest of that program. | ||
6 | dnl | 8 | dnl |
7 | dnl This file can can be used in projects which are not available under | 9 | dnl This file can can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 10 | dnl the GNU General Public License or the GNU Library General Public |
@@ -63,8 +65,8 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
63 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | 65 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
64 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | 66 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
65 | ])])])]) | 67 | ])])])]) |
66 | define([gt_included_intl], ifelse([$1], [external], [no], [yes])) | 68 | define(gt_included_intl, ifelse([$1], [external], [no], [yes])) |
67 | define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) | 69 | define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) |
68 | 70 | ||
69 | AC_REQUIRE([AM_PO_SUBDIRS])dnl | 71 | AC_REQUIRE([AM_PO_SUBDIRS])dnl |
70 | ifelse(gt_included_intl, yes, [ | 72 | ifelse(gt_included_intl, yes, [ |
@@ -90,9 +92,6 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
90 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | 92 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
91 | ]) | 93 | ]) |
92 | 94 | ||
93 | dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. | ||
94 | gt_INTL_MACOSX | ||
95 | |||
96 | dnl Set USE_NLS. | 95 | dnl Set USE_NLS. |
97 | AM_NLS | 96 | AM_NLS |
98 | 97 | ||
@@ -139,7 +138,7 @@ changequote([,])dnl | |||
139 | ], [])[extern int _nl_msg_cat_cntr; | 138 | ], [])[extern int _nl_msg_cat_cntr; |
140 | extern int *_nl_domain_bindings;], | 139 | extern int *_nl_domain_bindings;], |
141 | [bindtextdomain ("", ""); | 140 | [bindtextdomain ("", ""); |
142 | return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], | 141 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], |
143 | gt_cv_func_gnugettext_libc=yes, | 142 | gt_cv_func_gnugettext_libc=yes, |
144 | gt_cv_func_gnugettext_libc=no)]) | 143 | gt_cv_func_gnugettext_libc=no)]) |
145 | 144 | ||
@@ -173,9 +172,9 @@ extern | |||
173 | #ifdef __cplusplus | 172 | #ifdef __cplusplus |
174 | "C" | 173 | "C" |
175 | #endif | 174 | #endif |
176 | const char *_nl_expand_alias (const char *);], | 175 | const char *_nl_expand_alias ();], |
177 | [bindtextdomain ("", ""); | 176 | [bindtextdomain ("", ""); |
178 | return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | 177 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], |
179 | gt_cv_func_gnugettext_libintl=yes, | 178 | gt_cv_func_gnugettext_libintl=yes, |
180 | gt_cv_func_gnugettext_libintl=no) | 179 | gt_cv_func_gnugettext_libintl=no) |
181 | dnl Now see whether libintl exists and depends on libiconv. | 180 | dnl Now see whether libintl exists and depends on libiconv. |
@@ -194,9 +193,9 @@ extern | |||
194 | #ifdef __cplusplus | 193 | #ifdef __cplusplus |
195 | "C" | 194 | "C" |
196 | #endif | 195 | #endif |
197 | const char *_nl_expand_alias (const char *);], | 196 | const char *_nl_expand_alias ();], |
198 | [bindtextdomain ("", ""); | 197 | [bindtextdomain ("", ""); |
199 | return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | 198 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], |
200 | [LIBINTL="$LIBINTL $LIBICONV" | 199 | [LIBINTL="$LIBINTL $LIBICONV" |
201 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | 200 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" |
202 | gt_cv_func_gnugettext_libintl=yes | 201 | gt_cv_func_gnugettext_libintl=yes |
@@ -239,7 +238,6 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], | |||
239 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | 238 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
240 | fi | 239 | fi |
241 | 240 | ||
242 | CATOBJEXT= | ||
243 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | 241 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
244 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | 242 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
245 | dnl Mark actions to use GNU gettext tools. | 243 | dnl Mark actions to use GNU gettext tools. |
@@ -247,15 +245,6 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], | |||
247 | fi | 245 | fi |
248 | ]) | 246 | ]) |
249 | 247 | ||
250 | if test -n "$INTL_MACOSX_LIBS"; then | ||
251 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
252 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
253 | dnl Some extra flags are needed during linking. | ||
254 | LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" | ||
255 | LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" | ||
256 | fi | ||
257 | fi | ||
258 | |||
259 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | 248 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
260 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | 249 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
261 | AC_DEFINE(ENABLE_NLS, 1, | 250 | AC_DEFINE(ENABLE_NLS, 1, |
@@ -331,7 +320,6 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], | |||
331 | AC_SUBST(GENCAT) | 320 | AC_SUBST(GENCAT) |
332 | 321 | ||
333 | dnl For backward compatibility. Some Makefiles may be using this. | 322 | dnl For backward compatibility. Some Makefiles may be using this. |
334 | INTLOBJS= | ||
335 | if test "$USE_INCLUDED_LIBINTL" = yes; then | 323 | if test "$USE_INCLUDED_LIBINTL" = yes; then |
336 | INTLOBJS="\$(GETTOBJS)" | 324 | INTLOBJS="\$(GETTOBJS)" |
337 | fi | 325 | fi |
@@ -362,7 +350,6 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
362 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl | 350 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl |
363 | AC_REQUIRE([AC_PROG_CC])dnl | 351 | AC_REQUIRE([AC_PROG_CC])dnl |
364 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | 352 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
365 | AC_REQUIRE([gt_GLIBC2])dnl | ||
366 | AC_REQUIRE([AC_PROG_RANLIB])dnl | 353 | AC_REQUIRE([AC_PROG_RANLIB])dnl |
367 | AC_REQUIRE([AC_ISC_POSIX])dnl | 354 | AC_REQUIRE([AC_ISC_POSIX])dnl |
368 | AC_REQUIRE([AC_HEADER_STDC])dnl | 355 | AC_REQUIRE([AC_HEADER_STDC])dnl |
@@ -371,23 +358,22 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
371 | AC_REQUIRE([AC_C_INLINE])dnl | 358 | AC_REQUIRE([AC_C_INLINE])dnl |
372 | AC_REQUIRE([AC_TYPE_OFF_T])dnl | 359 | AC_REQUIRE([AC_TYPE_OFF_T])dnl |
373 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl | 360 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
374 | AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl | 361 | AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl |
375 | AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl | 362 | AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl |
376 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl | 363 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl |
377 | AC_REQUIRE([gt_TYPE_WINT_T])dnl | 364 | AC_REQUIRE([gt_TYPE_WINT_T])dnl |
378 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | 365 | AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) |
379 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | 366 | AC_REQUIRE([jm_AC_HEADER_STDINT_H]) |
380 | AC_REQUIRE([gt_TYPE_INTMAX_T]) | 367 | AC_REQUIRE([gt_TYPE_INTMAX_T]) |
381 | AC_REQUIRE([gt_PRINTF_POSIX]) | 368 | AC_REQUIRE([gt_PRINTF_POSIX]) |
382 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl | 369 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
383 | AC_REQUIRE([AC_FUNC_MMAP])dnl | 370 | AC_REQUIRE([AC_FUNC_MMAP])dnl |
384 | AC_REQUIRE([gl_GLIBC21])dnl | 371 | AC_REQUIRE([jm_GLIBC21])dnl |
385 | AC_REQUIRE([gt_INTDIV0])dnl | 372 | AC_REQUIRE([gt_INTDIV0])dnl |
386 | AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl | 373 | AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl |
387 | AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl | 374 | AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl |
388 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | 375 | AC_REQUIRE([gt_INTTYPES_PRI])dnl |
389 | AC_REQUIRE([gl_XSIZE])dnl | 376 | AC_REQUIRE([gl_XSIZE])dnl |
390 | AC_REQUIRE([gt_INTL_MACOSX])dnl | ||
391 | 377 | ||
392 | AC_CHECK_TYPE([ptrdiff_t], , | 378 | AC_CHECK_TYPE([ptrdiff_t], , |
393 | [AC_DEFINE([ptrdiff_t], [long], | 379 | [AC_DEFINE([ptrdiff_t], [long], |
@@ -441,11 +427,7 @@ __fsetlocking]) | |||
441 | AM_ICONV | 427 | AM_ICONV |
442 | AM_LANGINFO_CODESET | 428 | AM_LANGINFO_CODESET |
443 | if test $ac_cv_header_locale_h = yes; then | 429 | if test $ac_cv_header_locale_h = yes; then |
444 | gt_LC_MESSAGES | 430 | AM_LC_MESSAGES |
445 | fi | ||
446 | |||
447 | if test -n "$INTL_MACOSX_LIBS"; then | ||
448 | CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" | ||
449 | fi | 431 | fi |
450 | 432 | ||
451 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, | 433 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, |
@@ -481,50 +463,6 @@ changequote([,])dnl | |||
481 | ]) | 463 | ]) |
482 | 464 | ||
483 | 465 | ||
484 | dnl Checks for special options needed on MacOS X. | ||
485 | dnl Defines INTL_MACOSX_LIBS. | ||
486 | AC_DEFUN([gt_INTL_MACOSX], | ||
487 | [ | ||
488 | dnl Check for API introduced in MacOS X 10.2. | ||
489 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], | ||
490 | gt_cv_func_CFPreferencesCopyAppValue, | ||
491 | [gt_save_CPPFLAGS="$CPPFLAGS" | ||
492 | CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" | ||
493 | gt_save_LIBS="$LIBS" | ||
494 | LIBS="$LIBS -framework CoreFoundation" | ||
495 | AC_TRY_LINK([#include <CFPreferences.h>], | ||
496 | [CFPreferencesCopyAppValue(NULL, NULL)], | ||
497 | [gt_cv_func_CFPreferencesCopyAppValue=yes], | ||
498 | [gt_cv_func_CFPreferencesCopyAppValue=no]) | ||
499 | CPPFLAGS="$gt_save_CPPFLAGS" | ||
500 | LIBS="$gt_save_LIBS"]) | ||
501 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then | ||
502 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, | ||
503 | [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) | ||
504 | fi | ||
505 | dnl Check for API introduced in MacOS X 10.3. | ||
506 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, | ||
507 | [gt_save_CPPFLAGS="$CPPFLAGS" | ||
508 | CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" | ||
509 | gt_save_LIBS="$LIBS" | ||
510 | LIBS="$LIBS -framework CoreFoundation" | ||
511 | AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();], | ||
512 | [gt_cv_func_CFLocaleCopyCurrent=yes], | ||
513 | [gt_cv_func_CFLocaleCopyCurrent=no]) | ||
514 | CPPFLAGS="$gt_save_CPPFLAGS" | ||
515 | LIBS="$gt_save_LIBS"]) | ||
516 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
517 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, | ||
518 | [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) | ||
519 | fi | ||
520 | INTL_MACOSX_LIBS= | ||
521 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
522 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" | ||
523 | fi | ||
524 | AC_SUBST([INTL_MACOSX_LIBS]) | ||
525 | ]) | ||
526 | |||
527 | |||
528 | dnl gt_CHECK_DECL(FUNC, INCLUDES) | 466 | dnl gt_CHECK_DECL(FUNC, INCLUDES) |
529 | dnl Check whether a function is declared. | 467 | dnl Check whether a function is declared. |
530 | AC_DEFUN([gt_CHECK_DECL], | 468 | AC_DEFUN([gt_CHECK_DECL], |