summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-12-28 23:14:06 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-12-28 23:14:06 +0000
commit0c0d07105319c894abad97b47a65f28b2f97b841 (patch)
treeae47c74ef02e82973e973613b0f4b76e59868439 /configure.in
parent6f8314d7fa3f9851046db2c3103f398d30548861 (diff)
downloadlibapr-0c0d07105319c894abad97b47a65f28b2f97b841.tar.gz
FreeBSD's sendfile does not work if the FreeBSD version is less than
4.2 and we are compiled for a threaded program. This change automatically detects that set of conditions, and sets the sendfile detection correctly. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60990 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in27
1 files changed, 19 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 6a324f0ce..a4e7c7967 100644
--- a/configure.in
+++ b/configure.in
@@ -216,12 +216,7 @@ AC_CHECK_FUNCS(getrlimit, [ have_getrlimit="1" ], [ have_getrlimit="0" ])
AC_CHECK_FUNCS(writev)
sendfile="0"
AC_CHECK_FUNCS(sendfile send_file, [ sendfile="1" ])
-case "$OS" in
- *alpha*-dec-osf* )
- sendfile="0"
- echo "sendfile support disabled to avoid system problem"
- ;;
-esac
+
AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ])
AC_CHECK_FUNCS(getpass)
APR_CHECK_INET_ADDR
@@ -238,7 +233,6 @@ AC_CHECK_FUNCS(hstrerror)
AC_CHECK_FUNCS(memmove, [ have_memmove="1" ], [have_memmove="0" ])
AC_CHECK_FUNCS(bzero, [ have_bzero="1" ], [ have_bzero="0"] )
-AC_SUBST(sendfile)
AC_SUBST(fork)
AC_SUBST(have_inet_addr)
AC_SUBST(have_inet_network)
@@ -585,7 +579,24 @@ fi
AC_SUBST(threads)
dnl THIS MUST COME AFTER THE THREAD TESTS - FreeBSD doesn't always have a
-dnl threaded poll()
+dnl threaded poll() and we don't want to use sendfile on early FreeBSD
+dnl systems if we are also using threads.
+
+case "$OS" in
+ *freebsd*)
+ if test `echo "$OS" | sed -e 's/.*\(.\)\.\(.\)/\1\2/'` -le "41"; then
+ if test "$threads" = "1"; then
+ sendfile="0"
+ fi
+ fi
+ ;;
+ *alpha*-dec-osf* )
+ sendfile="0"
+ echo "sendfile support disabled to avoid system problem"
+ ;;
+esac
+AC_SUBST(sendfile)
+
AC_CHECK_FUNCS(poll)