aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-11-20 14:14:35 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-11-20 14:14:35 +0000
commit285d26374aac69d2bbd1df31bc76686ad39171a4 (patch)
treed5a89a857e4079cf68e0a750dc8b630776fd37e4 /configure.ac
parenta55113411fe8e6ef39e24c79564e39f07f5a8fdf (diff)
* Don't set the prefix to /nix by default, rather use the Autoconf
default of /usr/local. However, localstatedir and storedir are set to /nix/var/nix and /nix/store respectively unless they're explicitly overriden.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index ffeff3a5e..64d60adf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_INIT(nix, 0.12)
AC_CONFIG_SRCDIR(README)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
-
+
# Change to `1' to produce a `stable' release (i.e., the `preREVISION'
# suffix is not added).
STABLE=0
@@ -18,8 +18,6 @@ fi
AC_DEFINE_UNQUOTED(NIX_VERSION, ["$VERSION"], [Nix version.])
-AC_PREFIX_DEFAULT(/nix)
-
AC_CANONICAL_HOST
@@ -61,6 +59,10 @@ AC_SUBST(system)
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')])
+# State should be stored in /nix/var, unless the user overrides it explicitly.
+test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var
+
+
# Windows-specific stuff.
if test "$sys_name" = "cygwin"; then
# We cannot delete open files.
@@ -174,7 +176,7 @@ AC_SUBST(xmlflags)
AC_ARG_WITH(store-dir, AC_HELP_STRING([--with-store-dir=PATH],
[path of the Nix store]),
- storedir=$withval, storedir='${prefix}/store')
+ storedir=$withval, storedir='/nix/store')
AC_SUBST(storedir)
AC_ARG_ENABLE(old-db-compat, AC_HELP_STRING([--disable-old-db-compat],
@@ -240,7 +242,7 @@ if test -z "$bzip2"; then
bzip2_lib='-L${top_builddir}/externals/inst-bzip2/lib -lbz2'
bzip2_include='-I${top_builddir}/externals/inst-bzip2/include'
# The binary will be copied to $libexecdir.
- bzip2_bin='${libexecdir}'
+ bzip2_bin='${libexecdir}/nix'
# But for testing, we have to use the temporary copy :-(
bzip2_bin_test='${top_builddir}/externals/inst-bzip2/bin'
else