unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: issue with GUILE_SITE_DIR m4 macro
Date: Sun, 25 Jan 2009 23:48:59 +0100	[thread overview]
Message-ID: <87ab9ft31g.fsf@gnu.org> (raw)
In-Reply-To: 38294b740901251244w5c13a4do7bb1beba09e5135f@mail.gmail.com

Hi!

"Zeeshan Ali (Khattak)" <zeenix@gmail.com> writes:

>   I am using GUILE_SITE_DIR m4 macro in xchat-guile to find out where
> should i install my guile module. It works perfectly fine except that
> `make distcheck` fails:
>
> test -z "/usr/share/guile/site/xchat-guile" || /bin/mkdir -p
> "/usr/share/guile/site/xchat-guile"
>  /usr/bin/install -c '../plugin-system.scm'
> '/usr/share/guile/site/xchat-guile/plugin-system.scm'
> /usr/bin/install: cannot create regular file
> `/usr/share/guile/site/xchat-guile/plugin-system.scm': Permission
> denied

The problem is that `GUILE_SITE_DIR' does not honor `$prefix' (leading
to the `distcheck' failure above), so it should be avoided.

I use something along the following lines in `configure.ac':

  AC_ARG_WITH([guilemoduledir],
    [use the specified installation path for Guile modules],
    [case "x$withval" in
       xyes|xno) guilemoduledir="";;
       *)        guilemoduledir="$withval";;
     esac],
    [guilemoduledir=""])

  GUILE_SITE_DIR

  if test "$guilemoduledir" != "$GUILE_SITE"; then
   # Guile won't be able to locate the module "out of the box", so
   # warn the user.
   AC_MSG_WARN([`guilemoduledir' ($guilemoduledir) is different from `GUILE_SITE' ($GUILE_SITE).])
   AC_MSG_WARN([Make sure to adjust the `GUILE_LOAD_PATH' environment variable accordingly,])
   AC_MSG_WARN([or re-run `configure' with `--with-guilemoduledir=$GUILE_SITE'.])
  fi

And then in `Makefile.am':

  dist_guilemodule_DATA = foo.scm bar.scm

Ideally, we'd modify Autoconf so that it knows about `guilemoduledir',
just like it knows about `lispdir'.

Thanks,
Ludo'.





  parent reply	other threads:[~2009-01-25 22:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-25 20:44 issue with GUILE_SITE_DIR m4 macro Zeeshan Ali (Khattak)
2009-01-25 22:04 ` Linas Vepstas
2009-01-25 22:25   ` Zeeshan Ali (Khattak)
2009-01-25 22:52     ` Linas Vepstas
2009-01-25 22:48 ` Ludovic Courtès [this message]
2009-01-25 22:50 ` Mike Gran

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=87ab9ft31g.fsf@gnu.org \
    --to=ludo@gnu.org \
    --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).