summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès2007-10-28 21:44:49 +0100
committerLudovic Courtès2007-10-28 21:44:49 +0100
commit6bd5090e62617ff29ab6ca507752b2b3fb1137ef (patch)
tree1e9000f43c9b475decf27e4491872aab30e697a7
parent8f7249c988868886fea57d3f231079a2df846728 (diff)
downloadskribilo-6bd5090e62617ff29ab6ca507752b2b3fb1137ef.tar.gz
skribilo-6bd5090e62617ff29ab6ca507752b2b3fb1137ef.tar.lz
skribilo-6bd5090e62617ff29ab6ca507752b2b3fb1137ef.zip
Add configure `--with-guilemoduledir' option.
* configure.ac: Add support for `--with-guilemoduledir'. * */Makefile.am (guilemoduledir): Don't override the configure-provided value. * src/skribilo.in: Add `-L "@guilemoduledir@"'.
-rw-r--r--configure.ac27
-rw-r--r--src/Makefile.am1
-rw-r--r--src/guile/Makefile.am1
-rw-r--r--src/guile/skribilo/Makefile.am1
-rw-r--r--src/guile/skribilo/biblio/Makefile.am1
-rw-r--r--src/guile/skribilo/engine/Makefile.am1
-rw-r--r--src/guile/skribilo/package/Makefile.am1
-rw-r--r--src/guile/skribilo/package/eq/Makefile.am1
-rw-r--r--src/guile/skribilo/package/pie/Makefile.am1
-rw-r--r--src/guile/skribilo/package/slide/Makefile.am1
-rw-r--r--src/guile/skribilo/reader/Makefile.am1
-rw-r--r--src/guile/skribilo/source/Makefile.am1
-rw-r--r--src/guile/skribilo/utils/Makefile.am1
-rwxr-xr-xsrc/skribilo.in17
14 files changed, 32 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac
index e21f1bf..62951e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,16 @@ AC_CONFIG_SRCDIR([src/guile/skribilo/reader.scm])
# GNU Gettext.
AM_GNU_GETTEXT([external])
+# Specifying the Guile module directory.
+AC_ARG_WITH([guilemoduledir],
+ [use the specified installation path for Guile modules],
+ [case "x$withval" in
+ xyes|xno) guilemoduledir="";;
+ *) guilemoduledir="$withval";;
+ esac],
+ [guilemoduledir=""])
+
+
# Look for Guile.
GUILE_PROGS
GUILE_SITE_DIR
@@ -42,6 +52,23 @@ AC_PATH_PROGS([PLOTICUS], [ploticus pl])
AM_CONDITIONAL([HAVE_PLOTICUS], [test "x$PLOTICUS" != "x"])
+
+
+pkgdatadir="$datadir/$PACKAGE_NAME"
+if test "x$guilemoduledir" = "x"; then
+ guilemoduledir="$pkgdatadir"
+fi
+AC_SUBST([guilemoduledir])
+
+if test "$guilemoduledir" != "$GUILE_SITE"; then
+ # Guile won't be able to locate the module "out of the box", so
+ # warn the user.
+ AC_MSG_WARN([`guilemoduledir' ($guilemoduledir) is different from `GUILE_SITE' ($GUILE_SITE).])
+ AC_MSG_WARN([Make sure to adjust the `GUILE_LOAD_PATH' environment variable accordingly,])
+ AC_MSG_WARN([or re-run `configure' with `--with-guilemoduledir=$GUILE_SITE'.])
+fi
+
+
AC_SUBST([SKRIBILO_DOC_DIR], ["$datadir/doc/skribilo"])
AC_SUBST([SKRIBILO_EXT_DIR], ["$datadir/skribilo/1.2/"])
AC_SUBST([SKRIBILO_SKR_PATH], ["$GUILE_SITE/"])
diff --git a/src/Makefile.am b/src/Makefile.am
index 077c5c9..806d358 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,6 @@ EXTRA_DIST = skribilo.in
bin_SCRIPTS = skribilo
CLEANFILES = $(bin_SCRIPTS)
-guilemoduledir = $(GUILE_SITE)
substitute = sed -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
-e 's,[@]GUILE[@],$(GUILE),g' \
-e 's,[@]PACKAGE_STRING[@],$(PACKAGE_STRING),g' \
diff --git a/src/guile/Makefile.am b/src/guile/Makefile.am
index 75ded5b..70194c1 100644
--- a/src/guile/Makefile.am
+++ b/src/guile/Makefile.am
@@ -1,5 +1,4 @@
SUBDIRS = skribilo
-guilemoduledir = $(GUILE_SITE)
dist_guilemodule_DATA = skribilo.scm diff.scm
EXTRA_DIST = README
diff --git a/src/guile/skribilo/Makefile.am b/src/guile/skribilo/Makefile.am
index 029d4f2..f5b9e2f 100644
--- a/src/guile/skribilo/Makefile.am
+++ b/src/guile/skribilo/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo
dist_guilemodule_DATA = biblio.scm color.scm config.scm \
debug.scm engine.scm evaluator.scm \
index.scm lib.scm module.scm \
diff --git a/src/guile/skribilo/biblio/Makefile.am b/src/guile/skribilo/biblio/Makefile.am
index 8d4028e..8d47484 100644
--- a/src/guile/skribilo/biblio/Makefile.am
+++ b/src/guile/skribilo/biblio/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/biblio
dist_guilemodule_DATA = bibtex.scm author.scm abbrev.scm template.scm
include $(top_srcdir)/guile-lint.am
diff --git a/src/guile/skribilo/engine/Makefile.am b/src/guile/skribilo/engine/Makefile.am
index 260cd3a..0272dee 100644
--- a/src/guile/skribilo/engine/Makefile.am
+++ b/src/guile/skribilo/engine/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/engine
dist_guilemodule_DATA = base.scm context.scm html.scm html4.scm \
latex.scm lout.scm xml.scm
diff --git a/src/guile/skribilo/package/Makefile.am b/src/guile/skribilo/package/Makefile.am
index 62a8c1c..5ba740c 100644
--- a/src/guile/skribilo/package/Makefile.am
+++ b/src/guile/skribilo/package/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/package
dist_guilemodule_DATA = acmproc.scm french.scm jfp.scm letter.scm \
lncs.scm scribe.scm sigplan.scm \
slide.scm web-article.scm web-book.scm \
diff --git a/src/guile/skribilo/package/eq/Makefile.am b/src/guile/skribilo/package/eq/Makefile.am
index a11bb75..0ffbf42 100644
--- a/src/guile/skribilo/package/eq/Makefile.am
+++ b/src/guile/skribilo/package/eq/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/package/eq
dist_guilemodule_DATA = lout.scm
include $(top_srcdir)/guile-lint.am
diff --git a/src/guile/skribilo/package/pie/Makefile.am b/src/guile/skribilo/package/pie/Makefile.am
index c6b8818..49807de 100644
--- a/src/guile/skribilo/package/pie/Makefile.am
+++ b/src/guile/skribilo/package/pie/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/package/pie
dist_guilemodule_DATA = lout.scm
include $(top_srcdir)/guile-lint.am
diff --git a/src/guile/skribilo/package/slide/Makefile.am b/src/guile/skribilo/package/slide/Makefile.am
index 18723dd..361bb86 100644
--- a/src/guile/skribilo/package/slide/Makefile.am
+++ b/src/guile/skribilo/package/slide/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/package/slide
dist_guilemodule_DATA = base.scm latex.scm html.scm lout.scm
include $(top_srcdir)/guile-lint.am
diff --git a/src/guile/skribilo/reader/Makefile.am b/src/guile/skribilo/reader/Makefile.am
index 1509ba6..7603ae5 100644
--- a/src/guile/skribilo/reader/Makefile.am
+++ b/src/guile/skribilo/reader/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/reader
dist_guilemodule_DATA = skribe.scm outline.scm
include $(top_srcdir)/guile-lint.am
diff --git a/src/guile/skribilo/source/Makefile.am b/src/guile/skribilo/source/Makefile.am
index 4c961cf..8baed5e 100644
--- a/src/guile/skribilo/source/Makefile.am
+++ b/src/guile/skribilo/source/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/source
dist_guilemodule_DATA = parameters.scm c.scm lisp.scm xml.scm \
lisp-lex.scm xml-lex.scm c-lex.scm
diff --git a/src/guile/skribilo/utils/Makefile.am b/src/guile/skribilo/utils/Makefile.am
index 9bcaca0..fd07bbc 100644
--- a/src/guile/skribilo/utils/Makefile.am
+++ b/src/guile/skribilo/utils/Makefile.am
@@ -1,4 +1,3 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/utils
dist_guilemodule_DATA = syntax.scm compat.scm files.scm images.scm \
keywords.scm strings.scm
diff --git a/src/skribilo.in b/src/skribilo.in
index 8d49f84..1240be0 100755
--- a/src/skribilo.in
+++ b/src/skribilo.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
+# Copyright 2005, 2006, 2007 Ludovic Courtès <ludo@gnu.org>
#
#
# This program is free software; you can redistribute it and/or modify
@@ -20,19 +20,12 @@
# The `skribilo' executable.
-# Note: In Guile 1.8+ (or 1.9), when Guile is run in batch mode with
-# `--debug', it produces a clean stack trace when an exception is
-# raised and uncaught. On earlier versions, it behaves as if
-# `--debug' had not been passed, not displaying a stack trace. See
-# http://lists.gnu.org/archive/html/guile-devel/2006-01/msg00022.html
-# for details.
-#
-# In any case, don't pass `--debug' by default (for performance
-# reason). When needed, the use should explicitly set the `GUILE'
-# environment variable to, e.g., "guile --debug".
+# Don't pass `--debug' by default (for performance reason). When
+# needed, the use should explicitly set the `GUILE' environment
+# variable to, e.g., "guile --debug".
main='(module-ref (resolve-module '\''(skribilo)) '\'main')'
-exec ${GUILE-@GUILE@} -c "
+exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -c "
(use-modules (skribilo condition))
(call-with-skribilo-error-catch