guile-user
[Top][All Lists]
Advanced

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

Re: issue with GUILE_SITE_DIR m4 macro


From: Ludovic Courtès
Subject: Re: issue with GUILE_SITE_DIR m4 macro
Date: Sun, 25 Jan 2009 23:48:59 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Hi!

"Zeeshan Ali (Khattak)" <address@hidden> 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'.





reply via email to

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