summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2017-01-26 13:44:31 +0100
committerGuillem Jover <guillem@debian.org>2017-01-26 23:26:32 +0100
commit9d5e55d449a32a70158c81314649d312babd2684 (patch)
tree58a865033fbeb40b3aaa9e2e762e5880b6900922 /m4
parentc8153b8c748278098c3e87f966a8194b5825ad88 (diff)
downloaddpkg-9d5e55d449a32a70158c81314649d312babd2684.tar.gz
build: Disable disk pre-allocation by default
Contrary to what one would expect, this seems to be causing major issues in several "modern" filesystems, as it collides with the heuristics and optimizations that these try to perform. Disable this by default, but let the builder enable it again in case this is not a problem on certain systems.
Diffstat (limited to 'm4')
-rw-r--r--m4/dpkg-funcs.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/dpkg-funcs.m4 b/m4/dpkg-funcs.m4
index e71768334..80e76d6f1 100644
--- a/m4/dpkg-funcs.m4
+++ b/m4/dpkg-funcs.m4
@@ -106,6 +106,21 @@ AC_DEFUN([DPKG_USE_MMAP], [
])
])
+# DPKG_USE_DISK_PREALLOCATE
+# -------------------------
+# Define USE_DISK_PREALLOCATE if disk size pre-allocation is available
+# and it was requested.
+AC_DEFUN([DPKG_USE_DISK_PREALLOCATE], [
+ AC_ARG_ENABLE([disk-preallocate],
+ [AS_HELP_STRING([--enable-disk-preallocate],
+ [enable usage of disk size pre-allocation])],
+ [], [enable_disk_preallocate=no])
+
+ AS_IF([test "x$enable_disk_preallocate" = "xyes"], [
+ AC_DEFINE([USE_DISK_PREALLOCATE], [1], [Use disk size pre-allocation])
+ ])
+])
+
# DPKG_CHECK_PROGNAME
# -------------------
# Check for system implementations of program name tracking.