[PATCH v2] configure: Improve zstd test

Juan Quintela posted 1 patch 4 years, 3 months ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200310111431.173151-1-quintela@redhat.com
configure | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH v2] configure: Improve zstd test
Posted by Juan Quintela 4 years, 3 months ago
There were one error on the test (missing an s for --exists).
But we really need a recent zstd (1.4.0).
Thanks to Michal Privoznik to provide the right vension.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reported-by: Richard Henderson <richard.henderson@linaro.org>
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index cbf864bff1..f5454bd603 100755
--- a/configure
+++ b/configure
@@ -2475,7 +2475,8 @@ fi
 # zstd check
 
 if test "$zstd" != "no" ; then
-    if $pkg_config --exist libzstd ; then
+    libzstd_minver="1.4.0"
+    if $pkg_config --atleast-version=$libzstd_minver libzstd ; then
         zstd_cflags="$($pkg_config --cflags libzstd)"
         zstd_libs="$($pkg_config --libs libzstd)"
         LIBS="$zstd_libs $LIBS"
-- 
2.24.1


Re: [PATCH v2] configure: Improve zstd test
Posted by Dr. David Alan Gilbert 4 years, 3 months ago
* Juan Quintela (quintela@redhat.com) wrote:
> There were one error on the test (missing an s for --exists).
> But we really need a recent zstd (1.4.0).
> Thanks to Michal Privoznik to provide the right vension.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> Reported-by: Richard Henderson <richard.henderson@linaro.org>

Queued for migration

> ---
>  configure | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index cbf864bff1..f5454bd603 100755
> --- a/configure
> +++ b/configure
> @@ -2475,7 +2475,8 @@ fi
>  # zstd check
>  
>  if test "$zstd" != "no" ; then
> -    if $pkg_config --exist libzstd ; then
> +    libzstd_minver="1.4.0"
> +    if $pkg_config --atleast-version=$libzstd_minver libzstd ; then
>          zstd_cflags="$($pkg_config --cflags libzstd)"
>          zstd_libs="$($pkg_config --libs libzstd)"
>          LIBS="$zstd_libs $LIBS"
> -- 
> 2.24.1
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK