autoconf: prefer an unrolled loop for trivial AC_CHECK_HEADERS
An unrolled loop avoids the cost of spawning sed in AS_TR_SH and
AS_TR_CPP. Prefer it if there is nothing in the second and third
argument of AC_CHECK_HEADERS and the first argument is a literal.
* lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Unroll loop if safe.
(_AC_CHECK_HEADERS): Move basic implementation here.
(AC_CHECK_INCLUDES_DEFAULT): Remove unnecessary arguments after the first.
Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Message-Id: <
1477933688-4884-3-git-send-email-bonzini@gnu.org>
[eblake: perform AC_CHECK_HEADERS_ONCE changes separately, use
dnl to reduce generated blank lines]
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>