[Python-Dev] Re: HAVE_CONFIG_H
François Pinard
pinard@iro.umontreal.ca
29 Jul 2002 19:30:30 -0400
[Martin v. Loewis]
> Guido van Rossum <guido@python.org> writes:
> > I see no references to HAVE_CONFIG_H in the source code (except one
> > #undef in readline.c), yet we #define it on the command line. Is that
> > still necessary?
> It's autoconf tradition to use that; it would replace DEFS to either
> many -D options, or -DHAVE_CONFIG_H (if AC_CONFIG_HEADER appears).
> I don't think we need this, and it can safely be removed.
The many `-D' options which appear when `AC_CONFIG_HEADER' is not used
are rather inelegant, they create a lot, really a lot of clumsiness in
`make' output. The idea, but you surely know it, was to regroup all
auto-configured definitions into a single header file, and limit the `-D'
to the sole `HAVE_CONFIG_H', or almost. While the:
#if HAVE_CONFIG_H
# include <config.h>
#endif
idiom, for some widely used sources, was to cope with `AC_CONFIG_HEADER'
being defined in some projects, and not in others. There is no need to
include `config.h', nor to create it, if all `#define's have been already
done through a litany of `-D' options.
--
François Pinard http://www.iro.umontreal.ca/~pinard