Hello list,

I am trying to "fix" the support of GNU Guile in Autotools. Guile
ships its guile/meta/guile.m4 macros, that among other things, set
GUILE_SITE to /usr/share/guile/site/3.0/ (on Debian 12) or similar.

Since automake does not understand bin_PROGRAMS, etc, for Guile,
programmers are forced to use _DATA to ship scheme files:

    foo_DATA = foo.scm
    foodir = $(GUILE_SITE)/foo

This breaks `make distcheck`, as it attempts to install to a directory
under /usr, which a normal user does not have write access to (for a
full project example that exhibits this issue see
<https://github.com/createyourpersonalaccount/autotools-guile-example-v2>).

There are currently two solutions that I'm aware of:

1) Use `DESTDIR=/tmp make distcheck`.
2) Set an environment variable FOODIR at autoconf time that automake
will use for foodir instead of GUILE_SITE. This is explained in
<https://www.unwoundstack.com/blog/guile-and-autoconf.html>.

Neither of these solutions is ideal as it treats GNU Guile as a
second-class language for Autotools. I'm curious if anyone can offer
alternative ideas as to how autoconf/automake should behave with
regards to GNU Guile. I'd like to try and implement a solution.

I do not understand why GUILE_SITE is necessary; in particular I don't
know why guile can't just respect prefix, etc. It would be nice if the
programmer could somehow signal to Automake to set DESTDIR by default
to /tmp (or similar). A bit unrelated, but it would also be nice if
custom options could be specified to the configure script aside from
--with-* and --enable-*. I mean truly custom options, so that e.g. one
could specify --guile-site=...

Regards,
Nikolaos Chatzikonstantinou

Reply via email to