]> git.ipfire.org Git - thirdparty/autoconf.git/commit
AC_CHECK_HEADERS_ONCE: honor current AC_LANG
authorEric Blake <eblake@redhat.com>
Wed, 21 Dec 2016 14:32:29 +0000 (08:32 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 21 Dec 2016 14:32:29 +0000 (08:32 -0600)
commit501ccbbfdb43561537f377a2ac66cf89f975b1b1
tree41e906b3614875b33ec63d0b1952551dae0be09f
parent4523f7c32b052e805c4081fa6a55c7414d94d791
AC_CHECK_HEADERS_ONCE: honor current AC_LANG

Previously, AC_CHECK_HEADERS_ONCE collected a list of header names
to check, but ran the checks using the AC_LANG that was active
during the first encounter of the macro.  In practice, this is
usually the C language, and we haven't had actual reports of projects
attempting to use AC_CHECK_HEADERS_ONCE across multiple languages,
rather this was discovered by code inspection.

With this patch, the code now tracks a separate per-language list of
names to check.  Note, however, that it is only possible to check for
a given header name in one language; attempting to add a name again
under AC_CHECK_HEADERS_ONCE while a different language is active is a
no-op (this still makes sense because the side-effect of defining
the CPP macro HAVE_HEADER does not include a language prefix).

* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_ONCE)
(_AC_HEADERS_EXPANSION):
* NEWS: Mention it.

Signed-off-by: Eric Blake <eblake@redhat.com>
NEWS
lib/autoconf/headers.m4