From nobody Sun May 19 23:34:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1626252720; cv=none; d=zohomail.com; s=zohoarc; b=Zq5kpFiGaWqbjB6UcrLYO/hjE6ebMjMZktN8HuA9X8Gc0ZDhLlg8S7WMFtObSZUCIc4nkY9YBzxtSrvJPJ/0iLw/gE9qynO0cwsA9pH1cwnPz/27ILYWY0AXZePDIeX8OhVMv3sfDfq5YQ9QrJH3wJ7DxlTLULuUqvZxqpQTJzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626252720; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=qYOeBPoGRiBllsRv/IXsS5ileOILBD+1D2XDJdk937Q=; b=VOkcpML6MXzguLFBdewKXeEj2Rur00Wa5oo/yPf5f4cayQKskh9tNwBc6V4bdPfAa2DYleZYj7jd52wrE2Gqih3H76hnIF8M/XKNZcxpoV19RJUdCxdb+HvRhoPsy1Wx98vyMWVfnpintyvUg6E8DYvFQbwLkwLIcDsrUN26Cxc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1626252720137860.5240675545701; Wed, 14 Jul 2021 01:52:00 -0700 (PDT) Received: from localhost ([::1]:52436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3acY-0007Ux-TT for importer@patchew.org; Wed, 14 Jul 2021 04:51:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3abp-0006g5-OB for qemu-devel@nongnu.org; Wed, 14 Jul 2021 04:51:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3abm-0006gu-Mg for qemu-devel@nongnu.org; Wed, 14 Jul 2021 04:51:13 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-517-aqsC9JRROBKu9tE2YBk4Hw-1; Wed, 14 Jul 2021 04:51:05 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 17EFA824F8A for ; Wed, 14 Jul 2021 08:51:04 +0000 (UTC) Received: from thuth.com (ovpn-113-199.ams2.redhat.com [10.36.113.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7AC4A5C1D1; Wed, 14 Jul 2021 08:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626252667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYOeBPoGRiBllsRv/IXsS5ileOILBD+1D2XDJdk937Q=; b=QH8bv1dboYs50NV3LP+YhVn1QbFP0hFi+8E2febY8DEAl8NWlR27iAjWTrVFMlbbb1d9sc 0LF3djLeOPPxJG/7jWJPi2myCkd9EkQOFcqf5eRn5o/r5NWWy2qvOlc64XegAt1Ae82m0l /KoUzx1K10EhD6g1f9ysMNtbjIZBxcM= X-MC-Unique: aqsC9JRROBKu9tE2YBk4Hw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini Subject: [PATCH v2] configure / meson: Move the GBM handling to meson.build Date: Wed, 14 Jul 2021 10:50:45 +0200 Message-Id: <20210714085045.797168-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626252722186100001 Content-Type: text/plain; charset="utf-8" The GBM library detection does not need to be in the configure script, since it does not have any user-facing options (there are no --enable-gbm or --disable-gbm switches). Let's move it to meson.build instead, so we don't have to clutter config-host.mak with the related switches. Additionally, only check for GBM if it is really required, i.e. if we either compile with OpenGL or with virglrenderer support. Signed-off-by: Thomas Huth --- v2: Added "required: false" to the gbm dependency() configure | 14 -------------- contrib/vhost-user-gpu/meson.build | 5 ++--- meson.build | 14 ++++++++------ 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 11ff175463..eee1356814 100755 --- a/configure +++ b/configure @@ -3360,13 +3360,6 @@ esac ########################################## # opengl probe (for sdl2, gtk) =20 -gbm=3D"no" -if $pkg_config gbm; then - gbm_cflags=3D"$($pkg_config --cflags gbm)" - gbm_libs=3D"$($pkg_config --libs gbm)" - gbm=3D"yes" -fi - if test "$opengl" !=3D "no" ; then epoxy=3Dno if $pkg_config epoxy; then @@ -4648,13 +4641,6 @@ if test "$opengl" =3D "yes" ; then echo "OPENGL_LIBS=3D$opengl_libs" >> $config_host_mak fi =20 -if test "$gbm" =3D "yes" ; then - echo "CONFIG_GBM=3Dy" >> $config_host_mak - echo "GBM_LIBS=3D$gbm_libs" >> $config_host_mak - echo "GBM_CFLAGS=3D$gbm_cflags" >> $config_host_mak -fi - - if test "$avx2_opt" =3D "yes" ; then echo "CONFIG_AVX2_OPT=3Dy" >> $config_host_mak fi diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/me= son.build index 4cb52a91d7..92c8f3a86a 100644 --- a/contrib/vhost-user-gpu/meson.build +++ b/contrib/vhost-user-gpu/meson.build @@ -1,6 +1,5 @@ -if 'CONFIG_TOOLS' in config_host and virgl.found() \ - and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host \ - and pixman.found() +if 'CONFIG_TOOLS' in config_host and virgl.found() and gbm.found() \ + and 'CONFIG_LINUX' in config_host and pixman.found() executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm= .c'), dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, open= gl], install: true, diff --git a/meson.build b/meson.build index b0e2b9a8a0..a5c96c05a9 100644 --- a/meson.build +++ b/meson.build @@ -465,11 +465,6 @@ if not get_option('zstd').auto() or have_block required: get_option('zstd'), method: 'pkg-config', kwargs: static_kwargs) endif -gbm =3D not_found -if 'CONFIG_GBM' in config_host - gbm =3D declare_dependency(compile_args: config_host['GBM_CFLAGS'].split= (), - link_args: config_host['GBM_LIBS'].split()) -endif virgl =3D not_found if not get_option('virglrenderer').auto() or have_system virgl =3D dependency('virglrenderer', @@ -809,11 +804,17 @@ coreaudio =3D not_found if 'CONFIG_AUDIO_COREAUDIO' in config_host coreaudio =3D declare_dependency(link_args: config_host['COREAUDIO_LIBS'= ].split()) endif + opengl =3D not_found if 'CONFIG_OPENGL' in config_host opengl =3D declare_dependency(compile_args: config_host['OPENGL_CFLAGS']= .split(), link_args: config_host['OPENGL_LIBS'].split(= )) endif +gbm =3D not_found +if virgl.found() or 'CONFIG_OPENGL' in config_host + gbm =3D dependency('gbm', method: 'pkg-config', required: false, + kwargs: static_kwargs) +endif =20 gnutls =3D not_found if not get_option('gnutls').auto() or have_system @@ -1210,6 +1211,7 @@ config_host_data.set('CONFIG_MPATH', mpathpersist.fou= nd()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) config_host_data.set('CONFIG_CURL', curl.found()) config_host_data.set('CONFIG_CURSES', curses.found()) +config_host_data.set('CONFIG_GBM', gbm.found()) config_host_data.set('CONFIG_GLUSTERFS', glusterfs.found()) if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_XLATOR_OPT', glusterfs.version().= version_compare('>=3D4')) @@ -3032,7 +3034,7 @@ summary_info +=3D {'U2F support': u2f.found()} summary_info +=3D {'libusb': libusb.found()} summary_info +=3D {'usb net redir': usbredir.found()} summary_info +=3D {'OpenGL support': config_host.has_key('CONFIG_OPENGL= ')} -summary_info +=3D {'GBM': config_host.has_key('CONFIG_GBM')} +summary_info +=3D {'GBM': gbm.found()} summary_info +=3D {'libiscsi support': libiscsi.found()} summary_info +=3D {'libnfs support': libnfs.found()} if targetos =3D=3D 'windows' --=20 2.27.0