diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-01-08 11:51:07 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-01-08 11:51:07 +0100 |
commit | be8efac78d067c138ad8dda03df4336e73f94887 (patch) | |
tree | 5f5254a628ba0ef72065b93d949d1c985742ea8e /gnulib-m4/stdbool.m4 | |
parent | 7b65dbd4ebade81d504cfe5e681292a58ad1fdf0 (diff) |
New upstream version 1.0upstream/1.0
Diffstat (limited to 'gnulib-m4/stdbool.m4')
-rw-r--r-- | gnulib-m4/stdbool.m4 | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/gnulib-m4/stdbool.m4 b/gnulib-m4/stdbool.m4 index f8c0577..3e6c400 100644 --- a/gnulib-m4/stdbool.m4 +++ b/gnulib-m4/stdbool.m4 @@ -1,27 +1,39 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2022 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 9 # Prepare for substituting <stdbool.h> if it is not supported. -AC_DEFUN([AM_STDBOOL_H], +AC_DEFUN([gl_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 + GL_GENERATE_STDBOOL_H=true + else + GL_GENERATE_STDBOOL_H=false + fi + ;; + *) + GL_GENERATE_STDBOOL_H=false + ;; + esac else - STDBOOL_H='stdbool.h' + GL_GENERATE_STDBOOL_H=true fi - AC_SUBST([STDBOOL_H]) - AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 @@ -31,9 +43,6 @@ AC_DEFUN([AM_STDBOOL_H], AC_SUBST([HAVE__BOOL]) ]) -# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. -AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) - # This version of the macro is needed in autoconf <= 2.68. AC_DEFUN([AC_CHECK_HEADER_STDBOOL], |