summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-16 19:26:48 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-16 19:26:48 +0000
commita4f82c060ea232d998a7d1162768b4efb9dfd67e (patch)
tree8cbafec93f01b90a09f4daa5503dfabdea5bbbb1
parente48cee3d475b180d54e5d3d0650af295fa1c18ad (diff)
downloadxine-lib-a4f82c060ea232d998a7d1162768b4efb9dfd67e.tar.gz
xine-lib-a4f82c060ea232d998a7d1162768b4efb9dfd67e.tar.bz2
Provide an --enable-mmap switch to enable mmap, and default to the previous behaviour (no-mmap).
Problems to fix before enabling mmap() again: - SIGBUS when the file disappears (if can be worked around, low priority); - the size of the mmap()ed file is a constant, if the file is open for appending by another process mmap() should not be used; - there's a pointless memcpy() in the cache plugin that should be avoided for mmap() files. CVS patchset: 8267 CVS date: 2006/09/16 19:26:48
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 431fb6b8b..b17515b03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1921,6 +1921,16 @@ else
fi
AC_SUBST(W32DLL_DEP)
+dnl --------------------------------------------
+dnl mmap() support
+dnl --------------------------------------------
+
+AC_ARG_ENABLE([mmap],
+ AS_HELP_STRING([--enable-mmap], [Enable mmap() file loading (default: no)]))
+
+if test "x$enable_mmap" = "xyes"; then
+ AC_CHECK_FUNCS([mmap])
+fi
dnl ---------------------------------------------
dnl ip_mreqn
@@ -1938,7 +1948,7 @@ dnl ---------------------------------------------
AC_SYS_LARGEFILE
AC_CHECK_LIB(posix4, sched_get_priority_min)
-AC_CHECK_FUNCS([_vsnprintf _snprintf _stricmp _strnicmp vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr strcasecmp strncasecmp mmap])
+AC_CHECK_FUNCS([_vsnprintf _snprintf _stricmp _strnicmp vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr strcasecmp strncasecmp])
AC_FUNC_FSEEKO
AC_DEFINE(_GNU_SOURCE)
AC_CHECK_HEADERS(assert.h byteswap.h malloc.h execinfo.h ucontext.h sys/mman.h sys/mixer.h libgen.h netdb.h dirent.h sys/times.h sys/ioctl.h sys/param.h)