summaryrefslogtreecommitdiff
path: root/macros/texinfo/texinfo/gnulib/m4/stdbool.m4
diff options
context:
space:
mode:
Diffstat (limited to 'macros/texinfo/texinfo/gnulib/m4/stdbool.m4')
-rw-r--r--macros/texinfo/texinfo/gnulib/m4/stdbool.m424
1 files changed, 19 insertions, 5 deletions
diff --git a/macros/texinfo/texinfo/gnulib/m4/stdbool.m4 b/macros/texinfo/texinfo/gnulib/m4/stdbool.m4
index acb852244f..3169779d43 100644
--- a/macros/texinfo/texinfo/gnulib/m4/stdbool.m4
+++ b/macros/texinfo/texinfo/gnulib/m4/stdbool.m4
@@ -1,22 +1,36 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-#serial 7
+#serial 8
# Prepare for substituting <stdbool.h> if it is not supported.
AC_DEFUN([AM_STDBOOL_H],
[
AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
+ AC_REQUIRE([AC_CANONICAL_HOST])
- # Define two additional variables used in the Makefile substitution.
-
+ dnl On some platforms, <stdbool.h> does not exist or does not conform to C99.
+ dnl On Solaris 10 with CC=cc CXX=CC, <stdbool.h> exists but is not usable
+ dnl in C++ mode (and no <cstdbool> exists). In this case, we use our
+ dnl replacement, also in C mode (for binary compatibility between C and C++).
if test "$ac_cv_header_stdbool_h" = yes; then
- STDBOOL_H=''
+ case "$host_os" in
+ solaris*)
+ if test -z "$GCC"; then
+ STDBOOL_H='stdbool.h'
+ else
+ STDBOOL_H=''
+ fi
+ ;;
+ *)
+ STDBOOL_H=''
+ ;;
+ esac
else
STDBOOL_H='stdbool.h'
fi