diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-04-10 14:04:27 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-04-10 14:04:27 +0100 |
commit | df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8 (patch) | |
tree | c2b5757d53b6c108d5974501101ec8c7085fd00f /configure | |
parent | daf6b59be8c703264765a533bc63421caef95225 (diff) | |
parent | c6093a05d6a84d2144bb6462cf20e907eddf8aeb (diff) | |
download | qemu-df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8.zip qemu-df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8.tar.gz qemu-df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8.tar.bz2 |
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180410-pull-request' into staging
configure: don't warn on old sdl/gtk versions if disabled.
keymap + gtk fixes.
# gpg: Signature made Tue 10 Apr 2018 10:23:37 BST
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/ui-20180410-pull-request:
configure: don't warn SDL abi if disabled
configure: don't warn GTK if disabled
gtk: drop pointless code from gd_window_close
ui: fix keymap detection under Xwayland
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 106 |
1 files changed, 56 insertions, 50 deletions
@@ -2540,19 +2540,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 gtkpackage="gtk+-$gtkabi" gtkx11package="gtk+-x11-$gtkabi" if test "$gtkabi" = "3.0" ; then @@ -2836,49 +2835,52 @@ fi # Look for sdl configuration program (pkg-config or sdl-config). Try # sdl-config even without cross prefix, and favour pkg-config over sdl-config. -if test "$sdlabi" = ""; then - if $pkg_config --exists "sdl2"; then - sdlabi=2.0 - elif $pkg_config --exists "sdl"; then - sdlabi=1.2 - else - sdlabi=2.0 - fi -fi +sdl_probe () +{ + sdl_too_old=no + if test "$sdlabi" = ""; then + if $pkg_config --exists "sdl2"; then + sdlabi=2.0 + elif $pkg_config --exists "sdl"; then + sdlabi=1.2 + else + sdlabi=2.0 + fi + fi -if test $sdlabi = "2.0"; then - sdl_config=$sdl2_config - sdlname=sdl2 - sdlconfigname=sdl2_config -elif test $sdlabi = "1.2"; then - sdlname=sdl - sdlconfigname=sdl_config -else - error_exit "Unknown sdlabi $sdlabi, must be 1.2 or 2.0" -fi + if test $sdlabi = "2.0"; then + sdl_config=$sdl2_config + sdlname=sdl2 + sdlconfigname=sdl2_config + elif test $sdlabi = "1.2"; then + sdlname=sdl + sdlconfigname=sdl_config + else + error_exit "Unknown sdlabi $sdlabi, must be 1.2 or 2.0" + fi -if test "$(basename $sdl_config)" != $sdlconfigname && ! has ${sdl_config}; then - sdl_config=$sdlconfigname -fi + if test "$(basename $sdl_config)" != $sdlconfigname && ! has ${sdl_config}; then + sdl_config=$sdlconfigname + fi -if $pkg_config $sdlname --exists; then - sdlconfig="$pkg_config $sdlname" - sdlversion=$($sdlconfig --modversion 2>/dev/null) -elif has ${sdl_config}; then - sdlconfig="$sdl_config" - sdlversion=$($sdlconfig --version) -else - if test "$sdl" = "yes" ; then - feature_not_found "sdl" "Install SDL2-devel" + if $pkg_config $sdlname --exists; then + sdlconfig="$pkg_config $sdlname" + sdlversion=$($sdlconfig --modversion 2>/dev/null) + elif has ${sdl_config}; then + sdlconfig="$sdl_config" + sdlversion=$($sdlconfig --version) + else + if test "$sdl" = "yes" ; then + feature_not_found "sdl" "Install SDL2-devel" + fi + sdl=no + # no need to do the rest + return + fi + if test -n "$cross_prefix" && test "$(basename "$sdlconfig")" = sdl-config; then + echo warning: using "\"$sdlconfig\"" to detect cross-compiled sdl >&2 fi - sdl=no -fi -if test -n "$cross_prefix" && test "$(basename "$sdlconfig")" = sdl-config; then - echo warning: using "\"$sdlconfig\"" to detect cross-compiled sdl >&2 -fi -sdl_too_old=no -if test "$sdl" != "no" ; then cat > $TMPC << EOF #include <SDL.h> #undef main /* We don't want SDL to override our main() */ @@ -2920,6 +2922,10 @@ EOF fi sdl=no fi # sdl compile test +} + +if test "$sdl" != "no" ; then + sdl_probe fi if test "$sdl" = "yes" ; then |