aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac112
1 files changed, 56 insertions, 56 deletions
diff --git a/configure.ac b/configure.ac
index 335e5d2f..ca403875 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,62 @@ MHD_SYS_EXT
79LT_INIT([win32-dll]) 79LT_INIT([win32-dll])
80LT_LANG([Windows Resource]) 80LT_LANG([Windows Resource])
81 81
82# Check for headers that are ALWAYS required
83AC_CHECK_HEADERS_ONCE([stdio.h string.h stdint.h errno.h limits.h fcntl.h], [],
84 [AC_MSG_ERROR([Compiling libmicrohttpd requires standard POSIX headers files])], [AC_INCLUDES_DEFAULT])
85
86# Check for basic optional headers
87AC_CHECK_HEADERS([stddef.h stdlib.h inttypes.h sys/types.h sys/stat.h unistd.h], [], [], [AC_INCLUDES_DEFAULT])
88
89# Check for clock-specific optional headers
90AC_CHECK_HEADERS([sys/time.h time.h], [], [], [AC_INCLUDES_DEFAULT])
91
92# Check for system information and parameters optional headers
93AC_CHECK_HEADERS([endian.h machine/endian.h sys/endian.h sys/byteorder.h \
94 sys/machine.h machine/param.h sys/param.h sys/isa_defs.h \
95 sys/ioctl.h], [], [], [AC_INCLUDES_DEFAULT])
96
97# Check for network and sockets optional headers
98AC_CHECK_HEADERS([sys/socket.h sys/select.h netinet/in.h arpa/inet.h \
99 netinet/ip.h netinet/tcp.h net/if.h \
100 netdb.h sockLib.h inetLib.h], [], [],
101 [AC_INCLUDES_DEFAULT
102 [
103#ifdef HAVE_SYS_TYPES_H
104#include <sys/types.h>
105#endif /* HAVE_SYS_TYPES_H */
106#ifdef HAVE_INTTYPES_H
107#include <inttypes.h>
108#endif /* HAVE_INTTYPES_H */
109#ifdef HAVE_SYS_SOCKET_H
110#include <sys/socket.h>
111#endif /* HAVE_SYS_SOCKET_H */
112#ifdef HAVE_NETINET_IN_H
113#include <netinet/in.h>
114#endif /* HAVE_NETINET_IN_H */
115#ifdef HAVE_NETINET_IP_H
116#include <netinet/ip.h>
117#endif /* HAVE_NETINET_IP_H */
118#ifdef HAVE_NETINET_TCP_H
119#include <netinet/tcp.h>
120#endif /* HAVE_NETINET_TCP_H */
121 ]]
122)
123
124# Check for other optional headers
125AC_CHECK_HEADERS([sys/msg.h sys/mman.h signal.h], [], [], [AC_INCLUDES_DEFAULT])
126
127AC_CHECK_HEADER([[search.h]],
128 [
129 gl_FUNC_TSEARCH
130 AS_IF([[test "x$HAVE_TSEARCH" = "x1" && test "x$REPLACE_TSEARCH" != "x1"]],
131 [AC_DEFINE([[HAVE_SEARCH_H]], [[1]],
132 [Define to 1 if you have the <search.h> header file and your system have properly functioning tsearch(), tfind() and tdelete() functions])])
133 ],
134 [], [AC_INCLUDES_DEFAULT])
135
136AM_CONDITIONAL([MHD_HAVE_TSEARCH], [[test "x$ac_cv_header_search_h" = xyes && test "x$HAVE_TSEARCH" = "x1" && test "x$REPLACE_TSEARCH" != "x1"]])
137
82# Checks for gettext. 138# Checks for gettext.
83m4_ifdef([AM_GNU_GETTEXT], [ 139m4_ifdef([AM_GNU_GETTEXT], [
84 AS_VAR_SET_IF([enable_nls], [], [[enable_nls=no]]) 140 AS_VAR_SET_IF([enable_nls], [], [[enable_nls=no]])
@@ -1094,62 +1150,6 @@ fd = epoll_create1(EPOLL_CLOEXEC);]])],
1094 AS_IF([test "x$mhd_cv_have_epoll_create1" = "xyes"],[ 1150 AS_IF([test "x$mhd_cv_have_epoll_create1" = "xyes"],[
1095 AC_DEFINE([[HAVE_EPOLL_CREATE1]], [[1]], [Define if you have epoll_create1 function.])])) 1151 AC_DEFINE([[HAVE_EPOLL_CREATE1]], [[1]], [Define if you have epoll_create1 function.])]))
1096 1152
1097# Check for headers that are ALWAYS required
1098AC_CHECK_HEADERS_ONCE([stdio.h string.h stdint.h errno.h limits.h fcntl.h], [],
1099 [AC_MSG_ERROR([Compiling libmicrohttpd requires standard POSIX headers files])], [AC_INCLUDES_DEFAULT])
1100
1101# Check for basic optional headers
1102AC_CHECK_HEADERS([stddef.h stdlib.h inttypes.h sys/types.h sys/stat.h unistd.h], [], [], [AC_INCLUDES_DEFAULT])
1103
1104# Check for clock-specific optional headers
1105AC_CHECK_HEADERS([sys/time.h time.h], [], [], [AC_INCLUDES_DEFAULT])
1106
1107# Check for system information and parameters optional headers
1108AC_CHECK_HEADERS([endian.h machine/endian.h sys/endian.h sys/byteorder.h \
1109 sys/machine.h machine/param.h sys/param.h sys/isa_defs.h \
1110 sys/ioctl.h], [], [], [AC_INCLUDES_DEFAULT])
1111
1112# Check for network and sockets optional headers
1113AC_CHECK_HEADERS([sys/socket.h sys/select.h netinet/in.h arpa/inet.h \
1114 netinet/ip.h netinet/tcp.h net/if.h \
1115 netdb.h sockLib.h inetLib.h], [], [],
1116 [AC_INCLUDES_DEFAULT
1117 [
1118#ifdef HAVE_SYS_TYPES_H
1119#include <sys/types.h>
1120#endif /* HAVE_SYS_TYPES_H */
1121#ifdef HAVE_INTTYPES_H
1122#include <inttypes.h>
1123#endif /* HAVE_INTTYPES_H */
1124#ifdef HAVE_SYS_SOCKET_H
1125#include <sys/socket.h>
1126#endif /* HAVE_SYS_SOCKET_H */
1127#ifdef HAVE_NETINET_IN_H
1128#include <netinet/in.h>
1129#endif /* HAVE_NETINET_IN_H */
1130#ifdef HAVE_NETINET_IP_H
1131#include <netinet/ip.h>
1132#endif /* HAVE_NETINET_IP_H */
1133#ifdef HAVE_NETINET_TCP_H
1134#include <netinet/tcp.h>
1135#endif /* HAVE_NETINET_TCP_H */
1136 ]]
1137)
1138
1139# Check for other optional headers
1140AC_CHECK_HEADERS([sys/msg.h sys/mman.h signal.h], [], [], [AC_INCLUDES_DEFAULT])
1141
1142AC_CHECK_HEADER([[search.h]],
1143 [
1144 gl_FUNC_TSEARCH
1145 AS_IF([[test "x$HAVE_TSEARCH" = "x1" && test "x$REPLACE_TSEARCH" != "x1"]],
1146 [AC_DEFINE([[HAVE_SEARCH_H]], [[1]],
1147 [Define to 1 if you have the <search.h> header file and your system have properly functioning tsearch(), tfind() and tdelete() functions])])
1148 ],
1149 [], [AC_INCLUDES_DEFAULT])
1150
1151AM_CONDITIONAL([MHD_HAVE_TSEARCH], [[test "x$ac_cv_header_search_h" = xyes && test "x$HAVE_TSEARCH" = "x1" && test "x$REPLACE_TSEARCH" != "x1"]])
1152
1153AC_CACHE_CHECK([for suported 'noreturn' keyword], [mhd_cv_decl_noreturn], 1153AC_CACHE_CHECK([for suported 'noreturn' keyword], [mhd_cv_decl_noreturn],
1154 [ 1154 [
1155 mhd_cv_decl_noreturn="none" 1155 mhd_cv_decl_noreturn="none"