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/nl_langinfo.m4 | |
parent | 5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff) | |
download | monitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4/nl_langinfo.m4')
-rw-r--r-- | gl/m4/nl_langinfo.m4 | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4 index ad456a2..25e2101 100644 --- a/gl/m4/nl_langinfo.m4 +++ b/gl/m4/nl_langinfo.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # nl_langinfo.m4 serial 3 | 1 | # nl_langinfo.m4 serial 5 |
2 | dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2009-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. |
@@ -9,17 +9,42 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO], | |||
9 | AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) | 9 | AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) |
10 | AC_REQUIRE([gl_LANGINFO_H]) | 10 | AC_REQUIRE([gl_LANGINFO_H]) |
11 | AC_CHECK_FUNCS_ONCE([nl_langinfo]) | 11 | AC_CHECK_FUNCS_ONCE([nl_langinfo]) |
12 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
12 | if test $ac_cv_func_nl_langinfo = yes; then | 13 | if test $ac_cv_func_nl_langinfo = yes; then |
13 | if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then | 14 | # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. |
15 | AC_CACHE_CHECK([whether YESEXPR works], | ||
16 | [gl_cv_func_nl_langinfo_yesexpr_works], | ||
17 | [AC_RUN_IFELSE( | ||
18 | [AC_LANG_PROGRAM([[#include <langinfo.h> | ||
19 | ]], [[return !*nl_langinfo(YESEXPR); | ||
20 | ]])], | ||
21 | [gl_cv_func_nl_langinfo_yesexpr_works=yes], | ||
22 | [gl_cv_func_nl_langinfo_yesexpr_works=no], | ||
23 | [ | ||
24 | case "$host_os" in | ||
25 | # Guess no on irix systems. | ||
26 | irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; | ||
27 | # Guess yes elsewhere. | ||
28 | *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; | ||
29 | esac | ||
30 | ]) | ||
31 | ]) | ||
32 | case $gl_cv_func_nl_langinfo_yesexpr_works in | ||
33 | *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; | ||
34 | *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; | ||
35 | esac | ||
36 | AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], | ||
37 | [$FUNC_NL_LANGINFO_YESEXPR_WORKS], | ||
38 | [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) | ||
39 | if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ | ||
40 | && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then | ||
14 | : | 41 | : |
15 | else | 42 | else |
16 | REPLACE_NL_LANGINFO=1 | 43 | REPLACE_NL_LANGINFO=1 |
17 | AC_DEFINE([REPLACE_NL_LANGINFO], [1], | 44 | AC_DEFINE([REPLACE_NL_LANGINFO], [1], |
18 | [Define if nl_langinfo exists but is overridden by gnulib.]) | 45 | [Define if nl_langinfo exists but is overridden by gnulib.]) |
19 | AC_LIBOBJ([nl_langinfo]) | ||
20 | fi | 46 | fi |
21 | else | 47 | else |
22 | HAVE_NL_LANGINFO=0 | 48 | HAVE_NL_LANGINFO=0 |
23 | AC_LIBOBJ([nl_langinfo]) | ||
24 | fi | 49 | fi |
25 | ]) | 50 | ]) |