aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/mhd_shutdown_socket_trigger.m423
1 files changed, 18 insertions, 5 deletions
diff --git a/m4/mhd_shutdown_socket_trigger.m4 b/m4/mhd_shutdown_socket_trigger.m4
index 469271b7..33505d81 100644
--- a/m4/mhd_shutdown_socket_trigger.m4
+++ b/m4/mhd_shutdown_socket_trigger.m4
@@ -11,24 +11,37 @@
11# 11#
12# LICENSE 12# LICENSE
13# 13#
14# Copyright (c) 2017 Karlson2k (Evgeny Grin) <k2k@narod.ru> 14# Copyright (c) 2017-2023 Karlson2k (Evgeny Grin) <k2k@narod.ru>
15# 15#
16# Copying and distribution of this file, with or without modification, are 16# Copying and distribution of this file, with or without modification, are
17# permitted in any medium without royalty provided the copyright notice 17# permitted in any medium without royalty provided the copyright notice
18# and this notice are preserved. This file is offered as-is, without any 18# and this notice are preserved. This file is offered as-is, without any
19# warranty. 19# warranty.
20 20
21#serial 3 21#serial 4
22 22
23AC_DEFUN([MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl 23AC_DEFUN([MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl
24 AC_PREREQ([2.64])dnl 24 AC_PREREQ([2.64])dnl
25 AC_REQUIRE([AC_CANONICAL_HOST])dnl 25 AC_REQUIRE([AC_CANONICAL_HOST])dnl
26 AC_REQUIRE([AC_PROG_CC])dnl 26 AC_REQUIRE([AC_PROG_CC])dnl
27 AC_REQUIRE([AX_PTHREAD])dnl 27 AC_REQUIRE([AX_PTHREAD])dnl
28 AC_CHECK_HEADERS([sys/time.h],[AC_CHECK_FUNCS([gettimeofday])],[], [AC_INCLUDES_DEFAULT]) 28 AC_CHECK_HEADERS([sys/time.h time.h])dnl
29 dnl AC_CHECK_HEADERS([time.h],[AC_CHECK_FUNCS([nanosleep])],[], [AC_INCLUDES_DEFAULT]) 29 MHD_CHECK_FUNC([[gettimeofday]],
30 [[
31#ifdef HAVE_SYS_TIME_H
32#include <sys/time.h>
33#endif /* HAVE_SYS_TIME_H */
34#ifdef HAVE_TIME_H
35#include <time.h>
36#endif /* HAVE_TIME_H */
37 ]],
38 [[
39 struct timeval tv;
40 if (0 != gettimeofday (&tv, (void*) 0))
41 return 1;
42 ]]
43 )
30 MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]]) 44 MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]])
31 dnl AC_CHECK_HEADERS([unistd.h],[AC_CHECK_FUNCS([usleep])],[], [AC_INCLUDES_DEFAULT])
32 MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]]) 45 MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]])
33 AC_CHECK_HEADERS([string.h sys/types.h sys/socket.h netinet/in.h time.h sys/select.h netinet/tcp.h],[],[], [AC_INCLUDES_DEFAULT]) 46 AC_CHECK_HEADERS([string.h sys/types.h sys/socket.h netinet/in.h time.h sys/select.h netinet/tcp.h],[],[], [AC_INCLUDES_DEFAULT])
34 AC_CACHE_CHECK([[whether shutdown of listen socket triggers select()]], 47 AC_CACHE_CHECK([[whether shutdown of listen socket triggers select()]],