On Fri, Feb 23, 2018 at 3:59 AM, Eric Blake <ebl...@redhat.com> wrote: > On 02/21/2018 08:07 PM, Kang-Che Sung wrote: >> >> This bug is a funny one, I think. >> >> In flex (lexer) configure.ac, I use "dnl" comments within >> AC_CHECK_FUNCS for inline notes, like this: >> >> # -------------------------------- >> AC_CHECK_FUNCS([dnl >> pow dnl Used only by "examples/manual/expr" >> setlocale dnl Needed only if NLS is enabled >> reallocarr dnl NetBSD function. Use reallocarray if not available. >> reallocarray dnl OpenBSD function. We have replacement if not >> available. >> ]) > > Rather than waiting for an updated autoconf with the fix, you could instead > workaround it in the meantime, by making it more obvious that your comments > are just that: > > AC_CHECK_FUNCS( > [pow ]dnl Used only by "examples/manual/expr" > [seclocale ]dnl Needed only if NLS is enabled > [reallocarr ]dnl NetBSD function. Use reallocarray if not available. > [reallocarray ]dnl OpenBSD function. We have replacement if not available. > )
I'm already aware that unquoting the argument will work, and thank you. But I've proposed the workaround in Flex in a different way: <https://github.com/westes/flex/pull/316/commits/08b34646bd51ce4ef9008b1c7de6dabe90700e48> > > Yeah, that's an unfortunate side effect of the current implementation, which > treats AC_CHECK_FUNCS as a whitespace separated list of words and does NOT > perform macro expansion on that list as you would expect. It may be > possible to fix autoconf, but the fix may be hairy; or it might not even be > possible to fix, at which point, documentation would be the only thing to > improve. > What I was complaining is the inconsistent behavior between generating configure and generating config.h.in. Like I described in the follow-up mail, I expect both files work or both files be broken the same way.