aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 38 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 683347ad..e4810e62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1229,7 +1229,43 @@ AM_CONDITIONAL([HAVE_LIBMAGIC], [[test "x$mhd_have_libmagic" = "xyes"]])
1229# large file support (> 4 GB) 1229# large file support (> 4 GB)
1230AC_SYS_LARGEFILE 1230AC_SYS_LARGEFILE
1231AC_FUNC_FSEEKO 1231AC_FUNC_FSEEKO
1232AC_CHECK_FUNCS([lseek64 sendfile64 pread64 pread]) 1232AC_CHECK_FUNCS([lseek64 pread64 pread])
1233
1234# check for various sendfile functions
1235found_sendfile="no"
1236AC_MSG_CHECKING([[for Linux-style sendfile(2)]])
1237AC_LINK_IFELSE(
1238 [AC_LANG_PROGRAM(
1239 [[
1240#include <sys/sendfile.h>
1241
1242static void empty_func(void)
1243{
1244/* Check for declaration */
1245 (void)sendfile;
1246}
1247/* Declare again to check form match */
1248ssize_t sendfile(int, int, off_t*, size_t);
1249 ]],
1250 [[
1251 int fd1, fd2;
1252 off_t o = 0;
1253 size_t s = 5;
1254 ssize_t r;
1255 r = sendfile (fd1, fd2, &o, s);
1256 empty_func();
1257 ]]
1258 )
1259 ],
1260 [
1261 AC_DEFINE([HAVE_LINUX_SENDFILE], [1], [Define to 1 if you have linux-style sendfile(2).])
1262 found_sendfile="yes, linux-style"
1263 AC_MSG_RESULT([[yes]])
1264 AC_CHECK_FUNCS([sendfile64])
1265 ],
1266 [AC_MSG_RESULT([[no]])
1267 ]
1268)
1233 1269
1234# optional: have error messages ? 1270# optional: have error messages ?
1235AC_MSG_CHECKING([[whether to generate error messages]]) 1271AC_MSG_CHECKING([[whether to generate error messages]])
@@ -1781,6 +1817,7 @@ AC_MSG_NOTICE([libmicrohttpd ${PACKAGE_VERSION} Configuration Summary:
1781 HTTPS support: ${MSG_HTTPS} 1817 HTTPS support: ${MSG_HTTPS}
1782 poll support: ${enable_poll=no} 1818 poll support: ${enable_poll=no}
1783 epoll support: ${enable_epoll=no} 1819 epoll support: ${enable_epoll=no}
1820 sendfile used: ${found_sendfile}
1784 build docs: ${enable_doc} 1821 build docs: ${enable_doc}
1785 build examples: ${enable_examples} 1822 build examples: ${enable_examples}
1786]) 1823])