[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: _AC_CHECK_HEADER_OLD
From: |
Eric Blake |
Subject: |
Re: _AC_CHECK_HEADER_OLD |
Date: |
Tue, 16 Jun 2009 05:55:35 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----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 address@hidden
-----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-----
- _AC_CHECK_HEADER_OLD (was: m4_copy and m4_rename semantic changes), Eric Blake, 2009/06/15
- Re: _AC_CHECK_HEADER_OLD, Paolo Bonzini, 2009/06/15
- Re: _AC_CHECK_HEADER_OLD, Eric Blake, 2009/06/15
- Re: _AC_CHECK_HEADER_OLD, Ralf Wildenhues, 2009/06/15
- Re: _AC_CHECK_HEADER_OLD, Eric Blake, 2009/06/15
- Re: _AC_CHECK_HEADER_OLD, Eric Blake, 2009/06/15
- Re: _AC_CHECK_HEADER_OLD, Paolo Bonzini, 2009/06/16
- Re: _AC_CHECK_HEADER_OLD,
Eric Blake <=
- Re: _AC_CHECK_HEADER_OLD, Paolo Bonzini, 2009/06/16
- Re: _AC_CHECK_HEADER_OLD, Eric Blake, 2009/06/17
- Re: _AC_CHECK_HEADER_OLD, Ralf Wildenhues, 2009/06/17