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.m450
1 files changed, 19 insertions, 31 deletions
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index b17a526a..3ed8d593 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,8 +1,10 @@
1# langinfo_h.m4 serial 12 1# langinfo_h.m4
2dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. 2# serial 14
3dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl 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.
6 8
7AC_DEFUN_ONCE([gl_LANGINFO_H], 9AC_DEFUN_ONCE([gl_LANGINFO_H],
8[ 10[
@@ -16,18 +18,17 @@ AC_DEFUN_ONCE([gl_LANGINFO_H],
16 18
17 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.
18 HAVE_LANGINFO_CODESET=0 20 HAVE_LANGINFO_CODESET=0
19 HAVE_LANGINFO_T_FMT_AMPM=0
20 HAVE_LANGINFO_ALTMON=0 21 HAVE_LANGINFO_ALTMON=0
22 HAVE_LANGINFO_ABALTMON=0
21 HAVE_LANGINFO_ERA=0 23 HAVE_LANGINFO_ERA=0
22 HAVE_LANGINFO_YESEXPR=0
23 AC_CHECK_HEADERS_ONCE([langinfo.h]) 24 AC_CHECK_HEADERS_ONCE([langinfo.h])
24 if test $ac_cv_header_langinfo_h = yes; then 25 if test $ac_cv_header_langinfo_h = yes; then
25 HAVE_LANGINFO_H=1 26 HAVE_LANGINFO_H=1
26 dnl Determine what <langinfo.h> defines. 27 dnl Determine what <langinfo.h> defines.
27 dnl CODESET is missing on OpenBSD 3.8. 28 dnl CODESET is missing on OpenBSD 3.8.
28 dnl ERA etc. are missing on OpenBSD 6.7. 29 dnl ERA etc. are missing on OpenBSD 6.7.
29 dnl T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
30 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.
31 AC_CACHE_CHECK([whether langinfo.h defines CODESET], 32 AC_CACHE_CHECK([whether langinfo.h defines CODESET],
32 [gl_cv_header_langinfo_codeset], 33 [gl_cv_header_langinfo_codeset],
33 [AC_COMPILE_IFELSE( 34 [AC_COMPILE_IFELSE(
@@ -40,18 +41,6 @@ int a = CODESET;
40 if test $gl_cv_header_langinfo_codeset = yes; then 41 if test $gl_cv_header_langinfo_codeset = yes; then
41 HAVE_LANGINFO_CODESET=1 42 HAVE_LANGINFO_CODESET=1
42 fi 43 fi
43 AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM],
44 [gl_cv_header_langinfo_t_fmt_ampm],
45 [AC_COMPILE_IFELSE(
46 [AC_LANG_PROGRAM([[#include <langinfo.h>
47int a = T_FMT_AMPM;
48]])],
49 [gl_cv_header_langinfo_t_fmt_ampm=yes],
50 [gl_cv_header_langinfo_t_fmt_ampm=no])
51 ])
52 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
53 HAVE_LANGINFO_T_FMT_AMPM=1
54 fi
55 AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1], 44 AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1],
56 [gl_cv_header_langinfo_altmon], 45 [gl_cv_header_langinfo_altmon],
57 [AC_COMPILE_IFELSE( 46 [AC_COMPILE_IFELSE(
@@ -64,6 +53,18 @@ int a = ALTMON_1;
64 if test $gl_cv_header_langinfo_altmon = yes; then 53 if test $gl_cv_header_langinfo_altmon = yes; then
65 HAVE_LANGINFO_ALTMON=1 54 HAVE_LANGINFO_ALTMON=1
66 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
67 AC_CACHE_CHECK([whether langinfo.h defines ERA], 68 AC_CACHE_CHECK([whether langinfo.h defines ERA],
68 [gl_cv_header_langinfo_era], 69 [gl_cv_header_langinfo_era],
69 [AC_COMPILE_IFELSE( 70 [AC_COMPILE_IFELSE(
@@ -76,27 +77,14 @@ int a = ERA;
76 if test $gl_cv_header_langinfo_era = yes; then 77 if test $gl_cv_header_langinfo_era = yes; then
77 HAVE_LANGINFO_ERA=1 78 HAVE_LANGINFO_ERA=1
78 fi 79 fi
79 AC_CACHE_CHECK([whether langinfo.h defines YESEXPR],
80 [gl_cv_header_langinfo_yesexpr],
81 [AC_COMPILE_IFELSE(
82 [AC_LANG_PROGRAM([[#include <langinfo.h>
83int a = YESEXPR;
84]])],
85 [gl_cv_header_langinfo_yesexpr=yes],
86 [gl_cv_header_langinfo_yesexpr=no])
87 ])
88 if test $gl_cv_header_langinfo_yesexpr = yes; then
89 HAVE_LANGINFO_YESEXPR=1
90 fi
91 else 80 else
92 HAVE_LANGINFO_H=0 81 HAVE_LANGINFO_H=0
93 fi 82 fi
94 AC_SUBST([HAVE_LANGINFO_H]) 83 AC_SUBST([HAVE_LANGINFO_H])
95 AC_SUBST([HAVE_LANGINFO_CODESET]) 84 AC_SUBST([HAVE_LANGINFO_CODESET])
96 AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
97 AC_SUBST([HAVE_LANGINFO_ALTMON]) 85 AC_SUBST([HAVE_LANGINFO_ALTMON])
86 AC_SUBST([HAVE_LANGINFO_ABALTMON])
98 AC_SUBST([HAVE_LANGINFO_ERA]) 87 AC_SUBST([HAVE_LANGINFO_ERA])
99 AC_SUBST([HAVE_LANGINFO_YESEXPR])
100 88
101 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
102 dnl corresponding gnulib module is not in use. 90 dnl corresponding gnulib module is not in use.