gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated (4a126e24 -> 7738609f


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (4a126e24 -> 7738609f)
Date: Sun, 26 Nov 2017 15:07:28 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from 4a126e24 Improved compatibility with Cygwin
     new 7a66082e configure: reordered Configuration Summary output to improve 
readability
     new 7738609f configure: added parameter to disable sendfile().

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac | 87 +++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 51 insertions(+), 36 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9174fa4a..25c00baa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1248,11 +1248,22 @@ AC_FUNC_FSEEKO
 AC_CHECK_FUNCS([lseek64 pread64 pread])
 
 # check for various sendfile functions
-found_sendfile="no"
-AC_MSG_CHECKING([[for Linux-style sendfile(2)]])
-AC_LINK_IFELSE(
-  [AC_LANG_PROGRAM(
-    [[
+AC_ARG_ENABLE([sendfile],
+   [AS_HELP_STRING([--disable-sendfile],
+               [disable usage of sendfile() for HTTP connections [auto]])],
+   [],
+   [enable_sendfile="auto"])
+AS_CASE([$enable_sendfile],
+  [[auto | yes]],[[found_sendfile="no"]],
+  [[no]],[[found_sendfile="disabled"]],
+  [AC_MSG_ERROR([[unknown value specified: 
--enable-sendfile=$enable_sendfile]])]
+)
+AS_VAR_IF([[found_sendfile]], [["no"]],
+  [
+    AC_MSG_CHECKING([[for Linux-style sendfile(2)]])
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+        [[
 #include <sys/sendfile.h>
 
 static void empty_func(void)
@@ -1262,25 +1273,27 @@ static void empty_func(void)
 }
 /* Declare again to check form match */
 ssize_t sendfile(int, int, off_t*, size_t);
-    ]],
-    [[
-      int fd1=0, fd2=2;
-      off_t o = 0;
-      size_t s = 5;
-      ssize_t r;
-      r = sendfile (fd1, fd2, &o, s);
-      if (r)
-        empty_func();
-    ]]
-   )
-  ],
-  [
-    AC_DEFINE([HAVE_LINUX_SENDFILE], [1], [Define to 1 if you have linux-style 
sendfile(2).])
-    found_sendfile="yes, Linux-style"
-    AC_MSG_RESULT([[yes]])
-    AC_CHECK_FUNCS([sendfile64])
-  ],
-  [AC_MSG_RESULT([[no]])
+        ]],
+        [[
+          int fd1=0, fd2=2;
+          off_t o = 0;
+          size_t s = 5;
+          ssize_t r;
+          r = sendfile (fd1, fd2, &o, s);
+          if (r)
+            empty_func();
+        ]]
+       )
+      ],
+      [
+        AC_DEFINE([HAVE_LINUX_SENDFILE], [1], [Define to 1 if you have 
linux-style sendfile(2).])
+        found_sendfile="yes, Linux-style"
+        AC_MSG_RESULT([[yes]])
+        AC_CHECK_FUNCS([sendfile64])
+      ],
+      [AC_MSG_RESULT([[no]])
+      ]
+    )
   ]
 )
 AS_VAR_IF([[found_sendfile]], [["no"]],
@@ -1411,6 +1424,9 @@ ssize_t sendfile(int out_fd, int in_fd,
    LIBS="$SAVE_LIBS"
   ]
 )
+AS_IF([[test "x$found_sendfile" = "xno" && test "x$enable_sendfile" = "xyes"]],
+  AC_MSG_ERROR([[sendfile() usage was requested by configure parameter, but no 
usable sendfile() function is detected]])
+)
 
 # optional: have error messages ?
 AC_MSG_CHECKING([[whether to generate error messages]])
@@ -2022,28 +2038,27 @@ else
  MSG_CURL="yes"
 fi
 
-AC_MSG_NOTICE([libmicrohttpd ${PACKAGE_VERSION} Configuration Summary:
+AC_MSG_NOTICE([GNU libmicrohttpd ${PACKAGE_VERSION} Configuration Summary:
+  Target directory:  ${prefix}
   Cross-compiling:   ${cross_compiling}
   Operating System:  ${host_os}
+  Shutdown of listening socket trigger select: 
${mhd_cv_host_shtdwn_trgr_select}
+  Inter-thread comm: ${use_itc}
+  poll support:      ${enable_poll=no}
+  epoll support:     ${enable_epoll=no}
+  sendfile used:     ${found_sendfile}
+  HTTPS support:     ${MSG_HTTPS}
   Threading lib:     ${USE_THREADS}
   Use thread names:  ${enable_thread_names}
-  Inter-thread comm: ${use_itc}
-  Test with libcurl: ${MSG_CURL}
-  Target directory:  ${prefix}
-  Shutdown of listening socket
-  trigger select:    ${mhd_cv_host_shtdwn_trgr_select}
   Use debug asserts: ${enable_asserts}
   Messages:          ${enable_messages}
   Basic auth.:       ${enable_bauth}
   Digest auth.:      ${enable_dauth}
   HTTP "Upgrade":    ${enable_httpupgrade}
   Postproc:          ${enable_postprocessor}
-  HTTPS support:     ${MSG_HTTPS}
-  poll support:      ${enable_poll=no}
-  epoll support:     ${enable_epoll=no}
-  sendfile used:     ${found_sendfile}
-  build docs:        ${enable_doc}
-  build examples:    ${enable_examples}
+  Build docs:        ${enable_doc}
+  Build examples:    ${enable_examples}
+  Test with libcurl: ${MSG_CURL}
 ])
 
 if test "x$enable_https" = "xyes"

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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