[Top][All Lists]

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

Re: warnings expanding macros before they're required

From: Mike Frysinger
Subject: Re: warnings expanding macros before they're required
Date: Mon, 11 Jul 2011 16:27:38 -0400
User-agent: KMail/1.13.7 (Linux/2.6.39; KDE/4.6.3; x86_64; ; )

On Monday, July 11, 2011 15:50:42 Eric Blake wrote:
> On 07/11/2011 01:31 PM, Mike Frysinger wrote:
> > with this little bit of code:
> > $ cat common.m4
> Change this to AC_REQUIRE([AC_PROG_CC]), and that should also avoid the
> warning.

seems to work, but only if i quote [].  using AC_REQUIRE(AC_PROG_CC) ends up 
spitting a lot of stuff to stderr which seems bad ...

> I suggest using proper m4 quoting:

the code mostly is quoted properly ... this example was hand written for 
showing the issue

> >
> > running autoconf (2.64 and 2.68) results in the warnings:
> 2.64 doesn't produce the warnings; but silently produced a broken
> configure instead.

the warning output i posted was from using autoconf-2.64.  that's how i 
noticed originally, but then made sure to try the latest version before 
reporting a bug.  i guess you mean "<2.64" and not "<=2.64".

> 2.68 outputs a fixed configure, at the expense of
> outputting the code for AC_PROG_CC twice; the warning exists to tell you
> that you can shrink the size of your configure by fixing things to avoid
> the warning.

thanks ... the warning displayed didnt convey that's what was actually 
happening.  perhaps it should be updated with the URL you provided here.

> In Autoconf 2.68, you end up with this layout:
> # prereqs to SIM_AC_COMMON
> # body of AC_PROG_CC - $CC is set before use
> # prereqs to AC_CHECK_HEADERS, including code that uses $CC
> # body of SIM_AC_COMMON
> # body of AC_PROG_CC - redundant, hence the warning
> # body of AC_CHECK_HEADERS

seems like autoconf should be smart enough to not do this

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

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