]> git.ipfire.org Git - thirdparty/autoconf.git/commit
AC_CHECK_HEADERS_ONCE: hoist CPP name computation to m4 time
authorEric Blake <eblake@redhat.com>
Wed, 21 Dec 2016 14:32:39 +0000 (08:32 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 21 Dec 2016 14:32:39 +0000 (08:32 -0600)
commit76183791a41bf8777cbce94e1b899529dc98e124
treef037f467d987e5ce02dca9d1e09145e9227a166a
parent73770787510fc18ec3dde2ccf3281977ea6b750b
AC_CHECK_HEADERS_ONCE: hoist CPP name computation to m4 time

Rather than perform a sed script on each element of the
$ac_header_c_list to compute the corresponding CPP name, we can
make the list store a series of triples of header names, shell-safe
names, and CPP names all computed at m4 time.

The resulting configure script is slightly larger based on
how many headers are checked once, but also performs
slightly faster.

There is still a sed call in AC_CHECK_HEADER for computing the
cache variable name; that will be dealt with next.  That patch
will also be the one that takes advantage of the shell-safe name.

* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_ONCE): Track the shell
and CPP name in the list...
(_AC_HEADERS_EXPANSION): ...and rewrite the list walk to parse off
triples of arguments, for fewer sed calls.

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