From nobody Tue Feb 10 13:34:23 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=1623151501; cv=none; d=zohomail.com; s=zohoarc; b=Kryq01mgKzr2VzTSC00TRuHd3qqGAQwDKMVdty4TpoXiym3Z5RMK+KsjZD2K0AExRxSuW8h+EBO9k9gPG9690qbg0Eoyv5/XSp4KT6+RdE5BchHZWXYg5LRoxq1m6CfJYVpbWeqGb/83WgarusiOmTkizlILrG5V9IimV578cPU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623151501; 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=KPzZ7D1UtY+QeqXtKh3Tp3/QcBfmpOIZBp3Ec0jWE6s=; b=SZhwHkBd60vIcHCfqbXaBzLcCtIs+oxU/v0qN9hRB1mobxA54UCYwUFtLrm63WDiblc4Z7I9ttThQbczs5dfzV6+3GFngWpTjuo+E9uLKi/2NSBglQiT2E+cVjnMDsILNDhSSobaMtMcfKcGwKFYovE7Eoc8EM86qd+Apmx4PIw= 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 1623151501767223.26239369512916; Tue, 8 Jun 2021 04:25:01 -0700 (PDT) Received: from localhost ([::1]:34826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqZqu-0000wl-Nl for importer@patchew.org; Tue, 08 Jun 2021 07:25:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqZpD-0006Wj-8u for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:15 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:36778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqZpB-000800-AG for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:14 -0400 Received: by mail-wr1-x434.google.com with SMTP id e11so10954515wrg.3 for ; Tue, 08 Jun 2021 04:23:12 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id i9sm15388621wrn.54.2021.06.08.04.23.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 04:23:11 -0700 (PDT) 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=KPzZ7D1UtY+QeqXtKh3Tp3/QcBfmpOIZBp3Ec0jWE6s=; b=rBXdkHHwiB/bEJJ6HHt5QuWWQeYfTFEKerZKdi1KHLMqCf2aV1kZdB7IYpIFP2AMhv sQUc/+u8+wkePc+OLGzf5RRx5mdroEXV5SW420Rw/FJll7IXj7mRUjdBHUAm/GNNrHWD M+ZGfdn1e+tTymh18yfvkpjTa1SZ3flgHPNwEnwh2WM6OcTRjmt9qVvyRMaDK5pG8GgA 6gIA6z0MgfVIRR5dl02WCh8DOg3OP6Rm+51irRFh95j92FveoZ4YAx7ZRoR734jAwFJT Czg5tvJWzacegGvhQo++idptT23baQ2+a7qxTBEbsn3480FF+E7munqzLbOLGSK/KAcs og3g== 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=KPzZ7D1UtY+QeqXtKh3Tp3/QcBfmpOIZBp3Ec0jWE6s=; b=C7fFWHo/fMQHqYuVdHQGTpmLB+q+F/1QC3Edv7amEXpk5ZT9RHA2eUd+C9JROfFPnF waXoCzi2nMTpIOQacjN6gJV+S76wzudOcNsWJM0H/CoQe9JIPzOI69VXCM1Addt6A7ra JK6z4C9PoFeT2Lyb1VQoHJA6i5x0NmKL37NgyYkWIvbPOkBRPGDjkZPF9bQHFppgi2RT BHHqKDPzi41/syQS/sojXAXg4HRSEFBIlhMEc9GmvTRJ7m1lwgOSmheKWGgDySICq5Er BjeduaFklbPyVeGUh5z2HaIaGEagV++8ie3qxNUFSTLoJmNeFrOfrpsFL+lBK5GnMYBE 5r9Q== X-Gm-Message-State: AOAM533j78LQ/K2CuJYMMi6tvQw6ex4MEarJFwF8WuyZBGbBi1u/McY3 IvYcJzQsf7ehuFwddunlPTSo6+VN+DWv/g== X-Google-Smtp-Source: ABdhPJx44VprtCKaLIoK6QdMoAIkuOqbnd5uiGHaaAKQ0A4Jflb4OPdlKrazRmrusPsjzO6d0QQu1g== X-Received: by 2002:adf:e4cf:: with SMTP id v15mr22227895wrm.162.1623151391975; Tue, 08 Jun 2021 04:23:11 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/26] configure, meson: convert virgl detection to meson Date: Tue, 8 Jun 2021 13:22:45 +0200 Message-Id: <20210608112301.402434-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210608112301.402434-1-pbonzini@redhat.com> References: <20210608112301.402434-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::434; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x434.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.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 35 ++++------------------------------- hw/display/meson.build | 6 +++--- meson.build | 10 ++++++---- meson_options.txt | 2 ++ 4 files changed, 15 insertions(+), 38 deletions(-) diff --git a/configure b/configure index d3351557e9..c2c8c9f2d6 100755 --- a/configure +++ b/configure @@ -409,7 +409,7 @@ nettle=3D"auto" gcrypt=3D"auto" auth_pam=3D"auto" vte=3D"auto" -virglrenderer=3D"$default_feature" +virglrenderer=3D"auto" tpm=3D"$default_feature" libssh=3D"$default_feature" live_block_migration=3D${default_feature:-yes} @@ -1399,9 +1399,9 @@ for opt do ;; --enable-vte) vte=3D"enabled" ;; - --disable-virglrenderer) virglrenderer=3D"no" + --disable-virglrenderer) virglrenderer=3D"disabled" ;; - --enable-virglrenderer) virglrenderer=3D"yes" + --enable-virglrenderer) virglrenderer=3D"enabled" ;; --disable-tpm) tpm=3D"no" ;; @@ -4036,28 +4036,6 @@ EOF fi fi =20 -########################################## -# virgl renderer probe - -if test "$virglrenderer" !=3D "no" ; then - cat > $TMPC << EOF -#include -int main(void) { virgl_renderer_poll(); return 0; } -EOF - virgl_cflags=3D$($pkg_config --cflags virglrenderer 2>/dev/null) - virgl_libs=3D$($pkg_config --libs virglrenderer 2>/dev/null) - virgl_version=3D$($pkg_config --modversion virglrenderer 2>/dev/null) - if $pkg_config virglrenderer >/dev/null 2>&1 && \ - compile_prog "$virgl_cflags" "$virgl_libs" ; then - virglrenderer=3D"yes" - else - if test "$virglrenderer" =3D "yes" ; then - feature_not_found "virglrenderer" - fi - virglrenderer=3D"no" - fi -fi - ########################################## # capstone =20 @@ -5464,11 +5442,6 @@ fi if test "$have_copy_file_range" =3D "yes" ; then echo "HAVE_COPY_FILE_RANGE=3Dy" >> $config_host_mak fi -if test "$virglrenderer" =3D "yes" ; then - echo "CONFIG_VIRGL=3Dy" >> $config_host_mak - echo "VIRGL_CFLAGS=3D$virgl_cflags" >> $config_host_mak - echo "VIRGL_LIBS=3D$virgl_libs" >> $config_host_mak -fi if test "$xen" =3D "enabled" ; then echo "CONFIG_XEN_BACKEND=3Dy" >> $config_host_mak echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_version" >> $config_= host_mak @@ -6136,7 +6109,7 @@ if test "$skip_meson" =3D no; then -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ - -Dattr=3D$attr -Ddefault_devices=3D$default_devices \ + -Dattr=3D$attr -Ddefault_devices=3D$default_devices -Dvirglrendere= r=3D$virglrenderer \ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ -Dvhost_user_blk_server=3D$vhost_user_blk_server -Dmultiprocess=3D= $multiprocess \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek -Dguest_agent_msi=3D$gue= st_agent_msi -Dbpf=3D$bpf\ diff --git a/hw/display/meson.build b/hw/display/meson.build index e1f473c1df..1e6b707d3c 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -61,7 +61,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU') hw_display_modules +=3D {'virtio-gpu': virtio_gpu_ss} =20 virtio_gpu_gl_ss =3D ss.source_set() - virtio_gpu_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL', opengl], + virtio_gpu_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', virgl, opengl], if_true: [files('virtio-gpu-gl.c', 'virtio-gpu-virg= l.c'), pixman, virgl]) hw_display_modules +=3D {'virtio-gpu-gl': virtio_gpu_gl_ss} endif @@ -75,7 +75,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_PCI') hw_display_modules +=3D {'virtio-gpu-pci': virtio_gpu_pci_ss} =20 virtio_gpu_pci_gl_ss =3D ss.source_set() - virtio_gpu_pci_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'= , 'CONFIG_VIRGL', opengl], + virtio_gpu_pci_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'= , virgl, opengl], if_true: [files('virtio-gpu-pci-gl.c'), pixman]) hw_display_modules +=3D {'virtio-gpu-pci-gl': virtio_gpu_pci_gl_ss} endif @@ -89,7 +89,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA') hw_display_modules +=3D {'virtio-vga': virtio_vga_ss} =20 virtio_vga_gl_ss =3D ss.source_set() - virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', 'CONFIG_VIRGL', opengl], + virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', virgl, opengl], if_true: [files('virtio-vga-gl.c'), pixman]) hw_display_modules +=3D {'virtio-vga-gl': virtio_vga_gl_ss} endif diff --git a/meson.build b/meson.build index f3af9ee3cf..842831e1fb 100644 --- a/meson.build +++ b/meson.build @@ -471,9 +471,11 @@ if 'CONFIG_GBM' in config_host link_args: config_host['GBM_LIBS'].split()) endif virgl =3D not_found -if 'CONFIG_VIRGL' in config_host - virgl =3D declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].s= plit(), - link_args: config_host['VIRGL_LIBS'].split()) +if not get_option('virglrenderer').auto() or have_system + virgl =3D dependency('virglrenderer', + method: 'pkg-config', + required: get_option('virglrenderer'), + kwargs: static_kwargs) endif curl =3D not_found if not get_option('curl').auto() or have_block @@ -2782,7 +2784,7 @@ summary_info +=3D {'PAM': pam.found()} summary_info +=3D {'iconv support': iconv.found()} summary_info +=3D {'curses support': curses.found()} # TODO: add back version -summary_info +=3D {'virgl support': config_host.has_key('CONFIG_VIRGL'= )} +summary_info +=3D {'virgl support': virgl.found()} summary_info +=3D {'curl support': curl.found()} summary_info +=3D {'Multipath support': mpathpersist.found()} summary_info +=3D {'VNC support': vnc.found()} diff --git a/meson_options.txt b/meson_options.txt index 8af42987f4..a70aedb0eb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -110,6 +110,8 @@ option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('usb_redir', type : 'feature', value : 'auto', description: 'libusbredir support') +option('virglrenderer', type : 'feature', value : 'auto', + description: 'virgl rendering support') option('vnc', type : 'feature', value : 'enabled', description: 'VNC server') option('vnc_jpeg', type : 'feature', value : 'auto', --=20 2.31.1