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)], > [AC_LANG_PROGRAM([$1 > 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 https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/Quotation-Rule-Of-Thumb.html 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 https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/Generating-Sources.html but it's easy to miss.) zw