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.m433
1 files changed, 2 insertions, 31 deletions
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index 69f936f0..3ed8d593 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,6 +1,6 @@
1# langinfo_h.m4 1# langinfo_h.m4
2# serial 13 2# serial 14
3dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. 3dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -18,18 +18,15 @@ AC_DEFUN_ONCE([gl_LANGINFO_H],
18 18
19 dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS. 19 dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
20 HAVE_LANGINFO_CODESET=0 20 HAVE_LANGINFO_CODESET=0
21 HAVE_LANGINFO_T_FMT_AMPM=0
22 HAVE_LANGINFO_ALTMON=0 21 HAVE_LANGINFO_ALTMON=0
23 HAVE_LANGINFO_ABALTMON=0 22 HAVE_LANGINFO_ABALTMON=0
24 HAVE_LANGINFO_ERA=0 23 HAVE_LANGINFO_ERA=0
25 HAVE_LANGINFO_YESEXPR=0
26 AC_CHECK_HEADERS_ONCE([langinfo.h]) 24 AC_CHECK_HEADERS_ONCE([langinfo.h])
27 if test $ac_cv_header_langinfo_h = yes; then 25 if test $ac_cv_header_langinfo_h = yes; then
28 HAVE_LANGINFO_H=1 26 HAVE_LANGINFO_H=1
29 dnl Determine what <langinfo.h> defines. 27 dnl Determine what <langinfo.h> defines.
30 dnl CODESET is missing on OpenBSD 3.8. 28 dnl CODESET is missing on OpenBSD 3.8.
31 dnl ERA etc. are missing on OpenBSD 6.7. 29 dnl ERA etc. are missing on OpenBSD 6.7.
32 dnl T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
33 dnl ALTMON_* are missing on glibc 2.26 and many other systems. 30 dnl ALTMON_* are missing on glibc 2.26 and many other systems.
34 dnl ABALTMON_* are missing on glibc 2.41 and many other systems. 31 dnl ABALTMON_* are missing on glibc 2.41 and many other systems.
35 AC_CACHE_CHECK([whether langinfo.h defines CODESET], 32 AC_CACHE_CHECK([whether langinfo.h defines CODESET],
@@ -44,18 +41,6 @@ int a = CODESET;
44 if test $gl_cv_header_langinfo_codeset = yes; then 41 if test $gl_cv_header_langinfo_codeset = yes; then
45 HAVE_LANGINFO_CODESET=1 42 HAVE_LANGINFO_CODESET=1
46 fi 43 fi
47 AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM],
48 [gl_cv_header_langinfo_t_fmt_ampm],
49 [AC_COMPILE_IFELSE(
50 [AC_LANG_PROGRAM([[#include <langinfo.h>
51int a = T_FMT_AMPM;
52]])],
53 [gl_cv_header_langinfo_t_fmt_ampm=yes],
54 [gl_cv_header_langinfo_t_fmt_ampm=no])
55 ])
56 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
57 HAVE_LANGINFO_T_FMT_AMPM=1
58 fi
59 AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1], 44 AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1],
60 [gl_cv_header_langinfo_altmon], 45 [gl_cv_header_langinfo_altmon],
61 [AC_COMPILE_IFELSE( 46 [AC_COMPILE_IFELSE(
@@ -92,28 +77,14 @@ int a = ERA;
92 if test $gl_cv_header_langinfo_era = yes; then 77 if test $gl_cv_header_langinfo_era = yes; then
93 HAVE_LANGINFO_ERA=1 78 HAVE_LANGINFO_ERA=1
94 fi 79 fi
95 AC_CACHE_CHECK([whether langinfo.h defines YESEXPR],
96 [gl_cv_header_langinfo_yesexpr],
97 [AC_COMPILE_IFELSE(
98 [AC_LANG_PROGRAM([[#include <langinfo.h>
99int a = YESEXPR;
100]])],
101 [gl_cv_header_langinfo_yesexpr=yes],
102 [gl_cv_header_langinfo_yesexpr=no])
103 ])
104 if test $gl_cv_header_langinfo_yesexpr = yes; then
105 HAVE_LANGINFO_YESEXPR=1
106 fi
107 else 80 else
108 HAVE_LANGINFO_H=0 81 HAVE_LANGINFO_H=0
109 fi 82 fi
110 AC_SUBST([HAVE_LANGINFO_H]) 83 AC_SUBST([HAVE_LANGINFO_H])
111 AC_SUBST([HAVE_LANGINFO_CODESET]) 84 AC_SUBST([HAVE_LANGINFO_CODESET])
112 AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
113 AC_SUBST([HAVE_LANGINFO_ALTMON]) 85 AC_SUBST([HAVE_LANGINFO_ALTMON])
114 AC_SUBST([HAVE_LANGINFO_ABALTMON]) 86 AC_SUBST([HAVE_LANGINFO_ABALTMON])
115 AC_SUBST([HAVE_LANGINFO_ERA]) 87 AC_SUBST([HAVE_LANGINFO_ERA])
116 AC_SUBST([HAVE_LANGINFO_YESEXPR])
117 88
118 dnl Check for declarations of anything we want to poison if the 89 dnl Check for declarations of anything we want to poison if the
119 dnl corresponding gnulib module is not in use. 90 dnl corresponding gnulib module is not in use.