[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 08/13] configure: Add USB U2F key device
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH v2 08/13] configure: Add USB U2F key device |
Date: |
Tue, 25 Aug 2020 08:57:47 +0200 |
Hi,
> +# check for u2f support
> +if test "$u2f" != "no"; then
> + if $pkg_config --atleast-version=0.0.0 u2f-emu; then
> + u2f_emu_cflags=$($pkg_config --cflags u2f-emu)
> + u2f_emu_libs=$($pkg_config --libs u2f-emu)
> + u2f="yes"
> + else
> + if test "$u2f" = "yes"; then
> + feature_not_found "u2f" "Install u2f-emu"
> + fi
> + u2f="no"
> + fi
> +fi
The libu2f-emu check can be handled by meson instead. That will
probably simplify things a bit thanks to meson's build-in pkg-config
dependency support (no need for explicit cflags/libs variables).
Here is an example for moving a pkg-config check from
configure to meson:
20200824152430.1844159-2-laurent@vivier.eu/">https://patchwork.ozlabs.org/project/qemu-devel/patch/20200824152430.1844159-2-laurent@vivier.eu/
> +if test "$u2f" = "yes" ; then
> + echo "CONFIG_U2F=y" >> $config_host_mak
> + echo "U2F_CFLAGS=$u2f_emu_cflags" >> $config_host_mak
> + echo "U2F_LIBS=$u2f_emu_libs" >> $config_host_mak
> +fi
This is a bit confusing as patch #7 uses these variables already. I'd
suggest to either reorder the patches so the detection comes first, or
just squash the two patches into one.
take care,
Gerd
- [PATCH v2 00/13] Introduce USB U2F key device, César Belley, 2020/08/24
- [PATCH v2 01/13] hw/usb: Regroup USB HID protocol values, César Belley, 2020/08/24
- [PATCH v2 02/13] docs: Add USB U2F key device documentation, César Belley, 2020/08/24
- [PATCH v2 03/13] hw/usb: Add U2F key base class, César Belley, 2020/08/24
- [PATCH v2 04/13] hw/usb: Add U2F key base class implementation, César Belley, 2020/08/24
- [PATCH v2 06/13] hw/usb: Add U2F key emulated mode, César Belley, 2020/08/24
- [PATCH v2 05/13] hw/usb: Add U2F key passthru mode, César Belley, 2020/08/24
- [PATCH v2 08/13] configure: Add USB U2F key device, César Belley, 2020/08/24
- Re: [PATCH v2 08/13] configure: Add USB U2F key device,
Gerd Hoffmann <=
- [PATCH v2 07/13] hw/usb: Add U2F key build recipe, César Belley, 2020/08/24
- [PATCH v2 09/13] docs/system: Add U2F key to the USB devices examples, César Belley, 2020/08/24
- [PATCH v2 10/13] docs/qdev-device-use.txt: Add USB U2F key to the QDEV devices examples, César Belley, 2020/08/24
- [PATCH v2 11/13] scripts: Add u2f-setup-gen script, César Belley, 2020/08/24
- [PATCH v2 12/13] hw/usb: Add U2F device check to passthru mode, César Belley, 2020/08/24
- [PATCH v2 13/13] hw/usb: Add U2F device autoscan to passthru mode, César Belley, 2020/08/24