From: Bruno Haible Date: Sat, 23 Aug 2003 15:31:27 +0000 (+0000) Subject: Use version from gnulib. X-Git-Tag: v0.13~339 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43ead3562196447f6463ca8484d6c9bdac343cc5;p=thirdparty%2Fgettext.git Use version from gnulib. --- diff --git a/gettext-tools/m4/stdbool.m4 b/gettext-tools/m4/stdbool.m4 index d41899f6d..4bd17b726 100644 --- a/gettext-tools/m4/stdbool.m4 +++ b/gettext-tools/m4/stdbool.m4 @@ -1,51 +1,41 @@ -# stdbool.m4 serial 3 (gettext-0.12) -dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl From Bruno Haible. -dnl Test whether is supported or must be substituted. - -AC_DEFUN([gt_STDBOOL_H], -[dnl gcc 2.95.2 has an for which both 'true' and 'false' evaluate -dnl to 0 in preprocessor expressions. -dnl HP-UX 11 cc has an but the compiler doesn't understand the -dnl type '_Bool' (to which 'bool' expands). -AC_MSG_CHECKING([for stdbool.h]) -AC_CACHE_VAL(gt_cv_header_stdbool_h, [ - AC_TRY_COMPILE([#include -#if false -int A[-1]; -#endif -#define b -1 -#if true -#undef b -#define b 1 -#endif -int B[b]; -bool c; -], [], gt_cv_header_stdbool_h=yes, gt_cv_header_stdbool_h=no)]) -AC_MSG_RESULT([$gt_cv_header_stdbool_h]) -if test $gt_cv_header_stdbool_h = yes; then - AC_DEFINE(HAVE_STDBOOL_H, 1, - [Define if you have a working header file.]) - STDBOOL_H='' -else - STDBOOL_H='stdbool.h' - AC_MSG_CHECKING([for _Bool type]) - AC_CACHE_VAL(gt_cv_type_Bool, [ - AC_TRY_COMPILE([_Bool x = sizeof (_Bool);], [], - gt_cv_type_Bool=yes, gt_cv_type_Bool=no)]) - AC_MSG_RESULT([$gt_cv_type_Bool]) - if test $gt_cv_type_Bool = yes; then +# Check for stdbool.h that conforms to C99. + +# 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# 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) -fi -AC_SUBST(STDBOOL_H) + AC_SUBST([HAVE__BOOL]) ])