aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-03 17:37:21 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-03 17:37:21 +0000
commit5368a4228ff5dd5ec95d0416f23bcfc9e556f37b (patch)
treeaf903aa7fefee375f864d08b603c2ed5fea77b75 /configure
parent71d0770c4cec9f1dc04f4dadcbf7fd6c335030a9 (diff)
Fix SDL on evdev hosts (Anthony Liguori)
This patch corrects SDL support on X11 hosts using evdev. It's losely based on the previous patch by Dustin Kirkland and the evdev support code in gtk-vnc written by Daniel Berrange. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6678 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index 62925d895d..faacb8de09 100755
--- a/configure
+++ b/configure
@@ -187,6 +187,7 @@ kerneldir=""
aix="no"
blobs="yes"
fdt="yes"
+sdl_x11="no"
# OS specific
if check_define __linux__ ; then
@@ -805,6 +806,21 @@ else
fi
fi # -z $sdl
+if test "$sdl" = "yes" ; then
+cat > $TMPC <<EOF
+#include <SDL.h>
+#if defined(SDL_VIDEO_DRIVER_X11)
+#include <X11/XKBlib.h>
+#else
+#error No x11 support
+#endif
+int main(void) { return 0; }
+EOF
+ if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` > /dev/null 2>&1 ; then
+ sdl_x11="yes"
+ fi
+fi
+
##########################################
# VNC TLS detection
if test "$vnc_tls" = "yes" ; then
@@ -1393,6 +1409,8 @@ if test "$sdl1" = "yes" ; then
echo "CONFIG_SDL=yes" >> $config_mak
if test "$target_softmmu" = "no" -o "$static" = "yes"; then
echo "SDL_LIBS=$sdl_static_libs" >> $config_mak
+ elif test "$sdl_x11" = "yes" ; then
+ echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_mak
else
echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
fi