From 232a96913ceaa6ef043d5a68c6656c54cc6e435a Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Fri, 24 Apr 2009 08:57:34 +0000 Subject: [PATCH] Change method to detect presence of posix_fadvise() --- configure.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 139d2527ae..04980218c1 100644 --- a/configure.in +++ b/configure.in @@ -668,7 +668,15 @@ fi CFLAGS="$savedFlags" fi AC_CHECK_FUNCS(semtimedop) -AC_CHECK_FUNCS(posix_fadvise) + +# HPUX has a bug in .h files. To detect it we need C++ here. +AC_LANG_PUSH(C++) +#AC_CHECK_FUNCS(posix_fadvise) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[posix_fadvise(0, 0, 0, 0);]])], + AC_DEFINE(HAVE_POSIX_FADVISE, 1, [Define this if posix_fadvise() is present on the platform])) +AC_LANG_POP(C++) + AC_CHECK_FUNCS(pthread_mutexattr_setrobust_np) AC_CHECK_FUNCS(pthread_mutex_consistent_np)