1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

configure.ac: Set default value for the 'prefix' variable.

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
<https://lists.gnu.org/archive/html/guix-devel/2024-05/msg00003.html> 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 <ludo@gnu.org>
Change-Id: I23cd12b58a842d246fbc9fdc740311c573eb0212
This commit is contained in:
Maxim Cournoyer
2024-05-17 15:06:02 -04:00
parent 94c8cec999
commit 77771036f0
3 changed files with 7 additions and 18 deletions

View File

@@ -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"`"