autoconf
[Top][All Lists]
Advanced

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

Re: Why conditionally include config.h?


From: Bob Friesenhahn
Subject: Re: Why conditionally include config.h?
Date: Thu, 13 Sep 2012 19:14:10 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Thu, 13 Sep 2012, Kip Warner wrote:


Why do many autoconfiscated projects bracket inclusion of the generated
config.h with #if HAVE_CONFIG_H / #endif. Assuming the build
environment was configured, why shouldn't the source just always
unconditionally include config.h? I mean if it isn't there, typically
that means the user didn't configure first which ought to be an error
anyways, no?

Since subsequent responses are not yet adequate ...

It is not necessary to have a configuration header when Autoconf is used. If a configuration header is not used, then all definitions appear on the compiler command line and HAVE_CONFIG_H is not defined.

However, it is a bug for #if HAVE_CONFIG_H to be used in any installed header file because it might apply to any package, including some other package.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

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