From nobody Tue Feb 10 13:16:19 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=1623151746; cv=none; d=zohomail.com; s=zohoarc; b=EpVIxSTCp3wR0Rf+4gvUqXDyjUWJ+O3bjNi20+0k7D4yxz/QhhQUyw/lXha71pR1nxF51cYvfuwjxZ7Xhn1qRtk0iO0xPBC1R6Vvec4gwsc+s9xSlElByILoyZwmK4EbyRUjAvFYb/2rjtqWLGBC95IZEdC/C3UUzT0XkD0nae0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623151746; 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=3BHzzehIAd6rLWsdffGUKDOovWe+Q46KfbqgPwO3Ny4=; b=Jl5F1hJNuCxQj5uJstbF7OF7qU1itBlgq4q8DjlU+zm+sUssGU4VAogT7b0Y1atwkx4S4cqk6IBnhEvZuJ0U7KYcWToefXTYIX+I2j7JWsa5FjwBRIqm2FQ9avGPoRSPQO+zZ6fpSrIReqSqeadOnvE17SjydZ+bBv830HcM47U= 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 16231517462381012.390432591549; Tue, 8 Jun 2021 04:29:06 -0700 (PDT) Received: from localhost ([::1]:46572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqZur-0000L3-3L for importer@patchew.org; Tue, 08 Jun 2021 07:29:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqZpB-0006WG-9L for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:14 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:41848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqZp9-0007z4-I9 for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:12 -0400 Received: by mail-wm1-x32b.google.com with SMTP id l11-20020a05600c4f0bb029017a7cd488f5so1632062wmq.0 for ; Tue, 08 Jun 2021 04:23:11 -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.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 04:23:09 -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=3BHzzehIAd6rLWsdffGUKDOovWe+Q46KfbqgPwO3Ny4=; b=d+eDGFdViaoWBKenOh2tf31JJYKlvU0vf47RcMhuOAZhST5BPQwrcDkMjIdzyL8hd4 w4p4yGV5fGNNAZn0z2Yu15TztX7jpInXIYxpu1pqq6TDq+ZcyFHteOXxmBdpzptbkClU Z3tb7OxkB6Zm02R/66cvO9XK2gnxS2zNmGM+3u/ZvVEKyH2ZKn8wMNKEaRGUpXRXloWM uMsPVKDckabXrbFcaWLSl3AAKXTJqrjoxzBdNISN7nTsQaL4RqhW0F5OKkRFuRKIujNr RM5WF84oAR/Kz3mU2466c2/+gOlRFRqoXUmT2ABvmd6kmTY3GWv5brXgnsNCOf5eww4q wVlg== 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=3BHzzehIAd6rLWsdffGUKDOovWe+Q46KfbqgPwO3Ny4=; b=kiLMe9j/NOkCAg+FaOqA7WAzorKBn4T0YKk/AFwhG5AULw3KJKqp4Ytm6OEGnwrksw zYZT52EJDPVQKO0nKHph5t9zsxA/ULTNiIeXh7uel/8Har77WQnMlasIOGFSH/6EAEuo stRAR+HB0FOIwaRqDXD9399HK8zeTbkmRvxhznLxwk1lhlLufH6FCoZ04fggtMrfYnay IB7iUm6CfS55x3CfAGhH3svv8v6TlM7ibEYD535n6Cfg50JTHsBbK61j5piPTFmT+0E+ 6glUwPY6vGwpI55aindqvrw1l/8+KuJmlo6xhmVaP1OIV615nntak2n0I72p8N8qPhMk 2LZg== X-Gm-Message-State: AOAM531kPk5SJ369lq59cvBAJzeP6AHyJiSe8kqTXlOjMJtsCeNqeGV5 +ZUm+rmfeohg8oZr/X2Chj7gDynO4c1JSg== X-Google-Smtp-Source: ABdhPJyrSQkInCe6YwfCqieCVkEvSGXju1IRi9fn7KUx/xtNXnkh5jenWV/cF5ad1pj1Q9Q8yOgC5w== X-Received: by 2002:a05:600c:3ba2:: with SMTP id n34mr13265634wms.120.1623151390219; Tue, 08 Jun 2021 04:23:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/26] configure, meson: convert libusbredir detection to meson Date: Tue, 8 Jun 2021 13:22:43 +0200 Message-Id: <20210608112301.402434-9-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::32b; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32b.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 | 28 ++++------------------------ hw/usb/meson.build | 2 +- meson.build | 9 +++++---- meson_options.txt | 2 ++ 4 files changed, 12 insertions(+), 29 deletions(-) diff --git a/configure b/configure index 591acd0750..9a6217a3bf 100755 --- a/configure +++ b/configure @@ -375,7 +375,7 @@ rbd=3D"auto" smartcard=3D"auto" u2f=3D"auto" libusb=3D"auto" -usb_redir=3D"$default_feature" +usb_redir=3D"auto" opengl=3D"$default_feature" cpuid_h=3D"no" avx2_opt=3D"$default_feature" @@ -1289,9 +1289,9 @@ for opt do ;; --enable-libusb) libusb=3D"enabled" ;; - --disable-usb-redir) usb_redir=3D"no" + --disable-usb-redir) usb_redir=3D"disabled" ;; - --enable-usb-redir) usb_redir=3D"yes" + --enable-usb-redir) usb_redir=3D"enabled" ;; --disable-zlib-test) ;; @@ -3980,20 +3980,6 @@ EOF fi fi =20 -# check for usbredirparser for usb network redirection support -if test "$usb_redir" !=3D "no" ; then - if $pkg_config --atleast-version=3D0.6 libusbredirparser-0.5; then - usb_redir=3D"yes" - usb_redir_cflags=3D$($pkg_config --cflags libusbredirparser-0.5) - usb_redir_libs=3D$($pkg_config --libs libusbredirparser-0.5) - else - if test "$usb_redir" =3D "yes"; then - feature_not_found "usb-redir" "Install usbredir devel" - fi - usb_redir=3D"no" - fi -fi - ########################################## # check if we have VSS SDK headers for win =20 @@ -5592,12 +5578,6 @@ if test "$spice" =3D "yes" ; then echo "SPICE_LIBS=3D$spice_libs" >> $config_host_mak fi =20 -if test "$usb_redir" =3D "yes" ; then - echo "CONFIG_USB_REDIR=3Dy" >> $config_host_mak - echo "USB_REDIR_CFLAGS=3D$usb_redir_cflags" >> $config_host_mak - echo "USB_REDIR_LIBS=3D$usb_redir_libs" >> $config_host_mak -fi - if test "$opengl" =3D "yes" ; then echo "CONFIG_OPENGL=3Dy" >> $config_host_mak echo "OPENGL_CFLAGS=3D$opengl_cflags" >> $config_host_mak @@ -6174,7 +6154,7 @@ if test "$skip_meson" =3D no; then -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf -Dnvmm=3D$nv= mm \ -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D= $tcg \ -Dcocoa=3D$cocoa -Dgtk=3D$gtk -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_= image=3D$sdl_image \ - -Dlibusb=3D$libusb -Dsmartcard=3D$smartcard \ + -Dlibusb=3D$libusb -Dsmartcard=3D$smartcard -Dusb_redir=3D$usb_red= ir \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirti= ofsd=3D$virtiofsd \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ diff --git a/hw/usb/meson.build b/hw/usb/meson.build index df9effbb10..4f24b5274d 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -64,7 +64,7 @@ if u2f.found() endif =20 # usb redirect -if config_host.has_key('CONFIG_USB_REDIR') +if usbredir.found() usbredir_ss =3D ss.source_set() usbredir_ss.add(when: 'CONFIG_USB', if_true: [usbredir, files('redirect.c', 'quirks.c')]) diff --git a/meson.build b/meson.build index d2efa6178a..ae40bdf7c4 100644 --- a/meson.build +++ b/meson.build @@ -987,9 +987,10 @@ if have_system kwargs: static_kwargs) endif usbredir =3D not_found -if 'CONFIG_USB_REDIR' in config_host - usbredir =3D declare_dependency(compile_args: config_host['USB_REDIR_CFL= AGS'].split(), - link_args: config_host['USB_REDIR_LIBS'].s= plit()) +if not get_option('usb_redir').auto() or have_system + usbredir =3D dependency('libusbredirparser-0.5', required: get_option('u= sb_redir'), + version: '>=3D0.6', method: 'pkg-config', + kwargs: static_kwargs) endif libusb =3D not_found if not get_option('libusb').auto() or have_system @@ -2798,7 +2799,7 @@ summary_info +=3D {'xfsctl support': config_host.h= as_key('CONFIG_XFS')} summary_info +=3D {'smartcard support': cacard.found()} summary_info +=3D {'U2F support': u2f.found()} summary_info +=3D {'libusb': libusb.found()} -summary_info +=3D {'usb net redir': config_host.has_key('CONFIG_USB_RE= DIR')} +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 {'libiscsi support': libiscsi.found()} diff --git a/meson_options.txt b/meson_options.txt index cd9374384e..f7ec9bee27 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -108,6 +108,8 @@ option('snappy', type : 'feature', value : 'auto', description: 'snappy compression support') option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') +option('usb_redir', type : 'feature', value : 'auto', + description: 'libusbredir support') option('vnc', type : 'feature', value : 'enabled', description: 'VNC server') option('vnc_jpeg', type : 'feature', value : 'auto', --=20 2.31.1