Autoconf test for site scheme files

2007-08-07 Thread Mike Gran
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


displaying a backtrace in the shell

2007-08-07 Thread Erica L Cooper

hello,

I am trying to get a guile script that is executed on a port server 
to display a backtrace if there is an error.  as of now I have:


(define (backtrace-test args)
(catch
'ignore
  (lambda ()
(lazy-catch
 #t
 (lambda () (throw 'test-error))
 (lambda (key . args)
   (let ((stack (make-stack #t)))
 (throw 'ignore
   (with-output-to-string
   (lambda ()
 (display-backtrace stack (current-output-port)
  (lambda (k . v)
(display (car v)

which, if you run in interactive Guile, displays the backtrace without 
complaint.  however, when you execute this from the command line, it 
says,


Exception during displaying of backtrace: wrong-type-arg

why is this?  any help is greatly appreciated.

Thanks,
Erica


___
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


Re: Autoconf test for site scheme files

2007-08-07 Thread Greg Troxel
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


Re: Autoconf test for site scheme files

2007-08-07 Thread Mike Gran
--- Greg Troxel <[EMAIL PROTECTED]> 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