-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paolo Bonzini on 6/16/2009 1:38 AM:
> 
>> Thus, for this case, we could use this to break the infloop:
>>
>> AU_DEFUN([_AC_CHECK_HEADER_OLD],
>> [AC_CHECK_HEADER([$1], [$2], [$3], [-])], [],
>> [_AC_CHECK_HEADER_PREPROC($@)])
>>
>> because autoconf would not be picking up the gcc replacement for
>> AC_CHECK_HEADER, but the user that runs autoupdate will still pick up on
>> the now-documented usage of the public API.
> 
> I tried it quickly but couldn't even with
> 
> AU_DEFUN([_AC_CHECK_HEADER_OLD],
> [AC_CHECK_HEADER([$1], [$2], [$3], [-])], [], [_AC_CHECK_HEADER_PREPROC])
> 
> I couldn't get the INTERNAL-CODE to appear in the m4_defn rather than
> the USER-CODE.

Did you try implementing a fourth argument to AU_DEFUN yet?  Right now, it
only takes three, so we have to fix AU_DEFUN first before we can use my
proposed idiom on _AC_CHECK_HEADER_{OLD,NEW}.

> I guess we have to resort to just m4_defun-ing _AC_CHECK_HEADER_OLD.  Is
> the attached patch okay?

Not as is:

>  # Some packages used this macro, even though it is undocumented.
> -AU_DEFUN([_AC_CHECK_HEADER_NEW],
> -[AC_CHECK_HEADER([$1], [$2], [$3], [AC_INCLUDES_DEFAULT])])
> +# And they used it in a way that breaks autoupdate, like this:
> +#   m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_NEW]))
> +m4_defun([_AC_CHECK_HEADER_NEW], [_AC_CHECK_HEADER_COMPILE])

This loses the arguments; the replacement would need to use ($@) to pass
the original arguments on to the replacement function.

But I still think there's merit to trying a fourth argument.  I'll start
working on a patch for that...

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko3iDcACgkQ84KuGfSFAYA2DwCfdZvdBHsd0CxhA23HbeV55mw2
f1AAnj7rWZukb8LazdewAdGmSXBz2D1N
=zR5C
-----END PGP SIGNATURE-----


Reply via email to