summaryrefslogtreecommitdiffstats
path: root/gl/m4/langinfo_h.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/langinfo_h.m4')
-rw-r--r--gl/m4/langinfo_h.m434
1 files changed, 31 insertions, 3 deletions
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index 11a5698..73bef8b 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
1# langinfo_h.m4 serial 6 1# langinfo_h.m4 serial 7
2dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2013 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.
@@ -16,12 +16,14 @@ AC_DEFUN([gl_LANGINFO_H],
16 16
17 dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS. 17 dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
18 HAVE_LANGINFO_CODESET=0 18 HAVE_LANGINFO_CODESET=0
19 HAVE_LANGINFO_T_FMT_AMPM=0
19 HAVE_LANGINFO_ERA=0 20 HAVE_LANGINFO_ERA=0
21 HAVE_LANGINFO_YESEXPR=0
20 AC_CHECK_HEADERS_ONCE([langinfo.h]) 22 AC_CHECK_HEADERS_ONCE([langinfo.h])
21 if test $ac_cv_header_langinfo_h = yes; then 23 if test $ac_cv_header_langinfo_h = yes; then
22 HAVE_LANGINFO_H=1 24 HAVE_LANGINFO_H=1
23 dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing 25 dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
24 dnl on OpenBSD 3.8. 26 dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
25 AC_CACHE_CHECK([whether langinfo.h defines CODESET], 27 AC_CACHE_CHECK([whether langinfo.h defines CODESET],
26 [gl_cv_header_langinfo_codeset], 28 [gl_cv_header_langinfo_codeset],
27 [AC_COMPILE_IFELSE( 29 [AC_COMPILE_IFELSE(
@@ -34,6 +36,18 @@ int a = CODESET;
34 if test $gl_cv_header_langinfo_codeset = yes; then 36 if test $gl_cv_header_langinfo_codeset = yes; then
35 HAVE_LANGINFO_CODESET=1 37 HAVE_LANGINFO_CODESET=1
36 fi 38 fi
39 AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM],
40 [gl_cv_header_langinfo_t_fmt_ampm],
41 [AC_COMPILE_IFELSE(
42 [AC_LANG_PROGRAM([[#include <langinfo.h>
43int a = T_FMT_AMPM;
44]])],
45 [gl_cv_header_langinfo_t_fmt_ampm=yes],
46 [gl_cv_header_langinfo_t_fmt_ampm=no])
47 ])
48 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
49 HAVE_LANGINFO_T_FMT_AMPM=1
50 fi
37 AC_CACHE_CHECK([whether langinfo.h defines ERA], 51 AC_CACHE_CHECK([whether langinfo.h defines ERA],
38 [gl_cv_header_langinfo_era], 52 [gl_cv_header_langinfo_era],
39 [AC_COMPILE_IFELSE( 53 [AC_COMPILE_IFELSE(
@@ -46,12 +60,26 @@ int a = ERA;
46 if test $gl_cv_header_langinfo_era = yes; then 60 if test $gl_cv_header_langinfo_era = yes; then
47 HAVE_LANGINFO_ERA=1 61 HAVE_LANGINFO_ERA=1
48 fi 62 fi
63 AC_CACHE_CHECK([whether langinfo.h defines YESEXPR],
64 [gl_cv_header_langinfo_yesexpr],
65 [AC_COMPILE_IFELSE(
66 [AC_LANG_PROGRAM([[#include <langinfo.h>
67int a = YESEXPR;
68]])],
69 [gl_cv_header_langinfo_yesexpr=yes],
70 [gl_cv_header_langinfo_yesexpr=no])
71 ])
72 if test $gl_cv_header_langinfo_yesexpr = yes; then
73 HAVE_LANGINFO_YESEXPR=1
74 fi
49 else 75 else
50 HAVE_LANGINFO_H=0 76 HAVE_LANGINFO_H=0
51 fi 77 fi
52 AC_SUBST([HAVE_LANGINFO_H]) 78 AC_SUBST([HAVE_LANGINFO_H])
53 AC_SUBST([HAVE_LANGINFO_CODESET]) 79 AC_SUBST([HAVE_LANGINFO_CODESET])
80 AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
54 AC_SUBST([HAVE_LANGINFO_ERA]) 81 AC_SUBST([HAVE_LANGINFO_ERA])
82 AC_SUBST([HAVE_LANGINFO_YESEXPR])
55 83
56 dnl Check for declarations of anything we want to poison if the 84 dnl Check for declarations of anything we want to poison if the
57 dnl corresponding gnulib module is not in use. 85 dnl corresponding gnulib module is not in use.