mirror of
https://github.com/aria2/aria2.git
synced 2024-11-24 02:23:38 +08:00
27e96877b7
Rewritten check for fallocate using AC_COMPILE_IFELSE. * configure.ac * m4/fallocate.m4
18 lines
389 B
Plaintext
18 lines
389 B
Plaintext
AC_DEFUN([ARIA2_CHECK_FALLOCATE],
|
|
[
|
|
AC_MSG_CHECKING([for fallocate])
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
#include <fcntl.h>
|
|
]],
|
|
[[
|
|
fallocate(2, 0, 0, 4096);
|
|
]])],
|
|
[have_fallocate=yes],
|
|
[have_fallocate=no])
|
|
AC_MSG_RESULT([$have_fallocate])
|
|
if test "x$have_fallocate" = "xyes"; then
|
|
AC_DEFINE([HAVE_FALLOCATE], [1],
|
|
[Define to 1 if you have the `fallocate' function.])
|
|
fi
|
|
])
|