diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 21:27:12 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 21:27:12 (GMT) |
commit | 26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch) | |
tree | c4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/m4/intl.m4 | |
parent | 5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff) | |
download | monitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4/intl.m4')
-rw-r--r-- | gl/m4/intl.m4 | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/gl/m4/intl.m4 b/gl/m4/intl.m4 index 335b23c..959bd04 100644 --- a/gl/m4/intl.m4 +++ b/gl/m4/intl.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # intl.m4 serial 17 (gettext-0.18) | 1 | # intl.m4 serial 23 (gettext-0.18.3) |
2 | dnl Copyright (C) 1995-2009 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -17,7 +17,7 @@ dnl Authors: | |||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. |
19 | 19 | ||
20 | AC_PREREQ([2.52]) | 20 | AC_PREREQ([2.60]) |
21 | 21 | ||
22 | dnl Checks for all prerequisites of the intl subdirectory, | 22 | dnl Checks for all prerequisites of the intl subdirectory, |
23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | 23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, |
@@ -25,7 +25,7 @@ dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | |||
25 | AC_DEFUN([AM_INTL_SUBDIR], | 25 | AC_DEFUN([AM_INTL_SUBDIR], |
26 | [ | 26 | [ |
27 | AC_REQUIRE([AC_PROG_INSTALL])dnl | 27 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
28 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake | 28 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
29 | AC_REQUIRE([AC_PROG_CC])dnl | 29 | AC_REQUIRE([AC_PROG_CC])dnl |
30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | 30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
31 | AC_REQUIRE([gt_GLIBC2])dnl | 31 | AC_REQUIRE([gt_GLIBC2])dnl |
@@ -55,21 +55,19 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
55 | [AC_DEFINE([ptrdiff_t], [long], | 55 | [AC_DEFINE([ptrdiff_t], [long], |
56 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) | 56 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) |
57 | ]) | 57 | ]) |
58 | AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) | 58 | AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h]) |
59 | AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ | 59 | AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ |
60 | snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) | 60 | snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) |
61 | 61 | ||
62 | dnl Use the _snprintf function only if it is declared (because on NetBSD it | 62 | dnl Use the _snprintf function only if it is declared (because on NetBSD it |
63 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). | 63 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). |
64 | gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) | 64 | AC_CHECK_DECLS([_snprintf _snwprintf], , , [#include <stdio.h>]) |
65 | gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) | ||
66 | 65 | ||
67 | dnl Use the *_unlocked functions only if they are declared. | 66 | dnl Use the *_unlocked functions only if they are declared. |
68 | dnl (because some of them were defined without being declared in Solaris | 67 | dnl (because some of them were defined without being declared in Solaris |
69 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | 68 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
70 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | 69 | dnl on Solaris 2.5.1 to run on Solaris 2.6). |
71 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | 70 | AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>]) |
72 | gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) | ||
73 | 71 | ||
74 | case $gt_cv_func_printf_posix in | 72 | case $gt_cv_func_printf_posix in |
75 | *yes) HAVE_POSIX_PRINTF=1 ;; | 73 | *yes) HAVE_POSIX_PRINTF=1 ;; |
@@ -220,9 +218,10 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE], | |||
220 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | 218 | AC_REQUIRE([gt_INTTYPES_PRI])dnl |
221 | AC_REQUIRE([gl_LOCK])dnl | 219 | AC_REQUIRE([gl_LOCK])dnl |
222 | 220 | ||
223 | AC_TRY_LINK( | 221 | AC_LINK_IFELSE( |
224 | [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], | 222 | [AC_LANG_PROGRAM( |
225 | [], | 223 | [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], |
224 | [[]])], | ||
226 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], | 225 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], |
227 | [Define to 1 if the compiler understands __builtin_expect.])]) | 226 | [Define to 1 if the compiler understands __builtin_expect.])]) |
228 | 227 | ||
@@ -235,9 +234,7 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE], | |||
235 | dnl (because some of them were defined without being declared in Solaris | 234 | dnl (because some of them were defined without being declared in Solaris |
236 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | 235 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
237 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | 236 | dnl on Solaris 2.5.1 to run on Solaris 2.6). |
238 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | 237 | AC_CHECK_DECLS([feof_unlocked fgets_unlocked], , , [#include <stdio.h>]) |
239 | gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>]) | ||
240 | gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>]) | ||
241 | 238 | ||
242 | AM_ICONV | 239 | AM_ICONV |
243 | 240 | ||
@@ -272,23 +269,3 @@ changequote([,])dnl | |||
272 | INTLBISON=: | 269 | INTLBISON=: |
273 | fi | 270 | fi |
274 | ]) | 271 | ]) |
275 | |||
276 | |||
277 | dnl gt_CHECK_DECL(FUNC, INCLUDES) | ||
278 | dnl Check whether a function is declared. | ||
279 | AC_DEFUN([gt_CHECK_DECL], | ||
280 | [ | ||
281 | AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1], | ||
282 | [AC_TRY_COMPILE([$2], [ | ||
283 | #ifndef $1 | ||
284 | char *p = (char *) $1; | ||
285 | #endif | ||
286 | ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) | ||
287 | if test $ac_cv_have_decl_$1 = yes; then | ||
288 | gt_value=1 | ||
289 | else | ||
290 | gt_value=0 | ||
291 | fi | ||
292 | AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], | ||
293 | [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) | ||
294 | ]) | ||