X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstdbool.m4;h=ed000c816376ddb7ab9072eefafdb5894e663cbb;hb=02d97fa1f7a73756747951b74de8655d9f11b509;hp=14e59029455d0056b1eecaf9b05860c245c9bded;hpb=6fb9c924caaf59848e7ae72d703bdb05b6487339;p=gnulib.git diff --git a/m4/stdbool.m4 b/m4/stdbool.m4 index 14e590294..ed000c816 100644 --- a/m4/stdbool.m4 +++ b/m4/stdbool.m4 @@ -1,6 +1,6 @@ # Check for stdbool.h that conforms to C99. -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002-2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,6 +17,32 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. +# Prepare for substituting if it is not supported. + +AC_DEFUN([AM_STDBOOL_H], +[ + AC_REQUIRE([AC_HEADER_STDBOOL]) + + # Define two additional variables used in the Makefile substitution. + + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' + fi + AC_SUBST([STDBOOL_H]) + + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi + AC_SUBST([HAVE__BOOL]) +]) + +# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf +# have this macro built-in. + AC_DEFUN([AC_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], @@ -57,6 +83,7 @@ AC_DEFUN([AC_HEADER_STDBOOL], [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) + AC_CHECK_TYPES([_Bool]) if test $ac_cv_header_stdbool_h = yes; then AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.]) fi])