diff options
author | Dave Airlie <airlied@redhat.com> | 2013-12-10 14:05:51 +1000 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-03-05 09:52:05 +0100 |
commit | 47c03744b37c72b8f633b03380d5a323615b9ac4 (patch) | |
tree | b621cf997e504e4fff6a0d5221884bdd793a4e86 /configure | |
parent | 6f90f3d786ec1ddae31535bb4be4a1120fd5dfe0 (diff) | |
download | qemu-47c03744b37c72b8f633b03380d5a323615b9ac4.zip qemu-47c03744b37c72b8f633b03380d5a323615b9ac4.tar.gz qemu-47c03744b37c72b8f633b03380d5a323615b9ac4.tar.bz2 |
ui/sdl2 : initial port to SDL 2.0 (v2.0)
I've ported the SDL1.2 code over, and rewritten it to use the SDL2 interface.
The biggest changes were in the input handling, where SDL2 has done a major
overhaul, and I've had to include a generated translation file to get from
SDL2 codes back to qemu compatible ones. I'm still not sure how the keyboard
layout code works in qemu, so there may be further work if someone can point
me a test case that works with SDL1.2 and doesn't with SDL2.
Some SDL env vars we used to set are no longer used by SDL2,
Windows, OSX support is untested,
I don't think we can link to SDL1.2 and SDL2 at the same time, so I felt
using --with-sdlabi=2.0 to select the new code should be fine, like how
gtk does it.
v1.1: fix keys in text console
v1.2: fix shutdown, cleanups a bit of code, support ARGB cursor
v2.0: merge the SDL multihead patch into this, g_new the number of consoles
needed, wrap DCL inside per-console structure.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Fixes & improvements by kraxel:
* baum build fix
* remove text console logic
* adapt to new input core
* codestyle fixups
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -207,6 +207,7 @@ fdt="" netmap="no" pixman="" sdl="" +sdlabi="1.2" virtfs="" vnc="yes" sparse="no" @@ -366,6 +367,7 @@ query_pkg_config() { } pkg_config=query_pkg_config sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}" +sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}" # If the user hasn't specified ARFLAGS, default to 'rv', just as make does. ARFLAGS="${ARFLAGS-rv}" @@ -775,6 +777,8 @@ for opt do ;; --enable-sdl) sdl="yes" ;; + --with-sdlabi=*) sdlabi="$optarg" + ;; --disable-qom-cast-debug) qom_cast_debug="no" ;; --enable-qom-cast-debug) qom_cast_debug="yes" @@ -1196,6 +1200,7 @@ Advanced options (experts only): --disable-werror disable compilation abort on warning --disable-sdl disable SDL --enable-sdl enable SDL + --with-sdlabi select preferred SDL ABI 1.2 or 2.0 --disable-gtk disable gtk UI --enable-gtk enable gtk UI --disable-virtfs disable VirtFS @@ -1955,12 +1960,22 @@ 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 "`basename $sdl_config`" != sdl-config && ! has ${sdl_config}; then - sdl_config=sdl-config + +if test $sdlabi = "2.0"; then + sdl_config=$sdl2_config + sdlname=sdl2 + sdlconfigname=sdl2_config +else + sdlname=sdl + sdlconfigname=sdl_config +fi + +if test "`basename $sdl_config`" != $sdlconfigname && ! has ${sdl_config}; then + sdl_config=$sdlconfigname fi -if $pkg_config sdl --exists; then - sdlconfig="$pkg_config sdl" +if $pkg_config $sdlname --exists; then + sdlconfig="$pkg_config $sdlname" _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'` elif has ${sdl_config}; then sdlconfig="$sdl_config" |