Module: wine Branch: master Commit: 3244be050048e2ce5e60c2d4a5a5dac193e4b2a5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3244be050048e2ce5e60c2d4a5...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Dec 7 09:22:40 2012 +0100
configure: Fix detection of fallocate on old glibc.
---
configure | 35 ++++++++++++++++++++++++++++++++++- configure.ac | 10 +++++++++- 2 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/configure b/configure index 2da5477..c1e10d7 100755 --- a/configure +++ b/configure @@ -12931,7 +12931,6 @@ for ac_func in \ chsize \ dlopen \ epoll_create \ - fallocate \ ffs \ finite \ fnmatch \ @@ -13494,6 +13493,40 @@ $as_echo "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fallocate" >&5 +$as_echo_n "checking for fallocate... " >&6; } +if ${wine_cv_have_fallocate+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _GNU_SOURCE +#include <fcntl.h> +int +main () +{ +fallocate(-1, 0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + wine_cv_have_fallocate=yes +else + wine_cv_have_fallocate=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_fallocate" >&5 +$as_echo "$wine_cv_have_fallocate" >&6; } +if test "$wine_cv_have_fallocate" = "yes" +then + +$as_echo "#define HAVE_FALLOCATE 1" >>confdefs.h + +fi +
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } diff --git a/configure.ac b/configure.ac index 4c7655a..01d84cd 100644 --- a/configure.ac +++ b/configure.ac @@ -1976,7 +1976,6 @@ AC_CHECK_FUNCS(\ chsize \ dlopen \ epoll_create \ - fallocate \ ffs \ finite \ fnmatch \ @@ -2117,6 +2116,15 @@ then AC_DEFINE(HAVE_SCHED_SETAFFINITY, 1, [Define to 1 if you have the `sched_setaffinity' function.]) fi
+AC_CACHE_CHECK([for fallocate],wine_cv_have_fallocate, + AC_LINK_IFELSE([AC_LANG_PROGRAM( +[[#define _GNU_SOURCE +#include <fcntl.h>]], [[fallocate(-1, 0, 0, 0);]])],[wine_cv_have_fallocate=yes],[wine_cv_have_fallocate=no])) +if test "$wine_cv_have_fallocate" = "yes" +then + AC_DEFINE(HAVE_FALLOCATE, 1, [Define to 1 if you have the `fallocate' function.]) +fi + dnl **** Check for types ****
AC_C_INLINE