From: Jeremy Allison Date: Fri, 6 Apr 2007 01:09:19 +0000 (+0000) Subject: r22097: Add detection for linux readahead() syscall. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~769 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e3232aad4179e4ca9a1138bc43addec2ea6d9cc;p=thirdparty%2Fsamba.git r22097: Add detection for linux readahead() syscall. Jeremy. --- diff --git a/source/configure.in b/source/configure.in index 803425a66aa..7eb1b78a01b 100644 --- a/source/configure.in +++ b/source/configure.in @@ -5649,6 +5649,25 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) AC_MSG_RESULT(yes) ) +############################################ +# See if we have the Linux readahead syscall. + +AC_CACHE_CHECK([for Linux readahead], + samba_cv_HAVE_LINUX_READAHEAD,[ + AC_TRY_LINK([ +#if defined(HAVE_UNISTD_H) +#include +#endif +#include ], + [ssize_t err = readahead(0,0,0x80000);], + samba_cv_HAVE_LINUX_READAHEAD=yes, + samba_cv_HAVE_LINUX_READAHEAD=no)]) + +if test x"$samba_cv_HAVE_LINUX_READAHEAD" = x"yes"; then + AC_DEFINE(HAVE_LINUX_READAHEAD,1, + [Whether Linux readahead is available]) +fi + ################################################# # Check whether winbind is supported on this platform. If so we need to