aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 42077404f..0b9655955 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,6 +186,26 @@ if test "x$have_dirent_dtype" = "xyes"; then
fi
dnl }}}
+dnl {{{ check for fallocate
+AC_MSG_CHECKING([for fallocate])
+AC_COMPILE_IFELSE([
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <linux/falloc.h>
+int main(int, char **)
+{
+ fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 100);
+}
+],
+ [have_fallocate=yes],
+ [have_fallocate=no])
+AC_MSG_RESULT([$have_fallocate])
+if test "x$have_fallocate" = "xyes"; then
+ AC_DEFINE([HAVE_FALLOCATE], [1], [Use fallocate])
+fi
+dnl }}}
+
dnl {{{ check for cxxflags
if test x = x"$LET_ME_RICE"
then