From nobody Mon Feb 9 02:14:30 2026 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=1630587996; cv=none; d=zohomail.com; s=zohoarc; b=QFYpjLehyiPkrpWShKHk9rU3o9F4wkgMFSag6r0DONELOT6khXb9LIaalmqjCeZ64PH7YIp8ovtwyaQeM0DIWzFRzBafZA7ugK7SNKdMjDos9M40kcS1oR55KJ7GlMMsAJrVxHv2b8hJmiClW0/CK+tiBT8KNaBBlJHjNJrom8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630587996; h=Content-Type: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=4EUv8iL7NxMA/intfzzPkJ+814b8qIkaWcJNgQYex4k=; b=KczbFnAgQF/6OSD7uubO3sYKnZ+vcXhfHjVq8a10vOIjG4Re8zI4iufokUR+iNizILfxt71ip67vpFr5WGIVm87HLKHvGn692wAZM211jFI4S7KUD0uO/J3O7k6zb5BXA1eJtGr/YcWoAcSLotDTwKmcLr6CfkAlDsgC9ZlY7wg= 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 1630587996225879.7652293710624; Thu, 2 Sep 2021 06:06:36 -0700 (PDT) Received: from localhost ([::1]:39784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLmQN-0005Sq-6h for importer@patchew.org; Thu, 02 Sep 2021 09:06:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLm9y-0005Bt-Ur for qemu-devel@nongnu.org; Thu, 02 Sep 2021 08:49:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46151) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLm9t-00073y-Uq for qemu-devel@nongnu.org; Thu, 02 Sep 2021 08:49:37 -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-419-xw4omFn6Mqqdi2CH4yIyvw-1; Thu, 02 Sep 2021 08:49:31 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6DB5F1083E90; Thu, 2 Sep 2021 12:49:30 +0000 (UTC) Received: from thuth.com (unknown [10.39.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C9AD1000358; Thu, 2 Sep 2021 12:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630586973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4EUv8iL7NxMA/intfzzPkJ+814b8qIkaWcJNgQYex4k=; b=ESHrz1nkCd1lnHlAmswo6vCm5PHIr6sWDDDa/n94YA20cpjE9xiFQOoYi1QUbF13wEEVbC 1ULn/k4yn2hVfcnbdrZsUxCkjnA/OdWUoKR9ULJTjgDiMkaMVGr6WFtuzxGNL6wvQihLz+ rcw7Eiep8ArMleLy28ZcSaWjYVbRYa4= X-MC-Unique: xw4omFn6Mqqdi2CH4yIyvw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 09/13] configure / meson: Move the GBM handling to meson.build Date: Thu, 2 Sep 2021 14:49:07 +0200 Message-Id: <20210902124911.822423-10-thuth@redhat.com> In-Reply-To: <20210902124911.822423-1-thuth@redhat.com> References: <20210902124911.822423-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, 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_H2=-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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1630587997879100001 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. Message-Id: <20210714085045.797168-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- 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 9a79a004d7..d63b173410 100755 --- a/configure +++ b/configure @@ -3452,13 +3452,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 @@ -4681,13 +4674,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 ecfdce921c..83310980f1 100644 --- a/meson.build +++ b/meson.build @@ -472,11 +472,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', @@ -816,11 +811,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 gnutls_crypto =3D not_found @@ -1244,6 +1245,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')) @@ -3086,7 +3088,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