aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-03-19 14:45:58 +0100
committerLudovic Courtès <ludo@gnu.org>2016-03-19 15:07:46 +0100
commitef5f5c8659b1ca3999e362dfa33478e0a0150ced (patch)
treee2967b666c0434b76e4a16a9346f50fa04067958 /Makefile.am
parent7c49ab5b1c1aa79a06504456e4decc5112c5b9f9 (diff)
downloadpatches-ef5f5c8659b1ca3999e362dfa33478e0a0150ced.tar
patches-ef5f5c8659b1ca3999e362dfa33478e0a0150ced.tar.gz
build: Protect against misconfiguration of localstatedir.
Suggested by Jookia <166291@gmail.com>. * m4/guix.m4 (GUIX_CURRENT_LOCALSTATEDIR, GUIX_CHECK_LOCALSTATEDIR): New macros. * config-daemon.ac: Use 'GUIX_CHECK_LOCALSTATEDIR'. * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --localstatedir. * doc/guix.texi (Requirements): Mention --localstatedir. (The Store): Mention LOCALSTATEDIR as such.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 8a5430794a..a9c281d4d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -421,7 +421,11 @@ include daemon.am
endif BUILD_DAEMON
ACLOCAL_AMFLAGS = -I m4
+
+# Pass an explicit '--localstatedir' so that configure does not error out if
+# it finds an existing installation with a different localstatedir.
AM_DISTCHECK_CONFIGURE_FLAGS = \
+ --localstatedir="$$dc_install_base/var" \
--with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
--with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
--with-nix-prefix="$(NIX_PREFIX)" \