unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Autoconf guile.m4 improvement
@ 2014-08-13  6:40 Dmitry Bogatov
  0 siblings, 0 replies; only message in thread
From: Dmitry Bogatov @ 2014-08-13  6:40 UTC (permalink / raw)
  To: guile-devel


[-- Attachment #1.1: Type: text/plain, Size: 413 bytes --]

Hello!

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
$prefix.

Opinions, better solutions, critics?

PS. Please, keep me in CC.

--
Best regards, Dmitry Bogatov <KAction@gnu.org>,
Free Software supporter, esperantisto and netiquette guardian.
GPG: 54B7F00D

[-- Attachment #1.2: 0001-Improve-guile-site-handling-in-autoconf.patch --]
[-- Type: text/plain, Size: 2020 bytes --]

From d91eb9293bea7783afa8270c1826dc558c7380da Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <KAction@gnu.org>
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 <KAction@gnu.org>
---
 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}.
 #
 AC_DEFUN([GUILE_SITE_DIR],
  [AC_REQUIRE([GUILE_PKG])
@@ -172,7 +176,17 @@ AC_DEFUN([GUILE_SITE_DIR],
   if test "$GUILE_SITE" = ""; then
      AC_MSG_FAILURE(sitedir not found)
   fi
+  if test "x$prefix" != xNONE ; then
+    GUILE_SITE_LOCAL=`$PKG_CONFIG --print-errors --variable=sitedir guile-$GUILE_EFFECTIVE_VERSION --define-variable=prefix=$prefix`
+  else
+    GUILE_SITE_LOCAL="$GUILE_SITE"
+  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"],
+    [])
   AC_SUBST(GUILE_SITE)
+  AC_SUBST(GUILE_SITE_LOCAL)
  ])
 
 # GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
-- 
I may be not subscribed. Please, keep me in carbon copy.


[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-13  6:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13  6:40 Autoconf guile.m4 improvement Dmitry Bogatov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).