All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Fam Zheng" <famz@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] configure: don't warn GTK if disabled
Date: Mon, 9 Apr 2018 09:31:54 +0100	[thread overview]
Message-ID: <20180409083154.GD18283@redhat.com> (raw)
In-Reply-To: <20180409082323.29575-1-peterx@redhat.com>

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 <pbonzini@redhat.com>
> CC: Gerd Hoffmann <kraxel@redhat.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: Fam Zheng <famz@redhat.com>
> CC: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  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	other threads:[~2018-04-09  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09  8:23 [Qemu-devel] [PATCH] configure: don't warn GTK if disabled Peter Xu
2018-04-09  8:31 ` Daniel P. Berrangé [this message]
2018-04-09  9:24   ` Peter Maydell
2018-04-09 17:37     ` Paolo Bonzini
2018-04-10  5:13       ` Peter Xu
2018-04-10  8:48 ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180409083154.GD18283@redhat.com \
    --to=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.