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.
    ])
    # --------------------------------

But this syntax will make autoheader generate unneeded HAVE_ macros in
config.h.in:

    /* Define to 1 if you have the `available.' function. */
    #undef HAVE_AVAILABLE_

    /* Define to 1 if you have the `by' function. */
    #undef HAVE_BY

    /* Define to 1 if you have the `dnl' function. */
    #undef HAVE_DNL

The dnl comments should be ignored when generating config.h.in header,
or at least document that users should not add comments from within
AC_CHECK_FUNCS.

Note: Tested this with Autoconf 2.69 and Automake 1.15.1. Detailed
steps to reproduce:

$ git clone --depth 1 --branch v2.6.4 https://github.com/westes/flex flex
$ cd flex
$ autoheader
$ cat src/config.h.in

See the useless HAVE_ macros in the header.

Reply via email to