gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35722 - libmicrohttpd


From: gnunet
Subject: [GNUnet-SVN] r35722 - libmicrohttpd
Date: Thu, 7 May 2015 19:04:27 +0200

Author: Karlson2k
Date: 2015-05-07 19:04:27 +0200 (Thu, 07 May 2015)
New Revision: 35722

Modified:
   libmicrohttpd/configure.ac
Log:
configure: add support for "--enable-poll"

Conflicts:
        configure.ac

Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac  2015-05-07 17:04:22 UTC (rev 35721)
+++ libmicrohttpd/configure.ac  2015-05-07 17:04:27 UTC (rev 35722)
@@ -276,6 +276,36 @@
 test "x$enable_examples" = "xno" || enable_examples=yes
 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" = "xyes"])
 
+AC_ARG_ENABLE([[poll]],
+  [AS_HELP_STRING([[--enable-poll[=ARG]]], [enable poll support (yes, no, 
auto) [auto]])],
+    [enable_poll=${enableval}],
+    [enable_poll='auto']
+  )
+
+if test "$enable_poll" != "no"; then
+  if test "$os_is_native_w32" != "yes"; then
+    AC_CHECK_HEADERS([poll.h],
+      [
+        AC_CHECK_FUNCS([poll], [have_poll='yes'], [have_poll='no'])
+      ])
+  else
+    AC_MSG_CHECKING([for WSAPoll()])
+    AC_LINK_IFELSE([
+      AC_LANG_PROGRAM([[#include <winsock2.h>]], [[
+WSAPOLLFD fda[2];
+WSAPoll(fda, 2, 0);]])], 
+        [
+          have_poll='yes'
+          AC_DEFINE([HAVE_POLL],[1])
+        ], [have_poll='no'])
+    AC_MSG_RESULT([$have_poll])
+  fi
+  if test "$enable_poll" = "yes" && test "$have_poll" != "yes"; then
+    AC_MSG_ERROR([[Support for poll was explicitly requested but cannot be 
enabled on this platform.]])
+  fi
+  enable_poll="$have_poll"
+fi
+
 AC_ARG_ENABLE([[epoll]],
   [AS_HELP_STRING([[--enable-epoll[=ARG]]], [enable epoll support (yes, no, 
auto) [auto]])],
     [enable_epoll=${enableval}],
@@ -328,7 +358,7 @@
 AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h 
sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard 
UNIX headers files]))
 
 # Check for optional headers
-AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h 
netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h poll.h 
search.h])
+AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h 
netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h search.h])
 AM_CONDITIONAL([HAVE_TSEARCH], [test "x$ac_cv_header_search_h" = "xyes"])
 
 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
@@ -347,7 +377,6 @@
     #endif
    ])
 
-AC_CHECK_FUNCS([poll])
 
 # Check for pipe/socketpair signaling
 AC_MSG_CHECKING([[whether to enable signaling by socketpair]])
@@ -893,6 +922,7 @@
   Digest auth.:      ${enable_dauth}
   Postproc:          ${enable_postprocessor}
   HTTPS support:     ${MSG_HTTPS}
+  poll support:      ${enable_poll=no}
   epoll support:     ${enable_epoll=no}
   build docs:        ${enable_doc}
   build examples:    ${enable_examples}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]