From nobody Tue Feb 10 09:40:43 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610474734; cv=none; d=zohomail.com; s=zohoarc; b=McWDw5At5VD7K/MYFRjkJw7sPAvuyh9omwu/dKbRkdVPmgEG+wvbRN9qpFXRYSreurcTFq6Q9iRZ0CLVMGIdhm8JcaQrQ/nuav1HFpDOgVRZw0yPc+2BF6WIsaAxdXcuVrkRWmLPCsYz4EnSS6EDjT6t39mvwRFXeVTJvHF8Deg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610474734; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eZaTIQlxze6jxuscVM9IFMWchHxN6YoRJgbnAqKImvc=; b=bbiF9pjfMntND6iKQpmISXzeEJgplzEt9wKVNEVNwsEPIrvi6BmuQjv3aSf09sG5ngL/ehHL32ybwbDUWrwQzZ1+aarjAklduKjjR45OPvGa7X03SCsIHlAHKx2tPsvPPmw8KvBuh2TbjEDWAqdDM43vF6dWHN9A+CYiz6SaOQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1610474734724153.88635700708687; Tue, 12 Jan 2021 10:05:34 -0800 (PST) Received: from localhost ([::1]:50824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzO2v-0005xV-6r for importer@patchew.org; Tue, 12 Jan 2021 13:05:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzNGB-0003lB-Of for qemu-devel@nongnu.org; Tue, 12 Jan 2021 12:15:12 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:45884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzNG9-0004wd-E2 for qemu-devel@nongnu.org; Tue, 12 Jan 2021 12:15:11 -0500 Received: by mail-ej1-x62b.google.com with SMTP id e18so3129982ejt.12 for ; Tue, 12 Jan 2021 09:15:08 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id k22sm397302edv.33.2021.01.12.09.15.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 09:15:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eZaTIQlxze6jxuscVM9IFMWchHxN6YoRJgbnAqKImvc=; b=mSyeEFWc0KZhIDDK5j71ebjTKl1MPiun6suydOHLLrBfYpcxCgTBbeFm5AV+7AcYQS z3yLQi93SRGNaa3rg8mmp+kRSc0wsDiQ6S/5/hrZRXRCB/1yrkAiYlx/iu5iHKTNbdgk IR6mBk4/fonIg8AJlsMlDQUUuTJRJzPY7YT8WoyMyEdjfXinblPzxRpd/cnICxYowCgP L1JxjC93x8eSsrhFa/SML/2qpM9Hi4bQLB3vfqHEzeWjviVhhFdLJ9bR0wC83npK5Pcr eHSDuKj0VRlv54lJabMdsvjutVasl2QmAuLNdwEaACEHCV9r1sovlHoxdG0HkWksTYl7 APwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=eZaTIQlxze6jxuscVM9IFMWchHxN6YoRJgbnAqKImvc=; b=cyw/hlmAbdfgWezN530XowujFIzB+RiNZ+wLBJz/Xysmx5iSfhZDmMbrMQQVV+Z3WO 4gqorUUU3eF7MYnl5ijDIivoHLAxxYXRhtXn80511EfWdcSha4mdTyizpPpmAyrnzG+/ uUxoq4VPKKVi4tybB/IVTFZUZH5d2eY93qFxIQpgCFHeyktg2XtoS7sjk6P8rWzpE1jm IbT+B67WaBNB137yi3d9Ej1ylw/j4dNTDSG3JU5ceoZ4pOG6H/PMu4ntnUEMIdFJdKEX M1BOLpiY2I0DwkEhNknGH3O03sg7QxbZ59IrL//J69yckLVryiwQHXSphF40NTTZemtt f5lQ== X-Gm-Message-State: AOAM532CH5EJ8JPUagXlSW/7aTHv6Jb1UMszRD7MbJA1pI66K42VMaRv qsSqdwo7S3L/khm5nqlnFTp97jFwIz1wBA== X-Google-Smtp-Source: ABdhPJz0y+8SgsutItxZUEIqaJblTSOpCzq2IGvnQ1nb28KoOrbOsS2CgE/Yj60+JrmhsGaaw+LXXQ== X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr3755050ejr.308.1610471708145; Tue, 12 Jan 2021 09:15:08 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 18/20] configure: move Cocoa incompatibility checks to Meson Date: Tue, 12 Jan 2021 18:14:48 +0100 Message-Id: <20210112171450.791427-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210112171450.791427-1-pbonzini@redhat.com> References: <20210112171450.791427-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The cocoa UI code currently assumes it is always the active UI and does not interact well with other UI frontend code. Move the relevant checks to Meson now that all other frontends have become Meson options. This way, SDL/GTK+/Cocoa can be parsed entirely by scripts/configure-parse-buildoptions.pl. Signed-off-by: Paolo Bonzini --- configure | 15 --------------- meson.build | 17 ++++++++++------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/configure b/configure index d70448f495..17aa595343 100755 --- a/configure +++ b/configure @@ -772,7 +772,6 @@ Darwin) QEMU_CFLAGS=3D"-arch x86_64 $QEMU_CFLAGS" QEMU_LDFLAGS=3D"-arch x86_64 $QEMU_LDFLAGS" fi - cocoa=3D"enabled" audio_drv_list=3D"coreaudio try-sdl" audio_possible_drivers=3D"coreaudio sdl" QEMU_LDFLAGS=3D"-framework CoreFoundation -framework IOKit $QEMU_LDFLAGS" @@ -2322,20 +2321,6 @@ if test -z "$want_tools"; then fi =20 ########################################## -# 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" =3D "enabled"; then - if test "$sdl" =3D "enabled"; then - error_exit "Cocoa and SDL UIs cannot both be enabled at once" - fi - if test "$gtk" =3D "enabled"; then - error_exit "Cocoa and GTK UIs cannot both be enabled at once" - fi - gtk=3Ddisabled - sdl=3Ddisabled -fi - # Some versions of Mac OS X incorrectly define SIZE_MAX cat > $TMPC << EOF #include diff --git a/meson.build b/meson.build index 73d3cc5385..1f12c43765 100644 --- a/meson.build +++ b/meson.build @@ -169,7 +169,6 @@ version_res =3D [] coref =3D [] iokit =3D [] emulator_link_args =3D [] -cocoa =3D not_found hvf =3D not_found if targetos =3D=3D 'windows' socket =3D cc.find_library('ws2_32') @@ -182,7 +181,6 @@ if targetos =3D=3D 'windows' elif targetos =3D=3D 'darwin' coref =3D dependency('appleframeworks', modules: 'CoreFoundation') iokit =3D dependency('appleframeworks', modules: 'IOKit') - cocoa =3D dependency('appleframeworks', modules: 'Cocoa', required: get_= option('cocoa')) elif targetos =3D=3D 'sunos' socket =3D [cc.find_library('socket'), cc.find_library('nsl'), @@ -256,9 +254,6 @@ if not have_xen_pci_passthrough and get_option('xen_pci= _passthrough').enabled() error('Xen PCI passthrough requested but Xen not enabled') endif endif -if not cocoa.found() and get_option('cocoa').enabled() - error('Cocoa not available on this platform') -endif =20 ################ # Dependencies # @@ -362,6 +357,14 @@ if not get_option('attr').disabled() endif endif =20 +cocoa =3D dependency('appleframeworks', modules: 'Cocoa', required: get_op= tion('cocoa')) +if cocoa.found() and get_option('sdl').enabled() + error('Cocoa and SDL cannot be enabled at the same time') +endif +if cocoa.found() and get_option('gtk').enabled() + error('Cocoa and GTK+ cannot be enabled at the same time') +endif + seccomp =3D not_found if not get_option('seccomp').auto() or have_system or have_tools seccomp =3D dependency('libseccomp', version: '>=3D2.3.0', @@ -647,7 +650,7 @@ if not get_option('brlapi').auto() or have_system endif =20 sdl =3D not_found -if have_system +if not get_option('sdl').auto() or (have_system and not cocoa.found()) sdl =3D dependency('sdl2', required: get_option('sdl'), static: enable_s= tatic) sdl_image =3D not_found endif @@ -779,7 +782,7 @@ endif =20 gtk =3D not_found gtkx11 =3D not_found -if not get_option('gtk').auto() or have_system +if not get_option('gtk').auto() or (have_system and not cocoa.found()) gtk =3D dependency('gtk+-3.0', version: '>=3D3.22.0', method: 'pkg-config', required: get_option('gtk'), --=20 2.29.2