qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] configure: don't warn GTK if disabled


From: Daniel P . Berrangé
Subject: Re: [Qemu-devel] [PATCH] configure: don't warn GTK if disabled
Date: Mon, 9 Apr 2018 09:31:54 +0100
User-agent: Mutt/1.9.2 (2017-12-15)

On Mon, Apr 09, 2018 at 04:23:23PM +0800, Peter Xu wrote:
> We don't need to detect GTK ABI if GTK is disabled in general.
> Otherwise we could get this warning (when host is installed with GTK ABI
> version 2) even when configure with "--disable-gtk":
> 
>     WARNING: Use of GTK 2.0 is deprecated and will be removed in
>     WARNING: future releases. Please switch to using GTK 3.0
> 
> CC: Paolo Bonzini <address@hidden>
> CC: Gerd Hoffmann <address@hidden>
> CC: Peter Maydell <address@hidden>
> CC: Fam Zheng <address@hidden>
> CC: "Philippe Mathieu-Daudé" <address@hidden>
> Signed-off-by: Peter Xu <address@hidden>
> ---
>  configure | 23 +++++++++++------------
>  1 file changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/configure b/configure
> index 4d0e92c96c..ce67ad050e 100755
> --- a/configure
> +++ b/configure
> @@ -2537,19 +2537,18 @@ fi
>  ##########################################
>  # GTK probe
>  
> -if test "$gtkabi" = ""; then
> -    # The GTK ABI was not specified explicitly, so try whether 3.0 is 
> available.
> -    # Use 2.0 as a fallback if that is available.
> -    if $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then
> -        gtkabi=3.0
> -    elif $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then
> -        gtkabi=2.0
> -    else
> -        gtkabi=3.0
> -    fi
> -fi
> -
>  if test "$gtk" != "no"; then
> +    if test "$gtkabi" = ""; then
> +        # The GTK ABI was not specified explicitly, so try whether 3.0 is 
> available.
> +        # Use 2.0 as a fallback if that is available.
> +        if $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then
> +            gtkabi=3.0
> +        elif $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then
> +            gtkabi=2.0
> +        else
> +            gtkabi=3.0
> +        fi
> +    fi

Feels to me that since we've deprecated 2.0, we could just *never* auto
detect - just do     test -z "$gtkabi" && gtkabi=3.0

Anyone who wants gtk2 should have to use an explicit --with-gtkabi=2.0

>      gtkpackage="gtk+-$gtkabi"
>      gtkx11package="gtk+-x11-$gtkabi"
>      if test "$gtkabi" = "3.0" ; then


BTW, this same problem you're fixing exists for SDL too I expect

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

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