[Spice-devel] [common 01/11] build-sys: Add the SPICE_WARNING() and SPICE_PRINT_MESSAGES m4 macros

Christophe Fergeau cfergeau at redhat.com
Mon Nov 16 07:40:25 PST 2015


Hey,

Sorry, I was away last week, I've pushed the 3 spice-common patches
(patches 1/3 2/3 3/3) and the remaining spice-server patch (10/11 or
11/11, forgot the exact number, the other one was already pushed).

Christophe

On Tue, Nov 03, 2015 at 01:05:28PM +0100, Francois Gouget wrote:
> A call to SPICE_WARNING() anywhere in the configure file results in the
> warning being printed at the end of the configure run where it will be
> be visible. This makes it possible to keep the SPICE_WARNING() calls
> together with the related feature checks instead of having to put a
> separate AC_MSG_WARN() call near the end.
> 
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
>  m4/spice-deps.m4 | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> For reference, see also:
> http://lists.freedesktop.org/archives/spice-devel/2015-November/023009.html
> 
> diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
> index 0f90cec..57d5b78 100644
> --- a/m4/spice-deps.m4
> +++ b/m4/spice-deps.m4
> @@ -1,3 +1,24 @@
> +# For autoconf < 2.63
> +m4_ifndef([AS_VAR_APPEND],
> +          AC_DEFUN([AS_VAR_APPEND], $1=$$1$2))
> +
> +# SPICE_WARNING(warning)
> +# SPICE_PRINT_MESSAGES
> +# ----------------------
> +# Collect warnings and print them at the end so they are clearly visible.
> +# ---------------------
> +AC_DEFUN([SPICE_WARNING],AS_VAR_APPEND([spice_warnings],["|$1"]))
> +AC_DEFUN([SPICE_PRINT_MESSAGES],[
> +    ac_save_IFS="$IFS"
> +    IFS="|"
> +    for msg in $spice_warnings; do
> +        IFS="$ac_save_IFS"
> +        AS_VAR_IF([msg],[],,[AC_MSG_WARN([$msg]); echo >&2])
> +    done
> +    IFS="$ac_save_IFS"
> +])
> +
> +
>  # SPICE_CHECK_SYSDEPS()
>  # ---------------------
>  # Checks for header files and library functions needed by spice-common.
> -- 
> 2.6.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151116/20ebae0e/attachment.sig>


More information about the Spice-devel mailing list