Re: Inclusion of config.h in the example programs
- From: Martyn Russell <martyn russell bt com>
- To: gtk-devel-list gnome org
- Subject: Re: Inclusion of config.h in the example programs
- Date: Thu, 04 Nov 2004 11:14:39 +0000
On Tue, 2004-11-02 at 14:09 -0500, Owen Taylor wrote:
> > I thought it was:
> >
> > #ifdef HAVE_CONFIG_H
> > #include <config.h>
> > #endif
>
> I don't know who started it propagating this bit of code, but it
> should be stopped. :-) Projects have config.h files, or they don't.
> They don't optionally have config.h files.
Configure scripts seem to include the definition, so perhaps autoconf?
generates it.
I find it handy when you want to build with your own Makefile which
doesn't use any of the GNU tools. In those cases, you don't generate
the config.h file and can not include it.
Some projects I work on have a Makefile and a Makefile.am which build
with the same source (mainly for porting to Windows). Although, this
requires a lot of maintenance and is a pain when you require some of the
definitions generated in config.h (e.g. VERSION, PACKAGE, etc).
--
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]