]> Git Repo - qemu.git/commitdiff
configure: Enable test and libs for zstd
authorJuan Quintela <[email protected]>
Tue, 17 Dec 2019 20:15:24 +0000 (21:15 +0100)
committerJuan Quintela <[email protected]>
Fri, 28 Feb 2020 08:24:43 +0000 (09:24 +0100)
Add it to several build systems to make testing good.

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
12 files changed:
.gitlab-ci.yml
.travis.yml
configure
tests/docker/dockerfiles/centos7.docker
tests/docker/dockerfiles/fedora-i386-cross.docker
tests/docker/dockerfiles/fedora.docker
tests/docker/dockerfiles/ubuntu.docker
tests/docker/dockerfiles/ubuntu1804.docker
tests/vm/fedora
tests/vm/freebsd
tests/vm/netbsd
tests/vm/openbsd

index c15e394f09a0ad6f359bad73e1d867fb2dfe09b5..72f8b8aa51f228e523f66f5354bf2f7c1f8b0bc2 100644 (file)
@@ -21,6 +21,7 @@ build-system2:
  script:
  - apt-get install -y -qq libsdl2-dev libgcrypt-dev libbrlapi-dev libaio-dev
       libfdt-dev liblzo2-dev librdmacm-dev libibverbs-dev libibumad-dev
+      libzstd-dev
  - mkdir build
  - cd build
  - ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu
index f4020dcc6c85faf47041f6565d78bab86c3b92e5..9867272177d4cf3f8908a28ed68f7b2a1c8e9e25 100644 (file)
@@ -49,6 +49,7 @@ addons:
       - libusb-1.0-0-dev
       - libvdeplug-dev
       - libvte-2.91-dev
+      - libzstd-dev
       - sparse
       - uuid-dev
       - gcovr
index 48d6f89d57c8ad25c040df8b64772069b3926c0b..7b373bc0bb846da54286213b9650c3a2b7ff98d2 100755 (executable)
--- a/configure
+++ b/configure
@@ -449,6 +449,7 @@ lzo=""
 snappy=""
 bzip2=""
 lzfse=""
+zstd=""
 guest_agent=""
 guest_agent_with_vss="no"
 guest_agent_ntddscsi="no"
@@ -1371,6 +1372,10 @@ for opt do
   ;;
   --disable-lzfse) lzfse="no"
   ;;
+  --disable-zstd) zstd="no"
+  ;;
+  --enable-zstd) zstd="yes"
+  ;;
   --enable-guest-agent) guest_agent="yes"
   ;;
   --disable-guest-agent) guest_agent="no"
@@ -1829,6 +1834,8 @@ disabled with --disable-FEATURE, default is enabled if available:
                   (for reading bzip2-compressed dmg images)
   lzfse           support of lzfse compression library
                   (for reading lzfse-compressed dmg images)
+  zstd            support for zstd compression library
+                  (for migration compression)
   seccomp         seccomp support
   coroutine-pool  coroutine freelist (better performance)
   glusterfs       GlusterFS backend
@@ -2453,6 +2460,24 @@ EOF
     fi
 fi
 
+##########################################
+# zstd check
+
+if test "$zstd" != "no" ; then
+    if $pkg_config --exist libzstd ; then
+        zstd_cflags="$($pkg_config --cflags libzstd)"
+        zstd_libs="$($pkg_config --libs libzstd)"
+        LIBS="$zstd_libs $LIBS"
+        QEMU_CFLAGS="$QEMU_CFLAGS $zstd_cflags"
+        zstd="yes"
+    else
+        if test "$zstd" = "yes" ; then
+            feature_not_found "libzstd" "Install libzstd devel"
+        fi
+        zstd="no"
+    fi
+fi
+
 ##########################################
 # libseccomp check
 
@@ -6668,6 +6693,7 @@ echo "lzo support       $lzo"
 echo "snappy support    $snappy"
 echo "bzip2 support     $bzip2"
 echo "lzfse support     $lzfse"
+echo "zstd support      $zstd"
 echo "NUMA host support $numa"
 echo "libxml2           $libxml2"
 echo "tcmalloc support  $tcmalloc"
@@ -7242,6 +7268,10 @@ if test "$lzfse" = "yes" ; then
   echo "LZFSE_LIBS=-llzfse" >> $config_host_mak
 fi
 
+if test "$zstd" = "yes" ; then
+  echo "CONFIG_ZSTD=y" >> $config_host_mak
+fi
+
 if test "$libiscsi" = "yes" ; then
   echo "CONFIG_LIBISCSI=m" >> $config_host_mak
   echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak
index 562d65be9e05c5e5388aea75ee0fcb2955af07e8..cdd72de7ebf416cb2e4e8bb7b9e134fbb443a990 100644 (file)
@@ -33,6 +33,7 @@ ENV PACKAGES \
     tar \
     vte-devel \
     xen-devel \
-    zlib-devel
+    zlib-devel \
+    libzstd-devel
 RUN yum install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
index 9106cf9ebed68ab5187e7c92fe9ae42a37f02b00..cd16cd1bfae53f4388acb551ff7a07abbfc42bbf 100644 (file)
@@ -7,7 +7,8 @@ ENV PACKAGES \
     gnutls-devel.i686 \
     nettle-devel.i686 \
     pixman-devel.i686 \
-    zlib-devel.i686
+    zlib-devel.i686 \
+    libzstd-devel.i686
 
 RUN dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
index 987a3c170a1bfaeb7d3ab6d04081bc1917b2814a..a6522228c0253bd2a51bc517332f7a6fdadf6fa9 100644 (file)
@@ -92,7 +92,8 @@ ENV PACKAGES \
     vte291-devel \
     which \
     xen-devel \
-    zlib-devel
+    zlib-devel \
+    libzstd-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 
 RUN dnf install -y $PACKAGES
index 4177f33691835344d0667cfe2d3f1abb494f0baf..b6c7b41ddddc9f43a0bcdbf78e99e9e718411524 100644 (file)
@@ -58,6 +58,7 @@ ENV PACKAGES flex bison \
     libvdeplug-dev \
     libvte-2.91-dev \
     libxen-dev \
+    libzstd-dev \
     make \
     python3-yaml \
     python3-sphinx \
index 0766f94cf47d789b9fa7293e14b5aedf534f50d0..1efedeef995aab35e78c3e789ac84529288b9b91 100644 (file)
@@ -44,6 +44,7 @@ ENV PACKAGES flex bison \
     libvdeplug-dev \
     libvte-2.91-dev \
     libxen-dev \
+    libzstd-dev \
     make \
     python3-yaml \
     python3-sphinx \
index 4d7d6049f4fb1be5a74f06f3375f10233c18db5e..4843b4175e0791f0efcba1aeaa58dc321f9d2c6c 100755 (executable)
@@ -53,7 +53,10 @@ class FedoraVM(basevm.BaseVM):
         # libs: audio
         '"pkgconfig(libpulse)"',
         '"pkgconfig(alsa)"',
-    ]
+
+        # libs: migration
+        '"pkgconfig(libzstd)"',
+]
 
     BUILD_SCRIPT = """
         set -e;
index fb543346963f47897130d510fa6929b3f90341be..86770878b67b3d8287698ac08aae728ca054c1cb 100755 (executable)
@@ -55,6 +55,9 @@ class FreeBSDVM(basevm.BaseVM):
         # libs: opengl
         "libepoxy",
         "mesa-libs",
+
+        # libs: migration
+        "zstd",
     ]
 
     BUILD_SCRIPT = """
index c5069a45f4e4e6ec92542179b6cd20e2e8a33868..55590f4601520b983cf6b25531603a42ca654e6a 100755 (executable)
@@ -49,6 +49,9 @@ class NetBSDVM(basevm.BaseVM):
         "SDL2",
         "gtk3+",
         "libxkbcommon",
+
+        # libs: migration
+        "zstd",
     ]
 
     BUILD_SCRIPT = """
index 22cd9513dd5b1b4307509ae812a9efcaf6f19987..ab6abbedab575bf4cae193963b31d56b9274e799 100755 (executable)
@@ -51,6 +51,9 @@ class OpenBSDVM(basevm.BaseVM):
         "sdl2",
         "gtk+3",
         "libxkbcommon",
+
+        # libs: migration
+        "zstd",
     ]
 
     BUILD_SCRIPT = """
This page took 0.039538 seconds and 4 git commands to generate.