autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/12] use a shell function for AC_CHECK_HEADER


From: Eric Blake
Subject: Re: [PATCH 07/12] use a shell function for AC_CHECK_HEADER
Date: Mon, 27 Oct 2008 14:04:17 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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(address@hidden:@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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]