summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--config.scm.in (renamed from config.scm)16
-rw-r--r--configure.ac2
3 files changed, 17 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index a617842..40685ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.go
+config.scm
configure
config.log
config.status
diff --git a/config.scm b/config.scm.in
index d52ae55..43db6cf 100644
--- a/config.scm
+++ b/config.scm.in
@@ -19,10 +19,24 @@
#:export (%width
%height
%line-height
- %message-margin))
+ %message-margin
+ %assets-root))
(define %width 320)
(define %height 240)
(define %line-height 12.5)
(define %message-margin 4.0)
+(define %assets-root
+ (let* ((prefix "@prefix@")
+ (datarootdir
+ (string-append prefix
+ (string-drop "@datarootdir@"
+ (string-length "${prefix}"))))
+ (pkgdatadir
+ (string-append datarootdir
+ (string-drop "@datadir@/@PACKAGE@"
+ (string-length "${datarootdir}")))))
+ (if (getenv "INEVITABLE_UNINSTALLED")
+ (getcwd)
+ pkgdatadir)))
diff --git a/configure.ac b/configure.ac
index fe92128..8f8c9c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
AM_SILENT_RULES([yes])
AC_PATH_PROG([GUILE], [guile])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile config.scm])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_CONFIG_FILES([scripts/inevitable], [chmod +x scripts/inevitable])