configure.in: Use AC_HEADER_STDBOOL
authorDoug MacEachern <dougm@hyperic.com>
Thu, 7 May 2009 19:50:17 +0000 (12:50 -0700)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 9 May 2009 08:55:27 +0000 (10:55 +0200)
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
configure.in
src/collectd.h

index af0219d..e6a4964 100644 (file)
@@ -76,8 +76,9 @@ fi
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_HEADER_DIRENT
+AC_HEADER_STDBOOL
 
-AC_CHECK_HEADERS(stdio.h stdint.h stdbool.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
+AC_CHECK_HEADERS(stdio.h stdint.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
 
 # For ping library
 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
index 24e5add..16bde1c 100644 (file)
 #endif
 #if HAVE_STDBOOL_H
 # include <stdbool.h>
+#else
+# ifndef HAVE__BOOL
+#  ifdef __cplusplus
+typedef bool _Bool;
+#  else
+#   define _Bool signed char
+#  endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
 #endif
 #if HAVE_UNISTD_H
 # include <unistd.h>