From 77771036f0970083c146b709d792d128f4235125 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 17 May 2024 15:06:02 -0400 Subject: configure.ac: Set default value for the 'prefix' variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Guix standard configuration uses a localstatedir of /var and a sysconfdir of /etc. To ease things for everyone, make the default values match that standard expected configuration. See for a related discussion. * configure.ac: Default $prefix to '' unless already set. * doc/contributing.texi (Building from Git): Streamline doc. * doc/guix-cookbook.texi (Guix environment via direnv): Likewise. Reviewed-by: Ludovic Courtès Change-Id: I23cd12b58a842d246fbc9fdc740311c573eb0212 --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8c3a06da37..c7b61d56a7 100644 --- a/configure.ac +++ b/configure.ac @@ -73,9 +73,11 @@ AC_ARG_ENABLE([daemon], [guix_build_daemon="$enableval"], [guix_build_daemon="yes"]) -# Prepare a version of $localstatedir & co. that does not contain references -# to shell variables. -guix_prefix="`eval echo $prefix | sed -e"s|NONE|/usr/local|g"`" +dnl Prepare a version of $localstatedir & co. that does not contain references +dnl to shell variables. Also set some sane default directory variables for +dnl use with the Guix. This also causes localstatedir to be /var and +dnl sysconfdir to be /etc. +test "$prefix" = NONE && prefix= guix_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|$guix_prefix|g"`" guix_sysconfdir="`eval echo $sysconfdir | sed -e "s|NONE|$guix_prefix|g"`" guix_sbindir="`eval echo $sbindir | sed -e "s|NONE|$guix_prefix|g"`" -- cgit v1.2.3