unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: guile-user@gnu.org
Subject: configuring apps for guile
Date: Wed, 12 Feb 2020 05:54:18 -0800	[thread overview]
Message-ID: <5f967b74-9704-bd49-de82-97a2f1c665df@gmail.com> (raw)

Hi All,

Over the last year I have been dealing with issues getting a 
configure.ac put together
for my guile app.  It needs to install .scm and .go files into the place 
guile expects to
see them: (%site-ccache-dir) and %load-path.   If I compile for my 
ubuntu system then
the installed go files need to go in a non-standard place:
   /usr/lib/x86_64-linux-gnu/guile/2.2/site-ccache
If I compile for the guix context then the expectation is that the files 
are installed in
  $prefix/lib/guile/2.2/site-ccache

Here is my solution.  What do you think?  If $prefix is the same as used 
to build guile
then I use the directories from $guile.  Otherwise, I use the default.  
This now works on
ubuntu and guix.

 From configure.ac:

guile_build_prefix=`$GUILE -c "(display (assq-ref %guile-build-info 
'prefix))"`

if test "$guile_build_prefix" == "$prefix"; then
   echo "using paths for installed guile"
   GUILE_SITE_DIR
   GUILE_SITE_GO_DIR
   GUILE_DATA_DIR
else
   echo "using default paths for guile"
   GUILE_SITE=$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION
GUILE_SITE_GO=$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache
   GUILE_DATA=$prefix/share
   AC_SUBST([GUILE_SITE])
   AC_SUBST([GUILE_SITE_GO])
   AC_SUBST([GUILE_DATA])
fi

GUILE_SITE_DIR is defined in guile.m4, the others are in my own package m4.






             reply	other threads:[~2020-02-12 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 13:54 Matt Wette [this message]
2020-02-12 14:04 ` configuring apps for guile Matt Wette
2020-02-13  6:59   ` Jeremy Korwin-Zmijowski
2020-02-13 21:59 ` Jan Wedekind
2020-02-16 14:48 ` Ludovic Courtès
2020-02-16 15:28   ` Matt Wette
2020-02-16 15:43     ` Matt Wette
2020-02-16 15:44       ` Matt Wette
2020-02-16 17:57     ` Ludovic Courtès
2020-02-16 18:12       ` Matt Wette
2020-02-17  9:21         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f967b74-9704-bd49-de82-97a2f1c665df@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).