guile-devel
[Top][All Lists]
Advanced

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

Re: Release Guile, now ;-) [was:] Re: GC rewrite, first version.


From: rm
Subject: Re: Release Guile, now ;-) [was:] Re: GC rewrite, first version.
Date: Fri, 2 Aug 2002 11:35:47 +0200
User-agent: Mutt/1.3.24i

Hi Rob,

I feel sorry seeing that my complaints cause such a lot of trouble.

On Thu, Aug 01, 2002 at 05:40:31PM -0500, Rob Browning wrote:
> Rob Browning <address@hidden> writes:
> 
> > 1.5.7 was ready to go.  However since I'm waiting to upload anyway
> > I'll go see how extensive the changes to fix it might be.
> 
> OK, after looking in to it, it seems like we probably need a number of
> changes to get things "right".  One of the main questions is how do
> you generate a header that can be included in the install tree
> containing info based on configure's results, but doesn't refer to any
> of those results (at least not to the generic names).  

Hmm, i don't understand this. The offending header file is not generated
by 'autoheader', it's processed by 'configure'. Instead of writing a custom
c program that emits all needed #defines wouldn't it be sufficient to 
create scmconfig.h.in by hand?

> After poking
> around a bit I propose the following solution:
> 
>   * change our configure generated header to be config.h via
>     config.h.in as per the normal autoconf expectations and put it in
>     the normal place ./config.h.in.  This will now be a completely
>     private header, not installed, and not included by anything but .c
>     files.

Good idea, IMHO.

> [...]
>   * add a rule to libguile/Makefile.am like this:
> 
>       scmconfig.h: ${builddir}/scmconfig-generate
>         ${builddir}/scmconfig-generate > scmconfig.h.tmp
>         mv scmconfig.h.tmp scmconfig.h
> 
>   * write libguile/scmconfig-generate.c to use the values in
>     <config.h> to generate a config.h independent header like this:
> 
>       #include <config.h>
>       #include <stdio.h>
> 
>       int
>       main (int argc, char *argv[])
>       {
>         printf(
> [...]
>     This allows us to autogenerate the file from the contents of
>     config.h without having to do anything too fancy with
>     sed/config.status, etc.
> 
>   * go through and add items to scmconfig-generate.c as needed, but
>     leave as much as possible in <config.h> -- where it'll be private.
>     For example, I'm guessing that most of the HAVE_FOO macros won't
>     be public, and the ones that must be public (i.e. in scmconfig.h)
>     should be renamed to SCM_HAVE_FOO, or similar.

But if you want to select the values you want/need to export anyway,
why not use the autoconf machinery for that. Instead of putting these
values as string constants into a C program might as well have:

*----------------------------------------------------------------------
| 
| dnl file: public_defines.ac
| dnl       This files describes the #defines detected
| dnl       during libguile's build process that need to
| dnl       be visible to users of the library.
| 
| AC_PREREQ(2.53)
| AC_INIT
| 
| AM_CONFIG_HEADER(libguile/scmconfig.h)
| 
| AC_DEFINE(GUILE_DEBUG_FREELIST, 1,
|       [Define this if you want to debug the free list (helps w/ GC bugs).])
| AC_DEFINE(GUILE ......
| 

and then have it processed by autoheader with an invocation like this:

 autoheader public_defines.ac

that's all that's needed, as far as i understand.

> 
> But this looks like a non-trivial amount of work.  I've already done
> all the steps but the last in a test tree, but that's the big one.
> So the question is, does this have to be done before 1.6.1?

May i offer my help?

  Ralf Mattes



reply via email to

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