aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
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 /configure.ac
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@"'.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 27 insertions, 0 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/"])