summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2014-05-17 16:29:18 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2014-05-24 00:07:29 +0400
commit9e04c683fca3da265b1d4f80e1c9cf31bd4f6606 (patch)
treea6fc251dbdf428ec6d6c31c59a406d0444baefcd /configure
parent5672ee54d5b52b838e4e6b9976e757f28a68c4ec (diff)
downloadhqemu-9e04c683fca3da265b1d4f80e1c9cf31bd4f6606.zip
hqemu-9e04c683fca3da265b1d4f80e1c9cf31bd4f6606.tar.gz
configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailable
The configure option --with-gtkabi=3.0 is still supported, but no longer needed when GTK+-2.0 is missing. When no GTK+ ABI is selected by the user, configure first tries 2.0, then 3.0. For some platforms (e.g. Windows) newer binaries of GTK+ are only available for GTK+ 3.0. Now building on these platforms is a little bit easier. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 19 insertions, 3 deletions
diff --git a/configure b/configure
index 605a0ec..678a106 100755
--- a/configure
+++ b/configure
@@ -317,7 +317,7 @@ glusterfs_discard="no"
glusterfs_zerofill="no"
virtio_blk_data_plane=""
gtk=""
-gtkabi="2.0"
+gtkabi=""
vte=""
tpm="no"
libssh2=""
@@ -1970,6 +1970,18 @@ fi
##########################################
# GTK probe
+if test "$gtkabi" = ""; then
+ # The GTK ABI was not specified explicitly, so try whether 2.0 is available.
+ # Use 3.0 as a fallback if that is available.
+ if $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then
+ gtkabi=2.0
+ elif $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then
+ gtkabi=3.0
+ else
+ gtkabi=2.0
+ fi
+fi
+
if test "$gtk" != "no"; then
gtkpackage="gtk+-$gtkabi"
if test "$gtkabi" = "3.0" ; then
@@ -1983,7 +1995,7 @@ if test "$gtk" != "no"; then
libs_softmmu="$gtk_libs $libs_softmmu"
gtk="yes"
elif test "$gtk" = "yes"; then
- feature_not_found "gtk" "Install gtk2 or gtk3 (requires --with-gtkabi=3.0 option to configure) devel"
+ feature_not_found "gtk" "Install gtk2 or gtk3 devel"
else
gtk="no"
fi
@@ -2006,7 +2018,11 @@ if test "$vte" != "no"; then
libs_softmmu="$vte_libs $libs_softmmu"
vte="yes"
elif test "$vte" = "yes"; then
- feature_not_found "vte" "Install libvte or libvte-2.90 (requires --with-gtkabi=3.0 option to configure) devel"
+ if test "$gtkabi" = "3.0"; then
+ feature_not_found "vte" "Install libvte-2.90 devel"
+ else
+ feature_not_found "vte" "Install libvte devel"
+ fi
else
vte="no"
fi
OpenPOWER on IntegriCloud