From patchwork Fri Aug 14 15:10:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 507464 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8B59C1401DE for ; Sat, 15 Aug 2015 01:19:57 +1000 (AEST) Received: from localhost ([::1]:46853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQGlv-0001xp-G4 for incoming@patchwork.ozlabs.org; Fri, 14 Aug 2015 11:19:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQGdE-0002Ln-Vw for qemu-devel@nongnu.org; Fri, 14 Aug 2015 11:10:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQGdE-0005FA-1g for qemu-devel@nongnu.org; Fri, 14 Aug 2015 11:10:56 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQGdD-0005F6-9h for qemu-devel@nongnu.org; Fri, 14 Aug 2015 11:10:55 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZQGdA-0000uE-NA; Fri, 14 Aug 2015 16:10:52 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 14 Aug 2015 16:10:52 +0100 Message-Id: <1439565052-3457-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Programmingkid , =?UTF-8?q?Andreas=20F=C3=A4rber?= , patches@linaro.org Subject: [Qemu-devel] [PATCH] configure: Don't permit SDL or GTK on OSX X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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: Peter Maydell Reviewed-by: Daniel P. berrange Reviewed-by: John Arbuckle --- In an ideal world, we'd fix the Cocoa UI front end to play nicely with others, but in the meantime, let's at least give a helpful message to users if they try to select combinations of configure options that won't work. configure | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/configure b/configure index cd219d8..826858e 100755 --- a/configure +++ b/configure @@ -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" @@ -1711,6 +1710,21 @@ else 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 cat > $TMPC <