guile-user
[Top][All Lists]
Advanced

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

configuring apps for guile


From: Matt Wette
Subject: configuring apps for guile
Date: Wed, 12 Feb 2020 05:54:18 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

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 via email to

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