aboutsummaryrefslogtreecommitdiff
path: root/config/acx.m4
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2004-05-24 10:45:14 +0000
committerPaolo Bonzini <bonzini@gnu.org>2004-05-24 10:45:14 +0000
commit04cf1b779b4818d428c3984d0160f202ee6ef7b6 (patch)
tree9c2d85c977da402a48324d26d6015211ba5545ca /config/acx.m4
parent5df97fde6194ad4cd24e90c446091b0cfea0145f (diff)
downloadgdb-04cf1b779b4818d428c3984d0160f202ee6ef7b6.zip
gdb-04cf1b779b4818d428c3984d0160f202ee6ef7b6.tar.gz
gdb-04cf1b779b4818d428c3984d0160f202ee6ef7b6.tar.bz2
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (host_modules): add libcpp. * Makefile.tpl: Add dependencies on and for libcpp. * Makefile.in: Regenerate. * configure.in: Add libcpp host module. * configure: Regenerate. config/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING): From gcc.
Diffstat (limited to 'config/acx.m4')
-rw-r--r--config/acx.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/config/acx.m4 b/config/acx.m4
index 3652836..b96d688 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -224,3 +224,37 @@ AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
do_compare="$gcc_cv_prog_cmp_skip"
AC_SUBST(do_compare)
])
+
+dnl See whether we can include both string.h and strings.h.
+AC_DEFUN([ACX_HEADER_STRING],
+[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
+ gcc_cv_header_string,
+[AC_TRY_COMPILE([#include <string.h>
+#include <strings.h>], , gcc_cv_header_string=yes, gcc_cv_header_string=no)])
+if test $gcc_cv_header_string = yes; then
+ AC_DEFINE(STRING_WITH_STRINGS, 1, [Define if you can safely include both <string.h> and <strings.h>.])
+fi
+])
+
+dnl See if stdbool.h properly defines bool and true/false.
+dnl Check whether _Bool is built-in.
+AC_DEFUN([ACX_HEADER_STDBOOL],
+[AC_CACHE_CHECK([for working stdbool.h],
+ ac_cv_header_stdbool_h,
+[AC_TRY_COMPILE([#include <stdbool.h>],
+[bool foo = false;],
+ac_cv_header_stdbool_h=yes, ac_cv_header_stdbool_h=no)])
+if test $ac_cv_header_stdbool_h = yes; then
+ AC_DEFINE(HAVE_STDBOOL_H, 1,
+ [Define if you have a working <stdbool.h> header file.])
+fi
+AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool,
+[AC_TRY_COMPILE(,
+[_Bool foo;],
+gcc_cv_c__bool=yes, gcc_cv_c__bool=no)
+])
+if test $gcc_cv_c__bool = yes; then
+ AC_DEFINE(HAVE__BOOL, 1, [Define if the \`_Bool' type is built-in.])
+fi
+])
+