+ echo $ac_n "checking that sendfile() really is implemented""... $ac_c" 1>&6
+echo "configure:2536: checking that sendfile() really is implemented" >&5
+
+ if test "$cross_compiling" = yes; then
+ enableval="cross-compiling, not checked"
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2542 "configure"
+#include "confdefs.h"
+
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#if HAVE_SYS_LIMITS_H
+#include <sys/limits.h>
+#endif
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if HAVE_SYS_SENDFILE_H
+#include <sys/sendfile.h>
+#endif
+
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#if HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+int main() {
+ int out_fd = 1, in_fd = 0;
+ off_t offset = 0;
+ size_t size = 1024;
+
+ errno = 0;
+ sendfile(out_fd, in_fd, &offset, size);
+ if (errno == ENOSYS)
+ return 0;
+ else
+ return 1;
+}
+EOF
+if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ enableval=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ enableval=yes
+fi
+rm -fr conftest*
+fi
+
+ echo "$ac_t""$enableval" 1>&6
+
+ has_sendfile=$enableval
+
+ # Check whether --with-linux-sendfile or --without-linux-sendfile was given.
+if test "${with_linux_sendfile+set}" = set; then
+ withval="$with_linux_sendfile"
+ has_sendfile=$withval
+fi
+
+
+ if test $has_sendfile != "no"; then
+ cat >> confdefs.h <<\EOF