[Spice-devel] [PATCH spice 2/2] build-sys: Require GLIB 2.28

Frediano Ziglio fziglio at redhat.com
Mon Dec 5 12:35:33 UTC 2016


> 
> We are already using it.
> 
> Also add support for generating deprecation warnings for the usage
> of possibly unavailable functions.
> ---
>  configure.ac | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 4fa4c836..af271e46 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -148,11 +148,15 @@ SPICE_PROTOCOL_MIN_VER=0.12.12
>  PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >=
>  $SPICE_PROTOCOL_MIN_VER])
>  AC_SUBST([SPICE_PROTOCOL_MIN_VER])
>  
> -PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.22 gio-2.0 >= 2.22])
> -AS_VAR_APPEND([SPICE_REQUIRES], [" glib-2.0 >= 2.22 gio-2.0 >= 2.22"])
> -
> -PKG_CHECK_MODULES([GOBJECT2], [gobject-2.0 >= 2.22])
> -AS_VAR_APPEND([SPICE_REQUIRES], [" gobject-2.0 >= 2.22"])
> +GLIB2_REQUIRED="2.28"
> +GLIB2_ENCODED_VERSION="GLIB_VERSION_2_28"
> +PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= $GLIB2_REQUIRED gio-2.0 >=
> $GLIB2_REQUIRED])
> +GLIB2_CFLAGS="$GLIB2_CFLAGS
> -DGLIB_VERSION_MIN_REQUIRED=$GLIB2_ENCODED_VERSION \
> +  -DGLIB_VERSION_MAX_ALLOWED=$GLIB2_ENCODED_VERSION"
> +AS_VAR_APPEND([SPICE_REQUIRES], [" glib-2.0 >= $GLIB2_REQUIRED gio-2.0 >=
> $GLIB2_REQUIRED"])
> +
> +PKG_CHECK_MODULES([GOBJECT2], [gobject-2.0 >= $GLIB2_REQUIRED])
> +AS_VAR_APPEND([SPICE_REQUIRES], [" gobject-2.0 >= $GLIB2_REQUIRED"])
>  
>  PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
>  AC_SUBST(PIXMAN_CFLAGS)

I can confirm this works also with RHEL 6.

Reviewed-by: Frediano Ziglio <fziglio at redhat.com>

Frediano


More information about the Spice-devel mailing list