Commit a30878e7 authored by Peter Maydell's avatar Peter Maydell
Browse files

configure: Don't permit SDL or GTK on OSX



The cocoa GUI frontend assumes it is the only GUI (it redefines
main() so it always gets control before the rest of QEMU), so
it does not play well with other UIs like SDL or GTK. (Mostly
people building QEMU on OSX don't have the necessary dependencies
available for configure to build those other front ends, so
mostly this problem goes unnoticed.)

Make configure automatically disable the SDL and GTK front ends
if the cocoa front end is enabled. (We were sort of attempting
to do this for SDL before, but not in a way that worked very well.)

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: default avatarDaniel P. Berrange <berrange@redhat.com>
Reviewed-by: default avatarJohn Arbuckle <programmingkidx@gmail.com>
Message-id: 1439565052-3457-1-git-send-email-peter.maydell@linaro.org
parent 20fbcfdd
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -956,7 +956,6 @@ for opt do
  ;;
  --enable-cocoa)
      cocoa="yes" ;
      sdl="no" ;
      audio_drv_list="coreaudio `echo $audio_drv_list | sed s,coreaudio,,g`"
  ;;
  --disable-system) softmmu="no"
@@ -1710,6 +1709,21 @@ else
    echo big/little test failed
fi

##########################################
# cocoa implies not SDL or GTK
# (the cocoa UI code currently assumes it is always the active UI
# and doesn't interact well with other UI frontend code)
if test "$cocoa" = "yes"; then
    if test "$sdl" = "yes"; then
        error_exit "Cocoa and SDL UIs cannot both be enabled at once"
    fi
    if test "$gtk" = "yes"; then
        error_exit "Cocoa and GTK UIs cannot both be enabled at once"
    fi
    gtk=no
    sdl=no
fi

##########################################
# L2TPV3 probe

@@ -2287,10 +2301,8 @@ EOF
    if test "$_sdlversion" -lt 121 ; then
      sdl_too_old=yes
    else
      if test "$cocoa" = "no" ; then
      sdl=yes
    fi
    fi

    # static link with sdl ? (note: sdl.pc's --static --libs is broken)
    if test "$sdl" = "yes" -a "$static" = "yes" ; then