automake
[Top][All Lists]
Advanced

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

Re: How to install "config.h"


From: Ossama Othman
Subject: Re: How to install "config.h"
Date: Mon, 30 Oct 2000 09:18:42 -0800
User-agent: Mutt/1.2.5i

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 */

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.

-Ossama
-- 
Ossama Othman <address@hidden>
Distributed Object Computing Laboratory, Univ. of California at Irvine
1024D/F7A394A8 - 84ED AA0B 1203 99E4 1068  70E6 5EB7 5E71 F7A3 94A8



reply via email to

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