autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] autoupdate: do not AC_REQUIRE(AC_PROG_CC)


From: Eric Blake
Subject: Re: [PATCH] autoupdate: do not AC_REQUIRE(AC_PROG_CC)
Date: Tue, 03 Sep 2013 06:49:45 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 08/30/2013 06:48 AM, Sami Kerola wrote:
> * Autoupdate will convert various AC_PROG_CC_* lines to AC_PROG_CC
> surrounded by AC_REQUIRE macro, which is unexpected.  The AC_PROG_CC is
> never used in AC_DEFUN.  The problem can be seen when running autoreconf
> in verbose mode after autoupdate.
> 
> $ autoupdate -f
> $ autoreconf -f -i -Wall
> [...]
> configure.ac:42: error: AC_REQUIRE(): cannot be used outside of an AC_DEFUN'd 
> macro

Thanks for the patch.  I'm still thinking about what is right to do;
there are many people that did:

AC_DEFUN([mymacro], [
AC_PROG_CC_C89
...
])

where the correct conversion is indeed:

AC_DEFUN([mymacro], [
AC_REQUIRE([AC_PROG_CC])
...
])

but when used at the top level instead of inside a user macro, you are
right that the AC_REQUIRE is annoying.  Autoupdate doesn't get much use
these days.  I'm wondering if there is a way to detect within autoupdate
whether a replacement is occurring at the top level or inside a macro,
and conditionally emit the AC_REQUIRE based on that determination.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]