diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f2abfa43..e3cfba07 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -2120,6 +2120,55 @@ AS_VAR_IF([mhd_cv_fd_setsize_overridable],["no"], | |||
2120 | [AC_DEFINE([HAS_FD_SETSIZE_OVERRIDABLE],[1],[Define to 1 i][f your system allow overriding the value of FD_SETSIZE macro])] | 2120 | [AC_DEFINE([HAS_FD_SETSIZE_OVERRIDABLE],[1],[Define to 1 i][f your system allow overriding the value of FD_SETSIZE macro])] |
2121 | ) | 2121 | ) |
2122 | 2122 | ||
2123 | AC_CACHE_CHECK([whether socket value is a signed type],[mhd_cv_socket_signed], | ||
2124 | [ | ||
2125 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ | ||
2126 | #ifdef HAVE_SYS_TIME_H | ||
2127 | #include <sys/time.h> | ||
2128 | #endif | ||
2129 | #ifdef HAVE_SYS_TYPES_H | ||
2130 | #include <sys/types.h> | ||
2131 | #endif | ||
2132 | #ifdef HAVE_UNISTD_H | ||
2133 | #include <unistd.h> | ||
2134 | #endif | ||
2135 | #ifdef HAVE_SYS_SOCKET_H | ||
2136 | #include <sys/socket.h> | ||
2137 | #endif | ||
2138 | #ifdef HAVE_SOCKLIB_H | ||
2139 | #include <sockLib.h> | ||
2140 | #endif | ||
2141 | #if defined(_WIN32) && ! defined(__CYGWIN__) | ||
2142 | #include <winsock2.h> | ||
2143 | #endif | ||
2144 | #ifdef HAVE_SYS_SELECT_H | ||
2145 | #include <sys/select.h> | ||
2146 | #endif | ||
2147 | |||
2148 | /* Keep in sync with microhttpd.h */ | ||
2149 | #if ! defined(_WIN32) || defined(_SYS_TYPES_FD_SET) | ||
2150 | typedef int MHD_socket; | ||
2151 | #else /* defined(_WIN32) && ! defined(_SYS_TYPES_FD_SET) */ | ||
2152 | typedef SOCKET MHD_socket; | ||
2153 | #endif /* defined(_WIN32) && ! defined(_SYS_TYPES_FD_SET) */ | ||
2154 | |||
2155 | int main(void) | ||
2156 | { | ||
2157 | int test_arr[2 - 5*(!!(0 < ((MHD_socket)-1)))]; | ||
2158 | test_arr[1] = 0; | ||
2159 | return test_arr[1]; | ||
2160 | } | ||
2161 | ]] | ||
2162 | ) | ||
2163 | ], | ||
2164 | [mhd_cv_socket_signed="yes"], | ||
2165 | [mhd_cv_socket_signed="no"] | ||
2166 | ) | ||
2167 | ] | ||
2168 | ) | ||
2169 | AS_VAR_IF([mhd_cv_socket_signed],["yes"], | ||
2170 | [AC_DEFINE([HAS_SIGNED_SOCKET],[1],[Define to 1 i][f your socket type is signed])] | ||
2171 | ) | ||
2123 | 2172 | ||
2124 | MHD_CHECK_FUNC([writev], | 2173 | MHD_CHECK_FUNC([writev], |
2125 | [[#include <sys/uio.h>]], | 2174 | [[#include <sys/uio.h>]], |