autoconf: prefer an unrolled loop for trivial AC_CHECK_FUNCS
commitc54beb85aa855ce2c817d4f7738748841bf6ad30
authorPaolo Bonzini <bonzini@gnu.org>
Fri, 4 Nov 2016 01:08:28 +0000 (3 20:08 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 21 Dec 2016 14:32:45 +0000 (21 08:32 -0600)
tree2f4938650c3ecf51bc9c0863af095b85f1729def
parent0848232967ea70448d3767f22ff2f7d359e67580
autoconf: prefer an unrolled loop for trivial AC_CHECK_FUNCS

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_FUNCS and the first argument is a literal.

* lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Unroll loop if safe.
(_AC_CHECK_FUNCS): Move basic implementation here.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Message-Id: <1477933688-4884-2-git-send-email-bonzini@gnu.org>
[eblake: perform AC_CHECK_FUNCS_ONCE changes separately, use
dnl to reduce generated blank lines]
Signed-off-by: Eric Blake <eblake@redhat.com>
lib/autoconf/functions.m4