From 6f5d2192492e0723717f4f02fb7a87bbc3de9d41 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 6 Feb 2005 09:10:16 +0000 Subject: [PATCH] A better test for posix_fadvise. Quote arguments to echo, especially if they contain '*'. --- configure.in | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 01c6af19f..13e04068f 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ AC_CHECK_TOOL(LD, ld, :) dnl Check for headers AC_HEADER_STDC() AC_CHECK_HEADERS([inttypes.h stdint.h sys/types.h]) -AC_CHECK_FUNCS(vsscanf posix_fadvise,,) +AC_CHECK_FUNCS(vsscanf,,) dnl Optional features that are built and those that aren't opt_features_yes="" @@ -289,6 +289,25 @@ if test -z "$TYPEU64"; then fi +dnl +dnl Check for posix_fadvise and its definitions +dnl + AC_CACHE_CHECK([for posix_fadvise], [ac_cv_posix_fadvise],[ + ac_cv_posix_fadvise="no" + AC_LANG_PUSH(C++) + AC_TRY_COMPILE([ +#include + ],[ + posix_fadvise(0, 0, 0, POSIX_FADV_WILLNEED); + posix_fadvise(0, 0, 0, POSIX_FADV_DONTNEED); + ],[ac_cv_posix_fadvise="yes"]) + AC_LANG_POP + ]) + if test x"$ac_cv_posix_fadvise" = "xyes" ; then + AC_DEFINE([HAVE_POSIX_FADVISE], 1, [define if posix_advise and its definitions are available]) + fi + + dnl dnl Test for libiconv dnl @@ -529,7 +548,7 @@ using namespace libebml; ]) if test x"${ac_cv_ebml_dll}" != "xyes" -a x"${ac_cv_ebml_dll}" != "xno" ; then - echo *** libebml was not found. + echo '*** libebml was not found.' exit 1 fi @@ -641,7 +660,7 @@ using namespace libmatroska; ]) if test x"${ac_cv_matroska_dll}" != "xyes" -a x"${ac_cv_matroska_dll}" != "xno" ; then - echo *** libmatroska was not found. + echo '*** libmatroska was not found.' exit 1 fi