Browse Source

fixed detection of broken sendfile() on linux 2.4.x (fixes #135)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@397 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.3.15
Jan Kneschke 17 years ago
parent
commit
8f9f3def05
  1. 27
      configure.in

27
configure.in

@ -298,11 +298,24 @@ AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
getuid select signal pathconf\
writev sigaction sendfile64 send_file kqueue port_create localtime_r])
AC_MSG_CHECKING(for Large File System support)
AC_ARG_ENABLE(lfs,
AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
[case "${enableval}" in
yes) CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" ;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lfs) ;;
esac],[CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"])
AC_MSG_RESULT($enableval)
if test "x$ac_cv_func_sendfile" = xyes; then
# check if sendfile works
AC_MSG_CHECKING(if sendfile works)
if test "x$cross_compiling" = xno; then
AC_TRY_RUN([
#ifdef HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif /* HAVE_SYS_SENDFILE_H */
#include <errno.h>
int main() {
int o = 0;
@ -340,20 +353,6 @@ if test x$ipv6 = xtrue; then
fi
fi
AC_MSG_CHECKING(for Large File System support)
AC_ARG_ENABLE(lfs,
AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
[case "${enableval}" in
yes) CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" ;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lfs) ;;
esac],[CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"])
AC_MSG_RESULT($enableval)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(off_t)
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
dnl check for fastcgi lib, for the tests only

Loading…
Cancel
Save