From 5aaf7dcb4da8b0622df8443de833a41afe7c3aca Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 12 Nov 2015 12:16:11 -0500 Subject: config: Fix data directory. This was all messed up: - 'pkgdatadir' wasn't something that could be substituted via autoconf - I was still using "GUILE_2D" in the data dir env var name Now it's all better and Sly data should be able to be found from the pre-installation environment *and* the installation prefix. * configure.ac (sly_prefix, sly_datadir): New variables. * pre-inst-env.in: Set SLY_DATADIR. * sly/config.scm.in (%pkgdatadir): Delete. (%datadir): New variable. Use SLY_DATADIR env var or the configured datadir. * sly/render/font.scm (load-default-font): Use %datadir. * sly/render/shader.scm (load-default-shader): Likewise. --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0b2ba97..853a051 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,13 @@ AC_CONFIG_FILES([sly/config.scm]) AC_CONFIG_FILES([sandbox], [chmod +x sandbox]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) +# Prepare a version of $datadir that does not contain references to +# shell variables. +sly_prefix="`eval echo $prefix | sed -e"s|NONE|/usr/local|g"`" +sly_datadir="`eval eval echo $datadir | sed -e "s|NONE|$guix_prefix|g"`" +AC_SUBST([sly_datadir]) +AC_SUBST([sly_prefix]) + GUILE_PROGS([2.0.11]) GUILE_MODULE_REQUIRED([sdl sdl]) GUILE_MODULE_REQUIRED([sdl mixer]) -- cgit v1.2.3