automake
[Top][All Lists]
Advanced

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

Re: How to install "config.h"


From: Gary V. Vaughan
Subject: Re: How to install "config.h"
Date: Thu, 2 Nov 2000 15:44:46 +0000
User-agent: Mutt/1.2.5i

On Mon, Oct 30, 2000 at 09:18:42AM -0800, Ossama Othman wrote:
> Hi Gary,
> 
> On Fri, Oct 27, 2000 at 08:44:40PM +0100, Gary V. Vaughan wrote:
> > Hmmm.  I think that installing config.h is a bad idea under any
> > circumstances.  I talk about this in some detail in the ``Project''
> > chapters of the Goat Book (linked from my homepages), and offer an
> > ugly but functional solution.  Even if you don;'t go for that solution
> > all out, there is no getting away from the fact that a certain amount
> > of rewriting is an absolute must.
> 
> I'm not sure that I agree with you, though I confess that I probably
> haven't thought about this issue as much as you.  Please feel free to
> correct me.  :-)
> 
> If the macros placed in the package specific config.h are named so
> that they are specific to the given package then why is installing
> that header a problem.  For example, if my config header has the
> following:
> 
> /* I'm assuming that "FOO" is a fairly unique package name. */
> #ifndef FOO_CONFIG_H
> #define FOO_CONFIG_H
> 
> #define FOO_HAS_SOME_FEATURE 1
> #define FOO_HAS_ANOTHER_FEATURE 1
> 
> #endif  /* FOO_CONFIG_H */

That's right.  You are actually agreeing with me here.  Before you can
install foo's config.h, you must take all of the HAVE_BAR macros and
rewrite them to say FOO_HAVE_BAR...

> then the defined macros would presumably not conflict with macros in
> other headers.  Sure another package may potentially use macros with
> the same name but at least some reconciliation can be achieved between
> the package authors.
> 
> I do agree that the use of macros in a config.h such as "PACKAGE,"
> "VERSION" and "HAVE_*" is a bad thing since they are named
> generically.  It would be nice if it was possible to make autoconf
> prepend a package name, for example, to such automatically defined
> macros.  That would at least help alleviate the problem.

Yup.  If autoconf rewrote the header for you, there would no longer be
any need to do it manually before installing.

Cheers,
        Gary.
-- 
  ___              _   ___   __              _         mailto: address@hidden
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___       address@hidden 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page:  /___/                      /___/                  gpg public key:
http://www.oranda.demon.co.uk           http://www.oranda.demon.co.uk/key.asc



reply via email to

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