qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]