diff options
author | Bruno Haible <bruno@clisp.org> | 2003-02-14 12:57:54 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:09:22 +0200 |
commit | d2fd1bf4db9d19c157c8d94b7a0402eb2fbaef81 (patch) | |
tree | 90dfa25e75b69bf0805c0384acfba3f7a2ad8d11 /gettext-tools | |
parent | af5c796f34ebc0293b9f91c551b77ef347020a3e (diff) | |
download | external_gettext-d2fd1bf4db9d19c157c8d94b7a0402eb2fbaef81.zip external_gettext-d2fd1bf4db9d19c157c8d94b7a0402eb2fbaef81.tar.gz external_gettext-d2fd1bf4db9d19c157c8d94b7a0402eb2fbaef81.tar.bz2 |
Move m4/stdbool.m4 to gettext-tools/m4/stdbool.m4.
Diffstat (limited to 'gettext-tools')
-rw-r--r-- | gettext-tools/m4/stdbool.m4 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gettext-tools/m4/stdbool.m4 b/gettext-tools/m4/stdbool.m4 new file mode 100644 index 0000000..d0959fc --- /dev/null +++ b/gettext-tools/m4/stdbool.m4 @@ -0,0 +1,48 @@ +# stdbool.m4 serial 2 (gettext-0.11.3) +dnl Copyright (C) 2001-2002 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 <stdbool.h> is supported or must be substituted. + +AC_DEFUN([gt_STDBOOL_H], +[dnl gcc 2.95.2 has an <stdbool.h> for which both 'true' and 'false' evaluate +dnl to 0 in preprocessor expressions. +AC_MSG_CHECKING([for stdbool.h]) +AC_CACHE_VAL(gt_cv_header_stdbool_h, [ + AC_TRY_COMPILE([#include <stdbool.h> +#if false +int A[-1]; +#endif +#define b -1 +#if true +#undef b +#define b 1 +#endif +int B[b]; +], [], 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 <stdbool.h> 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 + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi + AC_SUBST(HAVE__BOOL) +fi +AC_SUBST(STDBOOL_H) +]) |