guile-devel
[Top][All Lists]
Advanced

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

Re: What to do about config.h, etc...


From: Andreas Rottmann
Subject: Re: What to do about config.h, etc...
Date: Tue, 04 Mar 2003 20:05:19 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

Rob Browning <address@hidden> writes:

> In 1.6 and 1.7, configure has been changed to generate config.h rather
> than libguile/scmconfig.h, and now libguile/scmconfig.h is generated
> from ../config.h using sed.  During this process sed removes
> autoheader's global PACKAGE #define, so that it won't conflict with
> any other package's public headers.
>
[snip]

> To make things more difficult, AFAICT the auto* tools don't really
> provide us with any easy mechanism to fix this problem.  Off the top
> of my head I can see three choices:
>
>   - Edit configure.in to change all symbols produced by configure to
>     have SCM_ prefixes and just keep #including a copy of the
>     automatically generated header (i.e. no private symbols) as we do
>     now.  [...]
>   - Use sed or similar to mangle config.h into a public and private
>     header (or perhaps to just rename FOO -> SCM_FOO globally).  [...]
>
>   - Use a C program to translate from config.h to the public and
>     private headers, i.e. write a trivial C program that is built at
>     compile time, that #includes config.h, [...]

If you take a look at how other libraries, (e.g. GLib) do this, you'll
see that most of them that need a public-installed, platform-specific
header, use autoconf's AC_CONFIG_COMMANDS macro to generate that
header by a shell script run at configure time.

Regards, Andy
-- 
Andreas Rottmann         | address@hidden        | address@hidden | 
address@hidden
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62




reply via email to

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