From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrQBp-0006Rw-7G for qemu-devel@nongnu.org; Mon, 02 Jun 2014 07:14:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrQBl-0005L8-Ay for qemu-devel@nongnu.org; Mon, 02 Jun 2014 07:14:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrQBl-0005Ku-0y for qemu-devel@nongnu.org; Mon, 02 Jun 2014 07:14:01 -0400 Date: Mon, 2 Jun 2014 12:13:53 +0100 From: "Daniel P. Berrange" Message-ID: <20140602111353.GE28039@redhat.com> References: <1401706713-24909-1-git-send-email-kraxel@redhat.com> <20140602111044.GD28039@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20140602111044.GD28039@redhat.com> Subject: Re: [Qemu-devel] [PATCH] gtk: cleanup backend dependencies Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, Anthony Liguori , Richard Henderson On Mon, Jun 02, 2014 at 12:10:44PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 02, 2014 at 12:58:33PM +0200, Gerd Hoffmann wrote: > > diff --git a/configure b/configure > > index 0e516f9..b02f822 100755 > > --- a/configure > > +++ b/configure > > @@ -1986,6 +1986,8 @@ fi > > > > if test "$gtk" != "no"; then > > gtkpackage="gtk+-$gtkabi" > > + gtkx11package="gtk+-x11-$gtkabi" > > + gtkwin32package="gtk+-win32-$gtkabi" > > if test "$gtkabi" = "3.0" ; then > > gtkversion="3.0.0" > > else > > @@ -1996,6 +1998,13 @@ if test "$gtk" != "no"; then > > gtk_libs=`$pkg_config --libs $gtkpackage` > > libs_softmmu="$gtk_libs $libs_softmmu" > > gtk="yes" > > + if $pkg_config --exists "$gtkx11package >= $gtkversion"; then > > + gtkx11="yes" > > + gtk_libs="$gtk_libs -lX11" > > + fi > > + if $pkg_config --exists "$gtkwin32package >= $gtkversion"; then > > + gtkwin32="yes" > > + fi > > elif test "$gtk" = "yes"; then > > feature_not_found "gtk" "Install gtk2 or gtk3 devel" > > else > > @@ -4459,6 +4468,12 @@ if test "$gtk" = "yes" ; then > > echo "CONFIG_GTKABI=$gtkabi" >> $config_host_mak > > echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak > > fi > > +if test "$gtkx11" = "yes" ; then > > + echo "CONFIG_GTK_X11=y" >> $config_host_mak > > +fi > > +if test "$gtkwin32" = "yes" ; then > > + echo "CONFIG_GTK_WIN32=y" >> $config_host_mak > > +fi > > if test "$vte" = "yes" ; then > > echo "CONFIG_VTE=y" >> $config_host_mak > > echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak > > None of this configure time detection is needed, as GTK already > defines macros in its header which let you check this eg you can > just do Correction - the setting of CONFIG_GTK_* stuff is not needed, the addition of '-lX11' is still needed. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|