* Autoconf test for site scheme files
@ 2007-08-07 15:42 Mike Gran
2007-08-07 16:35 ` Greg Troxel
0 siblings, 1 reply; 7+ messages in thread
From: Mike Gran @ 2007-08-07 15:42 UTC (permalink / raw)
To: Gule User
Hi-
I'm setting up the configure.ac and Makefile.in for a project that will
install some guile modules. The modules have scheme wrappers and load
a shared object file. The shared object library will go into
/usr/local/lib
Is there a "standard" way to get the site scheme directory?
At first glance, I would set it as schemedir =
$(datarootdir)/guile/site,
but, if $(datarootdir) is /usr/local/share, then $(schemedir) will be
/usr/local/share/guile/site, which is not in the default %load-path.
One solution would be to make a configure test that runs guile, prints
the %load-path, and then saves the first element in %load-path that
ends in the word "site".
Or something with `guile-config info pkgdatadir`, I guess.
Thanks,
Mike Gran
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Autoconf test for site scheme files
2007-08-07 15:42 Autoconf test for site scheme files Mike Gran
@ 2007-08-07 16:35 ` Greg Troxel
2007-08-07 16:52 ` Mike Gran
0 siblings, 1 reply; 7+ messages in thread
From: Greg Troxel @ 2007-08-07 16:35 UTC (permalink / raw)
To: Mike Gran; +Cc: Gule User
The hard question is whether you want the site directory in guile's
prefix, or the corresponding place in your prefix, assuming they are
different. I have tended to use the corresponding place in my prefix,
and then to either add to load path or symlink my subdir into guile's
site directory.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Autoconf test for site scheme files
2007-08-07 16:35 ` Greg Troxel
@ 2007-08-07 16:52 ` Mike Gran
2007-08-08 7:20 ` Ludovic Courtès
0 siblings, 1 reply; 7+ messages in thread
From: Mike Gran @ 2007-08-07 16:52 UTC (permalink / raw)
To: Greg Troxel; +Cc: Gule User
--- Greg Troxel <gdt@ir.bbn.com> wrote:
> The hard question is whether you want the site directory in guile's
> prefix, or the corresponding place in your prefix, assuming they are
> different. I have tended to use the corresponding place in my
> prefix,
> and then to either add to load path or symlink my subdir into guile's
> site directory.
>
Making the symlink is a practical solution. It is definitely easier
than making autoconf macros.
This brings up another question. Should %load-path should generally
include /usr/local/share/guile/site by default?
Arguments in favor: it would keep symmetry with the emacs $(lispdir)
directory as described in the GNU coding standards. [1]
Philosophically, can something be "site"-specific and not be "local"?
Arguments opposed: don't fix what ain't broke.
Thanks,
Mike Gran
[1]
http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Autoconf test for site scheme files
2007-08-07 16:52 ` Mike Gran
@ 2007-08-08 7:20 ` Ludovic Courtès
2007-08-08 15:03 ` Mike Gran
2007-08-12 4:27 ` Jon Wilson
0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2007-08-08 7:20 UTC (permalink / raw)
To: guile-user
Hi,
Note that the `GUILE_SITE_DIR' M4 macro gives you
"`guile-config info pkgdatadir`/site". But as Greg said, you may want
to avoid using it since it is independent of the `--prefix' option that
was passed to your package's `configure'.
Mike Gran <spk121@yahoo.com> writes:
> This brings up another question. Should %load-path should generally
> include /usr/local/share/guile/site by default?
>
> Arguments in favor: it would keep symmetry with the emacs $(lispdir)
> directory as described in the GNU coding standards. [1]
> Philosophically, can something be "site"-specific and not be "local"?
OTOH, why have two `site' directories by default?
Thanks,
Ludovic.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Autoconf test for site scheme files
2007-08-08 7:20 ` Ludovic Courtès
@ 2007-08-08 15:03 ` Mike Gran
2007-08-12 4:27 ` Jon Wilson
1 sibling, 0 replies; 7+ messages in thread
From: Mike Gran @ 2007-08-08 15:03 UTC (permalink / raw)
To: Ludovic Courtès, guile-user
Ludovic-
Thanks. That was exactly what I was looking for.
I was going to castigate myself for not RTFM, but, I didn't commit that
particular sin this time. GUILE_SITE_DIR and other Guile Autoconf
support flags don't appear to be documented in the 1.8 reference
manual, as far as I can tell.
(I did find then in the 1.6.x reference manual, however.)
Thanks again,
Mike Gran
--- Ludovic Courtès <ludo@gnu.org> wrote:
> Hi,
>
> Note that the `GUILE_SITE_DIR' M4 macro gives you
> "`guile-config info pkgdatadir`/site". But as Greg said, you may
> want
> to avoid using it since it is independent of the `--prefix' option
> that
> was passed to your package's `configure'.
>
> Mike Gran <spk121@yahoo.com> writes:
>
> > This brings up another question. Should %load-path should
> generally
> > include /usr/local/share/guile/site by default?
> >
> > Arguments in favor: it would keep symmetry with the emacs
> $(lispdir)
> > directory as described in the GNU coding standards. [1]
> > Philosophically, can something be "site"-specific and not be
> "local"?
>
> OTOH, why have two `site' directories by default?
>
> Thanks,
> Ludovic.
>
>
>
> _______________________________________________
> Guile-user mailing list
> Guile-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/guile-user
>
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Autoconf test for site scheme files
2007-08-08 7:20 ` Ludovic Courtès
2007-08-08 15:03 ` Mike Gran
@ 2007-08-12 4:27 ` Jon Wilson
2007-08-12 11:43 ` Greg Troxel
1 sibling, 1 reply; 7+ messages in thread
From: Jon Wilson @ 2007-08-12 4:27 UTC (permalink / raw)
To: guile-user
Ludovic Courtès wrote:
> Mike Gran <spk121@yahoo.com> writes:
>> This brings up another question. Should %load-path should generally
>> include /usr/local/share/guile/site by default?
>>
>> Arguments in favor: it would keep symmetry with the emacs $(lispdir)
>> directory as described in the GNU coding standards. [1]
>> Philosophically, can something be "site"-specific and not be "local"?
>>
> OTOH, why have two `site' directories by default?
>
Using ubuntu, apt installs packages under /usr. When I find something
that either isn't up to date enough or doesn't exist in the ubuntu
repos, I build it from source. In that case, I either install to /opt
or to /usr/local. Sometimes this includes packages which want to
install guile modules (currently, it includes guile!). I try to keep
/usr untouched except by apt, but it does make sense to have these
modules in a `site' directory.
For instance, I have guile-lib installed from the ubuntu package to
/usr/share/guile/site, and I have guile-gdbm installed to
/usr/local/share/guile/site. I think this constitutes a pragmatic
(although perhaps not good?) reason to have two site dirs.
Regards,
Jon
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Autoconf test for site scheme files
2007-08-12 4:27 ` Jon Wilson
@ 2007-08-12 11:43 ` Greg Troxel
0 siblings, 0 replies; 7+ messages in thread
From: Greg Troxel @ 2007-08-12 11:43 UTC (permalink / raw)
To: Jon Wilson; +Cc: guile-user
Jon Wilson <jsw@wilsonjc.us> writes:
> Using ubuntu, apt installs packages under /usr. When I find something
> that either isn't up to date enough or doesn't exist in the ubuntu
> repos, I build it from source. In that case, I either install to /opt
> or to /usr/local. Sometimes this includes packages which want to
> install guile modules (currently, it includes guile!). I try to keep
> /usr untouched except by apt, but it does make sense to have these
> modules in a `site' directory.
>
> For instance, I have guile-lib installed from the ubuntu package to
> /usr/share/guile/site, and I have guile-gdbm installed to
> /usr/local/share/guile/site. I think this constitutes a pragmatic
> (although perhaps not good?) reason to have two site dirs.
Sure, this makes sense - the problem is that people use the word site
for different things. Long ago, on a 4.2 system, we had /usr/site and
/usr/local. /usr/site was for the group of 15 machines (a lot of money
back then!), all synced from one. /usr/local was really for the machine.
Note that /usr/local isn't necessarily a good choice because on FreeBSD
the packaging system puts things there. (I'm not saying it's a problem
in your case.)
In the present case, you're using prefix to separate package-managed and
local software. I agree; I have base system (NetBSD) in /usr,
pkgsrc-managed packages in /usr/pkg and my own stuf f in /usr/y0.
I think it's perfectly sensible to have things in various prefixes for
separation by maintenance method. What's needed is an /etc/prefixes
file, or something, that many programs can read to construct their
default search path. Unfortunately this is messier because different
systems have different hierarchy rules (e.g., /usr/pkg/info vs
/usr/local/share/info), but in the guile case it's ok.
So, what do you do to get the various code loaded? symlink stuff in
/opt into /usr? Adjust load-path?
Also, I'm curious why you don't just update the source package yourself
and build it. In pkgsrc I often just change version numbers in
makefiles and build. But I have commit privs, so it isn't wasted work,
and pkgsrc has differet stability rules.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-08-12 11:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 15:42 Autoconf test for site scheme files Mike Gran
2007-08-07 16:35 ` Greg Troxel
2007-08-07 16:52 ` Mike Gran
2007-08-08 7:20 ` Ludovic Courtès
2007-08-08 15:03 ` Mike Gran
2007-08-12 4:27 ` Jon Wilson
2007-08-12 11:43 ` Greg Troxel
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).