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.m449
1 files changed, 18 insertions, 31 deletions
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index 5eee8a71..3ed8d593 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,9 +1,10 @@
1# langinfo_h.m4 1# langinfo_h.m4
2# serial 12 2# serial 14
3dnl Copyright (C) 2009-2024 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.
7dnl This file is offered as-is, without any warranty.
7 8
8AC_DEFUN_ONCE([gl_LANGINFO_H], 9AC_DEFUN_ONCE([gl_LANGINFO_H],
9[ 10[
@@ -17,18 +18,17 @@ AC_DEFUN_ONCE([gl_LANGINFO_H],
17 18
18 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.
19 HAVE_LANGINFO_CODESET=0 20 HAVE_LANGINFO_CODESET=0
20 HAVE_LANGINFO_T_FMT_AMPM=0
21 HAVE_LANGINFO_ALTMON=0 21 HAVE_LANGINFO_ALTMON=0
22 HAVE_LANGINFO_ABALTMON=0
22 HAVE_LANGINFO_ERA=0 23 HAVE_LANGINFO_ERA=0
23 HAVE_LANGINFO_YESEXPR=0
24 AC_CHECK_HEADERS_ONCE([langinfo.h]) 24 AC_CHECK_HEADERS_ONCE([langinfo.h])
25 if test $ac_cv_header_langinfo_h = yes; then 25 if test $ac_cv_header_langinfo_h = yes; then
26 HAVE_LANGINFO_H=1 26 HAVE_LANGINFO_H=1
27 dnl Determine what <langinfo.h> defines. 27 dnl Determine what <langinfo.h> defines.
28 dnl CODESET is missing on OpenBSD 3.8. 28 dnl CODESET is missing on OpenBSD 3.8.
29 dnl ERA etc. are missing on OpenBSD 6.7. 29 dnl ERA etc. are missing on OpenBSD 6.7.
30 dnl T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
31 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.
31 dnl ABALTMON_* are missing on glibc 2.41 and many other systems.
32 AC_CACHE_CHECK([whether langinfo.h defines CODESET], 32 AC_CACHE_CHECK([whether langinfo.h defines CODESET],
33 [gl_cv_header_langinfo_codeset], 33 [gl_cv_header_langinfo_codeset],
34 [AC_COMPILE_IFELSE( 34 [AC_COMPILE_IFELSE(
@@ -41,18 +41,6 @@ int a = CODESET;
41 if test $gl_cv_header_langinfo_codeset = yes; then 41 if test $gl_cv_header_langinfo_codeset = yes; then
42 HAVE_LANGINFO_CODESET=1 42 HAVE_LANGINFO_CODESET=1
43 fi 43 fi
44 AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM],
45 [gl_cv_header_langinfo_t_fmt_ampm],
46 [AC_COMPILE_IFELSE(
47 [AC_LANG_PROGRAM([[#include <langinfo.h>
48int a = T_FMT_AMPM;
49]])],
50 [gl_cv_header_langinfo_t_fmt_ampm=yes],
51 [gl_cv_header_langinfo_t_fmt_ampm=no])
52 ])
53 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
54 HAVE_LANGINFO_T_FMT_AMPM=1
55 fi
56 AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1], 44 AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1],
57 [gl_cv_header_langinfo_altmon], 45 [gl_cv_header_langinfo_altmon],
58 [AC_COMPILE_IFELSE( 46 [AC_COMPILE_IFELSE(
@@ -65,6 +53,18 @@ int a = ALTMON_1;
65 if test $gl_cv_header_langinfo_altmon = yes; then 53 if test $gl_cv_header_langinfo_altmon = yes; then
66 HAVE_LANGINFO_ALTMON=1 54 HAVE_LANGINFO_ALTMON=1
67 fi 55 fi
56 AC_CACHE_CHECK([whether langinfo.h defines ABALTMON_1],
57 [gl_cv_header_langinfo_abaltmon],
58 [AC_COMPILE_IFELSE(
59 [AC_LANG_PROGRAM([[#include <langinfo.h>
60int a = ABALTMON_1;
61]])],
62 [gl_cv_header_langinfo_abaltmon=yes],
63 [gl_cv_header_langinfo_abaltmon=no])
64 ])
65 if test $gl_cv_header_langinfo_abaltmon = yes; then
66 HAVE_LANGINFO_ABALTMON=1
67 fi
68 AC_CACHE_CHECK([whether langinfo.h defines ERA], 68 AC_CACHE_CHECK([whether langinfo.h defines ERA],
69 [gl_cv_header_langinfo_era], 69 [gl_cv_header_langinfo_era],
70 [AC_COMPILE_IFELSE( 70 [AC_COMPILE_IFELSE(
@@ -77,27 +77,14 @@ int a = ERA;
77 if test $gl_cv_header_langinfo_era = yes; then 77 if test $gl_cv_header_langinfo_era = yes; then
78 HAVE_LANGINFO_ERA=1 78 HAVE_LANGINFO_ERA=1
79 fi 79 fi
80 AC_CACHE_CHECK([whether langinfo.h defines YESEXPR],
81 [gl_cv_header_langinfo_yesexpr],
82 [AC_COMPILE_IFELSE(
83 [AC_LANG_PROGRAM([[#include <langinfo.h>
84int a = YESEXPR;
85]])],
86 [gl_cv_header_langinfo_yesexpr=yes],
87 [gl_cv_header_langinfo_yesexpr=no])
88 ])
89 if test $gl_cv_header_langinfo_yesexpr = yes; then
90 HAVE_LANGINFO_YESEXPR=1
91 fi
92 else 80 else
93 HAVE_LANGINFO_H=0 81 HAVE_LANGINFO_H=0
94 fi 82 fi
95 AC_SUBST([HAVE_LANGINFO_H]) 83 AC_SUBST([HAVE_LANGINFO_H])
96 AC_SUBST([HAVE_LANGINFO_CODESET]) 84 AC_SUBST([HAVE_LANGINFO_CODESET])
97 AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
98 AC_SUBST([HAVE_LANGINFO_ALTMON]) 85 AC_SUBST([HAVE_LANGINFO_ALTMON])
86 AC_SUBST([HAVE_LANGINFO_ABALTMON])
99 AC_SUBST([HAVE_LANGINFO_ERA]) 87 AC_SUBST([HAVE_LANGINFO_ERA])
100 AC_SUBST([HAVE_LANGINFO_YESEXPR])
101 88
102 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
103 dnl corresponding gnulib module is not in use. 90 dnl corresponding gnulib module is not in use.