From nobody Tue Feb 10 03:39:39 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1624630955343832.2433010743008; Fri, 25 Jun 2021 07:22:35 -0700 (PDT) Received: from localhost ([::1]:38412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwmj4-0003TI-BD for importer@patchew.org; Fri, 25 Jun 2021 10:22:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwmfD-0002zu-IC for qemu-devel@nongnu.org; Fri, 25 Jun 2021 10:18:35 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:43754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwmfB-0003Ay-OX for qemu-devel@nongnu.org; Fri, 25 Jun 2021 10:18:35 -0400 Received: by mail-ed1-x536.google.com with SMTP id s6so13576985edu.10 for ; Fri, 25 Jun 2021 07:18:33 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id c28sm326579ejc.102.2021.06.25.07.18.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 07:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/NJW9B47FFiAWRRAuH2I9olXcKoFv5w9OJzC75jNnJo=; b=llvwrV9IJ+yinfTUH+eNGhCqgXOvN6QI7kpP4K2D9nHYjrQ2hJVRlMCud7tzj0Lb5Z guQFW1bUmdBWQxY2nTvYilBX2+su0Fuz7NvqXI9PlSf8gy5LkdxgvTglWHDK09Ab7eTi FWDqXP/y8MIBjMb0+RJOd0+nbCcN+tX8jmnOgfMRW3FkKzzxbobHyKALkVAUX8yHNJLE iXu59fcM9sQ2wCLTQPAoV7ki+Ee31xxoD9pZKZCC7NP8PaIPkLrhXxFWU+CuOIdvnRh6 sBUgMu7ua6+qifei2Lguj16v8o+pgLCRpdBFJWroMYlInuNqCKZE+K816TAlUyrI2jL8 9qCQ== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/NJW9B47FFiAWRRAuH2I9olXcKoFv5w9OJzC75jNnJo=; b=XDLuStVxSOHQYWUkxBvdGamE4XcxB/QFkQAciwSf1spNPNcq+HxpevqPrVLUIc8Zf+ 7Xj72aYI4udZYd8h5G2gi9j47OHuKSdn2YR9Ei9B6Z4vBE1Yu5VKImcErdGJkwjIq+29 qfHQy29bRhDvosxPRnJn4fGMkVAisxEgqGNWc3U3vVhq00tTyJMF9Gt6VLEsVKBuvmJ8 ekeFXu/jGIhuTJyttGVN4FGWiZ1Yvg9dCH0YKU3Tqkle08AL1mUcoY6XdkHDi51w5xi7 ir+iG97lEyc7ACuiTlMoLv/FUpOOMjBYfhg55NXjjDkRt6+H9HskQ2bioxqWs1W2hugD c4Iw== X-Gm-Message-State: AOAM531a6MBKo4aNfZXP5S818fTfyxVxap4EcQlEWqPQkAKj4crWEMgy 0xeK31t4Las6eaOnoOs58DwiL1Iyd+c= X-Google-Smtp-Source: ABdhPJwgUFIvE53eFDmETqRKl/mwMxZyAq4Lzn/Vt2wd8K1LLzbdpERBaQon8V94Jp2zQRybAA9nSA== X-Received: by 2002:aa7:c799:: with SMTP id n25mr14627046eds.16.1624630712389; Fri, 25 Jun 2021 07:18:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/28] configure, meson: convert libcacard detection to meson Date: Fri, 25 Jun 2021 16:18:04 +0200 Message-Id: <20210625141822.1368639-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210625141822.1368639-1-pbonzini@redhat.com> References: <20210625141822.1368639-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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: , Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- 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 e54d06b99e..02b0acc1f5 100755 --- a/configure +++ b/configure @@ -372,7 +372,7 @@ trace_file=3D"trace" spice=3D"$default_feature" spice_protocol=3D"auto" rbd=3D"auto" -smartcard=3D"$default_feature" +smartcard=3D"auto" u2f=3D"auto" libusb=3D"auto" usb_redir=3D"$default_feature" @@ -1277,9 +1277,9 @@ for opt do ;; --enable-xfsctl) xfs=3D"yes" ;; - --disable-smartcard) smartcard=3D"no" + --disable-smartcard) smartcard=3D"disabled" ;; - --enable-smartcard) smartcard=3D"yes" + --enable-smartcard) smartcard=3D"enabled" ;; --disable-u2f) u2f=3D"disabled" ;; @@ -3980,20 +3980,6 @@ EOF fi fi =20 -# check for smartcard support -if test "$smartcard" !=3D "no"; then - if $pkg_config --atleast-version=3D2.5.1 libcacard; then - libcacard_cflags=3D$($pkg_config --cflags libcacard) - libcacard_libs=3D$($pkg_config --libs libcacard) - smartcard=3D"yes" - else - if test "$smartcard" =3D "yes"; then - feature_not_found "smartcard" "Install libcacard devel" - fi - smartcard=3D"no" - fi -fi - # 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 @@ -5611,12 +5597,6 @@ if test "$spice" =3D "yes" ; then echo "SPICE_LIBS=3D$spice_libs" >> $config_host_mak fi =20 -if test "$smartcard" =3D "yes" ; then - echo "CONFIG_SMARTCARD=3Dy" >> $config_host_mak - echo "SMARTCARD_CFLAGS=3D$libcacard_cflags" >> $config_host_mak - echo "SMARTCARD_LIBS=3D$libcacard_libs" >> $config_host_mak -fi - 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 @@ -6195,7 +6175,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 \ + -Dlibusb=3D$libusb -Dsmartcard=3D$smartcard \ -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 bd3f8735b9..df9effbb10 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -49,7 +49,7 @@ softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE= _MTP'], if_true: files( # smartcard softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard= -reader.c')) =20 -if config_host.has_key('CONFIG_SMARTCARD') +if cacard.found() usbsmartcard_ss =3D ss.source_set() usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: [cacard, files('ccid-card-emulated.c', 'cci= d-card-passthru.c')]) diff --git a/meson.build b/meson.build index 0b4b55b9da..afcfcb8c57 100644 --- a/meson.build +++ b/meson.build @@ -976,9 +976,10 @@ if 'CONFIG_XEN_BACKEND' in config_host link_args: config_host['XEN_LIBS'].split()) endif cacard =3D not_found -if 'CONFIG_SMARTCARD' in config_host - cacard =3D declare_dependency(compile_args: config_host['SMARTCARD_CFLAG= S'].split(), - link_args: config_host['SMARTCARD_LIBS'].spl= it()) +if not get_option('smartcard').auto() or have_system + cacard =3D dependency('libcacard', required: get_option('smartcard'), + version: '>=3D2.5.1', method: 'pkg-config', + kwargs: static_kwargs) endif u2f =3D not_found if have_system @@ -2781,7 +2782,7 @@ summary_info +=3D {'bpf support': libbpf.found()} summary_info +=3D {'spice support': config_host.has_key('CONFIG_SPICE'= )} summary_info +=3D {'rbd support': rbd.found()} summary_info +=3D {'xfsctl support': config_host.has_key('CONFIG_XFS')} -summary_info +=3D {'smartcard support': config_host.has_key('CONFIG_SMARTC= ARD')} +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')} diff --git a/meson_options.txt b/meson_options.txt index 02c14d4751..cd9374384e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -102,6 +102,8 @@ option('sdl_image', type : 'feature', value : 'auto', description: 'SDL Image support for icons') option('seccomp', type : 'feature', value : 'auto', description: 'seccomp support') +option('smartcard', type : 'feature', value : 'auto', + description: 'CA smartcard emulation support') option('snappy', type : 'feature', value : 'auto', description: 'snappy compression support') option('u2f', type : 'feature', value : 'auto', --=20 2.31.1