[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Autoconf guile.m4 improvement

From: Dmitry Bogatov
Subject: Autoconf guile.m4 improvement
Date: Wed, 13 Aug 2014 10:40:54 +0400
User-agent: Mutt/ (2013-10-16)


In current state GUILE_SITE do not respect $prefix and hard to use in
local installs of Guile modules. This patch tries to improve this
situation by introducing GUILE_SITE_LOCAL version, than respects

Opinions, better solutions, critics?

PS. Please, keep me in CC.

Best regards, Dmitry Bogatov <address@hidden>,
Free Software supporter, esperantisto and netiquette guardian.
GPG: 54B7F00D
From d91eb9293bea7783afa8270c1826dc558c7380da Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <address@hidden>
Date: Wed, 13 Aug 2014 10:13:25 +0400
Subject: [PATCH] Improve guile-site handling in autoconf

  * meta/guile.m4(GUILE_SITE_DIR): Add new substitution variable
  GUILE_SITE_LOCAL, that outputs "guile-site" under prefix of
  package beeing installed, not under guile prefix.

  This way `make dist-check` will be happy.

Signed-off-by: Dmitry Bogatov <address@hidden>
 meta/guile.m4 |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/meta/guile.m4 b/meta/guile.m4
index 441dcd4..31339c9 100644
--- a/meta/guile.m4
+++ b/meta/guile.m4
@@ -162,7 +162,11 @@ AC_DEFUN([GUILE_FLAGS],
 # PREFIX/share/guile/site, and sets var @var{GUILE_SITE} to the path.
 # Note that the var name is different from the macro name.
-# The variable is marked for substitution, as by @code{AC_SUBST}.
+# Also, set @var{GUILE_SITE_LOCAL} variable as installation path
+# under package prefix, if it is specified. It is suitable for
+# non-root installation of Guile modules.
+# The variables is marked for substitution, as by @code{AC_SUBST}.
@@ -172,7 +176,17 @@ AC_DEFUN([GUILE_SITE_DIR],
   if test "$GUILE_SITE" = ""; then
      AC_MSG_FAILURE(sitedir not found)
+  if test "x$prefix" != xNONE ; then
+    GUILE_SITE_LOCAL=`$PKG_CONFIG --print-errors --variable=sitedir 
guile-$GUILE_EFFECTIVE_VERSION --define-variable=prefix=$prefix`
+  else
+  fi
+  AC_ARG_WITH([guile-site-dir],
+    [AS_HELP_STRING([--with-guile-site-dir], [use the specified installation 
path for Guile modules])],
+    [GUILE_SITE_LOCAL="$withval"],
+    [])
 # GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
I may be not subscribed. Please, keep me in carbon copy.

Attachment: pgpXjPnZ5sIL7.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]