autoconf: prefer an unrolled loop for trivial AC_CHECK_HEADERS
commit0e2eecedb12dd472c9a008748be6edd6ea68fa0e
authorPaolo Bonzini <bonzini@gnu.org>
Mon, 31 Oct 2016 17:08:07 +0000 (31 18:08 +0100)
committerEric Blake <eblake@redhat.com>
Wed, 21 Dec 2016 14:32:45 +0000 (21 08:32 -0600)
tree13be775a0fb6f6e778f5d7658a00da8fdccc89ec
parentc54beb85aa855ce2c817d4f7738748841bf6ad30
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>
lib/autoconf/headers.m4