diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-29 20:35:09 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-29 20:35:09 +0000 |
commit | 20e9f5d47c81a1ab3fb3ec4840e6efa35d87e8d9 (patch) | |
tree | 9e01621c41fcbbbd3c12d161b63a79ad22099161 /configure.ac | |
parent | 388ee3fa59e4762d9e1ef20978f3d4c55480c128 (diff) |
Merge changes from team/russell/http_filetxfer
Handle transferring large files from the built-in http server. Previously, the
code attempted to malloc a block as large as the file itself. Now it uses the
sendfile() system call so that the file isn't copied into userspace at all if
it is available. Otherwise, it just uses a read/write of small chunks at a time.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72701 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4c4a48c7a..9e8279d07 100644 --- a/configure.ac +++ b/configure.ac @@ -364,6 +364,23 @@ AC_CHECK_HEADER([libkern/OSAtomic.h], AC_CHECK_SIZEOF(int) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [#include <stdlib.h> + #include <sys/sendfile.h>], + [sendfile(1, 0, NULL, 1);]) + ],[ + AC_MSG_RESULT(yes) + have_sendfile=yes + ],[ + AC_MSG_RESULT(no) + have_sendfile=no + ] +) +if test "${have_sendfile}" = "yes"; then + AC_DEFINE([HAVE_SENDFILE], 1, [Define if your system has the sendfile syscall.]) +fi + # do the package library checks now AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl]) |