Paolo Bonzini <bonzini <at> gnu.org> writes: > These six patches include all the tricks learnt from patches 1-6, > including splitting the function body outside the main macro, and > passing the cache variable name to the macro itself.
Yep, looking nicer. > * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_OLD, > _AC_CHECK_HEADER_NEW): Use a shell function. OK to apply, once you fix these nits: > m4_define([_AC_CHECK_HEADER_NEW], ... > -m4_define([_AC_CHECK_HEADER_OLD], > +AC_DEFUN([_AC_CHECK_HEADER_OLD], Let's go for some consistency here. In comparison with the previous patches, you've been converting everything to AC_DEFUN, so let's do the same for _AC_CHECK_HEADER_NEW. > [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl > -AC_CACHE_CHECK([for $1], [ac_Header], > - [AC_PREPROC_IFELSE([AC_LANG_SOURCE([EMAIL PROTECTED]:@include > <$1>])], > - [AS_VAR_SET([ac_Header], [yes])], > - [AS_VAR_SET([ac_Header], [no])])]) > +ac_func_[]_AC_LANG_ABBREV[]_check_header_old "$LINENO" "$1" "ac_Header" You can avoid a dnl in the macro body by: [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl [ac_func_[]_AC_LANG_ABBREV[]_check_header_old "$LINENO" "$1" "ac_Header" -- Eric Blake
