mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-06 10:25:53 +08:00
Speed up AC_CHECK_TYPE.
* lib/autoconf/types.m4 (AC_CHECK_TYPE): Factor out $@, and avoid regex when enough arguments are present. Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
parent
359be416a7
commit
3d6b5007ca
@ -1,3 +1,9 @@
|
||||
2008-11-06 Eric Blake <ebb9@byu.net>
|
||||
|
||||
Speed up AC_CHECK_TYPE.
|
||||
* lib/autoconf/types.m4 (AC_CHECK_TYPE): Factor out $@, and avoid
|
||||
regex when enough arguments are present.
|
||||
|
||||
2008-11-06 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
Remove three forks per _AC_RUN_LOG_STDERR in the common case.
|
||||
|
@ -248,17 +248,16 @@ m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
|
||||
# 3. $2 seems to be a type => NEW plus a warning
|
||||
# 4. default => NEW
|
||||
AC_DEFUN([AC_CHECK_TYPE],
|
||||
[m4_if($#, 3,
|
||||
[_AC_CHECK_TYPE_NEW($@)],
|
||||
$#, 4,
|
||||
[_AC_CHECK_TYPE_NEW($@)],
|
||||
_AC_CHECK_TYPE_REPLACEMENT_TYPE_P([$2]), 1,
|
||||
[_AC_CHECK_TYPE_OLD($@)],
|
||||
_AC_CHECK_TYPE_MAYBE_TYPE_P([$2]), 1,
|
||||
[AC_DIAGNOSE([syntax],
|
||||
[$0: assuming `$2' is not a type])_AC_CHECK_TYPE_NEW($@)],
|
||||
[_AC_CHECK_TYPE_NEW($@)])[]dnl
|
||||
])# AC_CHECK_TYPE
|
||||
[m4_cond([$#], [3],
|
||||
[_AC_CHECK_TYPE_NEW],
|
||||
[$#], [4],
|
||||
[_AC_CHECK_TYPE_NEW],
|
||||
[_AC_CHECK_TYPE_REPLACEMENT_TYPE_P([$2])], [1],
|
||||
[_AC_CHECK_TYPE_OLD],
|
||||
[_AC_CHECK_TYPE_MAYBE_TYPE_P([$2])], [1],
|
||||
[AC_DIAGNOSE([syntax],
|
||||
[$0: assuming `$2' is not a type])_AC_CHECK_TYPE_NEW],
|
||||
[_AC_CHECK_TYPE_NEW])($@)])# AC_CHECK_TYPE
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user