aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac47
1 files changed, 35 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 557bd0cd..c8a7c3f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,19 +89,42 @@ MHD_LIBDEPS=""
89MHD_REQ_PRIVATE='' 89MHD_REQ_PRIVATE=''
90MHD_LIBDEPS_PKGCFG='' 90MHD_LIBDEPS_PKGCFG=''
91 91
92AC_CHECK_TYPE([_Bool], 92AH_TEMPLATE([[HAVE_STDBOOL_H]], [Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines 'bool' type.])
93 [ AC_DEFINE([_MHD_bool],[_Bool],[Define to type which will be used as boolean type.]) ], 93AH_TEMPLATE([[HAVE_REAL_BOOL]], [Define to 1 if you have the real boolean type.])
94AH_TEMPLATE([[bool]], [Define to type name which will be used as boolean type.])
95AC_CHECK_HEADER([stdbool.h],
94 [ 96 [
95 AC_CHECK_HEADER([stdbool.h], [ AC_DEFINE([HAVE_STDBOOL_H],[1],[Define to 1 if you have the <stdbool.h> header file and it's required for _MHD_bool.]) ], [], [AC_INCLUDES_DEFAULT]) 97 AC_CHECK_TYPE([bool],
96 AC_CHECK_TYPE([bool], 98 [
97 [ AC_DEFINE([_MHD_bool],[bool]) ], 99 AC_DEFINE([[HAVE_STDBOOL_H]], [[1]])
98 [ AC_DEFINE([_MHD_bool],[int]) ], 100 AC_DEFINE([[HAVE_REAL_BOOL]], [[1]])
99 [[ 101 ],
100#ifdef HAVE_STDBOOL_H 102 [
103 AC_MSG_WARN([[Header <stdbool.h> is present, but "bool" type cannot be detected. Check compiler flags.]])
104 AC_DEFINE([[bool]], [[int]])
105 ], [
101#include <stdbool.h> 106#include <stdbool.h>
102#endif 107 ]
103 ]]) 108 )
104 ]) 109 ],
110 [
111 AC_CHECK_TYPE([bool],
112 [AC_DEFINE([[HAVE_REAL_BOOL]], [[1]])],
113 [
114 AC_CHECK_TYPE([_Bool],
115 [
116 AC_DEFINE([[HAVE_REAL_BOOL]], [[1]])
117 AC_DEFINE([[bool]], [[_Bool]])
118 ],
119 [
120 AC_DEFINE([[bool]], [[int]])
121 ], []
122 )
123 ], []
124 )
125 ],
126 [AC_INCLUDES_DEFAULT]
127)
105 128
106AX_CHECK_COMPILE_FLAG([[-Werror=attributes]], 129AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
107 [[errattr_CFLAGS="-Werror=attributes"]], 130 [[errattr_CFLAGS="-Werror=attributes"]],
@@ -131,7 +154,7 @@ choke me
131#ifdef HAVE_STDBOOL_H 154#ifdef HAVE_STDBOOL_H
132#include <stdbool.h> 155#include <stdbool.h>
133#endif 156#endif
134 static $inln_prfx_chk _MHD_bool cmpfn(int x, int y) 157 static $inln_prfx_chk bool cmpfn(int x, int y)
135 { return x > y; } 158 { return x > y; }
136 static $inln_prfx_chk int sumfn(int x, int y) 159 static $inln_prfx_chk int sumfn(int x, int y)
137 { return x + y; } 160 { return x + y; }