[Python-checkins] CVS: python/dist/src acconfig.h,1.59,1.60 configure,1.293,1.294 configure.in,1.303,1.304 pyconfig.h.in,1.25,1.26

Martin v. Löwis loewis@informatik.hu-berlin.de
11 Apr 2002 17:42:35 +0200


Guido van Rossum <guido@python.org> writes:

> > Move autoheader declarations into configure.in.
> 
> Very cool.  What autoconf feature was it that we weren't using enough?

AC_DEFINE has an optional third argument which is the docstring. If
that is filled out, autoheader won't complain if it is not in
acconfig.h, and put the macro into pyconfig.h.in properly.

> Can you explain how you obtained the set of symbols that remain in
> acconfig.h?  (Appended)

I think they fall into three categories:

- More than one AC_DEFINE. autoheader will continue to complain that
  there is no template. This is the problem for most of them. Possible
  solutions:
  a) arrange that there is only a single AC_DEFINE, conditional upon
     some variable.
  b) Use AH_TEMPLATE. This allows to specify the template in
     configure.in; multiple AC_DEFINEs can then refer to a single
     template. This is only available in autoconf 2.5x

- Not referenced in configure.in. I haven't checked whether they are
  all used.

- The part below @BOTTOM. It may be sensible to put it into pyport.h.
  Alternatively, autoconf 2.5x offers AH_BOTTOM.

It would be easiest to rewrite this to use the autoconf 2.5x features,
then kill acconfig.h. A solution that continues to work with 2.13
might be possible, but require more work (and I'd like to bump
AC_PREREQ at the end, so that the Debian wrapper correctly knows what
autoconf to invoke).

Regards,
Martin