unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jan Wedekind <jan@wedesoft.de>
To: Matt Wette <matt.wette@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: configuring apps for guile
Date: Thu, 13 Feb 2020 21:59:35 +0000 (GMT)	[thread overview]
Message-ID: <alpine.DEB.2.21.2002132151440.31895@wedemob.home> (raw)
In-Reply-To: <5f967b74-9704-bd49-de82-97a2f1c665df@gmail.com>

On Wed, 12 Feb 2020, Matt Wette wrote:

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

I use guile.m4 from the FSF [1]. It gets invoked in configure.ac as 
follows [2].

   GUILE_PROGS
   GUILE_FLAGS
   GUILE_SITE_DIR
   GUILE_EXT_DIR
   GUILE_CACHE_DIR

See [3] for Automake file. Basically the useful variables from guile.m4 
are: GUILE_SITE, GUILE_EXT, GUILE_CACHE.

Regards
Jan

[1]: https://gitlab.com/wedesoft/aiscm/-/blob/master/m4/guile.m4
[2]: https://gitlab.com/wedesoft/aiscm/-/blob/master/configure.ac#L236
[3]: https://gitlab.com/wedesoft/aiscm/-/blob/master/aiscm/Makefile.am


  parent reply	other threads:[~2020-02-13 21:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 13:54 configuring apps for guile Matt Wette
2020-02-12 14:04 ` Matt Wette
2020-02-13  6:59   ` Jeremy Korwin-Zmijowski
2020-02-13 21:59 ` Jan Wedekind [this message]
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=alpine.DEB.2.21.2002132151440.31895@wedemob.home \
    --to=jan@wedesoft.de \
    --cc=guile-user@gnu.org \
    --cc=matt.wette@gmail.com \
    /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).