Re: Possible regressions with trunk autoconf (vs 2.71)

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


On Wed, Nov 16, 2022, at 4:06 AM, Frederic Berat wrote:
> Hello again,
> Some progress on this, it looks like, at least for libpng, there is at one
> place where the "Port AC_LANG_CALL" seems to be the culprit.
> Specifically, the "," in the C comment, is interpreted by M4 as argument
> split which in turn leads to the syntax error.
> I made a small test where I  "overquote" the snippet, which seems to work
> around the problem for this package at least, but there may be better
> solutions:
>  m4_define([AC_LANG_CALL(C)],
>  m4_if([$2], [main], ,
> -[/* Override any GCC internal prototype to avoid an error.
> +[[/* Override any GCC internal prototype to avoid an error.

Double quotation of the arguments to AC_LANG_PROGRAM is the documented way to
avoid this kind of problem, see

Since the code here is doing something more complicated than just passing literal code fragments to AC_LANG_PROGRAM, I will need to dig into exactly what it's doing before applying your patch or something like it (and I won't have time to do that until the weekend) but you're on the right track.

(Anyone wanna write up some improvements to the documentation of AC_LANG_PROGRAM itself?  The need for double quotation is mentioned in one sentence near the top of but it's easy to miss.)


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux