summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-22 02:51:54 +0000
committerYang Tse <yangsita@gmail.com>2007-02-22 02:51:54 +0000
commit69565afab0be081211df57a245a222cbd3e43ed3 (patch)
tree834ab5e7265abad18a542da69d7d65fba831cee3 /configure.ac
parent39aac6352159b4ba92463ec95b9e3df49a5b6693 (diff)
downloadgnurl-69565afab0be081211df57a245a222cbd3e43ed3.tar.gz
gnurl-69565afab0be081211df57a245a222cbd3e43ed3.tar.bz2
gnurl-69565afab0be081211df57a245a222cbd3e43ed3.zip
Check for stdbool.h at configuration stage, and include it if available.
Check for lowercase 'bool' type at configuration stage. If not available provide a suitable replacement with a type definition of 'unsigned char' in setup_once.h Move definitions of TRUE and FALSE to setup_once.h
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 814777d2b..be3c5d7b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1662,6 +1662,7 @@ AC_CHECK_HEADERS(
libgen.h \
locale.h \
errno.h \
+ stdbool.h \
arpa/tftp.h \
sys/filio.h \
setjmp.h,
@@ -1723,6 +1724,16 @@ fi
AC_CHECK_TYPE(ssize_t, ,
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
+# check for bool type
+AC_CHECK_TYPE([bool],[
+ AC_DEFINE(HAVE_BOOL_T, 1,
+ [Define to 1 if bool is an available type.])
+], ,[
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+])
+
# Check for socklen_t or equivalent
CURL_CHECK_TYPE_SOCKLEN_T