summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac18
-rw-r--r--guilec.am6
-rw-r--r--src/guile/Makefile.am6
-rwxr-xr-xsrc/skribilo.in4
-rw-r--r--substitute.am1
5 files changed, 24 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index a71aad6..73cbc21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,15 @@ AC_ARG_WITH([guilemoduledir],
esac],
[guilemoduledir=""])
+AC_ARG_WITH([guileobjectdir],
+ [AS_HELP_STRING([--with-guileobjectdir=DIR],
+ [install Guile object files under DIR])],
+ [case "x$withval" in
+ xyes|xno) guileobjectdir="";;
+ *) guileobjectdir="$withval";;
+ esac],
+ [guileobjectdir=""])
+
AC_PROG_LN_S
AC_PROG_MKDIR_P
@@ -94,12 +103,15 @@ AM_CONDITIONAL([HAVE_PLOTICUS], [test "x$PLOTICUS" != "x"])
# Emacs.
AM_PATH_LISPDIR
-
-pkgdatadir="$datadir/$PACKAGE_TARNAME"
+dnl Installation directories for .scm and .go files.
if test "x$guilemoduledir" = "x"; then
- guilemoduledir="$pkgdatadir/$PACKAGE_VERSION"
+ guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION"
+fi
+if test "x$guileobjectdir" = "x"; then
+ guileobjectdir="${libdir}/guile/$GUILE_EFFECTIVE_VERSION/site-ccache"
fi
AC_SUBST([guilemoduledir])
+AC_SUBST([guileobjectdir])
if test "$guilemoduledir" != "$GUILE_SITE"; then
# Guile won't be able to locate the modules "out of the box", so
diff --git a/guilec.am b/guilec.am
index dc6e870..8fa3daf 100644
--- a/guilec.am
+++ b/guilec.am
@@ -7,7 +7,7 @@ if HAVE_GUILE2
GOBJECTS = $(SOURCES:%.scm=%.go)
nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED)
-nobase_nodist_module_DATA = $(GOBJECTS)
+nobase_nodist_guileobject_DATA = $(GOBJECTS)
# Compiler warnings.
guile_warnings = \
@@ -46,12 +46,12 @@ SUFFIXES += .go
# files. See
# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
# for details.
-skr_install_go_files = install-nobase_nodist_moduleDATA
+skr_install_go_files = install-nobase_nodist_guileobjectDATA
$(skr_install_go_files): install-nobase_dist_moduleDATA
else !HAVE_GUILE2
nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED)
-nobase_nodist_module_DATA =
+nobase_nodist_guileobject_DATA =
endif !HAVE_GUILE2
diff --git a/src/guile/Makefile.am b/src/guile/Makefile.am
index e4dd75c..2d6571c 100644
--- a/src/guile/Makefile.am
+++ b/src/guile/Makefile.am
@@ -1,5 +1,5 @@
# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2012,
-# 2015 Ludovic Courtès <ludo@gnu.org>
+# 2015, 2018 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of Skribilo.
#
@@ -91,13 +91,13 @@ include $(top_srcdir)/substitute.am
include $(top_srcdir)/guilec.am
# Generated files not part of the distribution.
-nobase_nodist_module_DATA += \
+nobase_nodist_module_DATA = \
skribilo/config.scm \
skribilo/utils/images.scm
if HAVE_GUILE2
-nobase_nodist_module_DATA += \
+nobase_nodist_guileobject_DATA += \
skribilo/config.go \
skribilo/utils/images.go
diff --git a/src/skribilo.in b/src/skribilo.in
index 30a7b02..ca44108 100755
--- a/src/skribilo.in
+++ b/src/skribilo.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005, 2006, 2007, 2008, 2009 Ludovic Courtès <ludo@gnu.org>
+# Copyright 2005, 2006, 2007, 2008, 2009, 2018 Ludovic Courtès <ludo@gnu.org>
#
#
# This file is part of Skribilo.
@@ -24,7 +24,7 @@
# needed, the use should explicitly set the `GUILE' environment
# variable to, e.g., "guile --debug".
-GUILE_LOAD_COMPILED_PATH="@guilemoduledir@:$GUILE_LOAD_COMPILED_PATH"
+GUILE_LOAD_COMPILED_PATH="@guileobjectdir@:$GUILE_LOAD_COMPILED_PATH"
export GUILE_LOAD_COMPILED_PATH
main='(module-ref (resolve-interface '\''(skribilo)) '\'skribilo')'
diff --git a/substitute.am b/substitute.am
index 004e7c3..4f69cb8 100644
--- a/substitute.am
+++ b/substitute.am
@@ -5,6 +5,7 @@ AM_V_SUBSTITUTE_ = $(AM_V_SUBSTITUTE_$(AM_DEFAULT_VERBOSITY))
AM_V_SUBSTITUTE_0 = @echo " SUBSTITUTE" $@;
substitute = sed -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
+ -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
-e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \
-e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \
-e 's,[@]prefix[@],$(prefix),g' \