configure: Enable test and libs for zstd

Add it to several build systems to make testing good.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Juan Quintela 2019-12-17 21:15:24 +01:00
parent 7ec2c2b3c1
commit 3a67848134
12 changed files with 53 additions and 4 deletions

View File

@ -21,6 +21,7 @@ build-system2:
script: script:
- apt-get install -y -qq libsdl2-dev libgcrypt-dev libbrlapi-dev libaio-dev - apt-get install -y -qq libsdl2-dev libgcrypt-dev libbrlapi-dev libaio-dev
libfdt-dev liblzo2-dev librdmacm-dev libibverbs-dev libibumad-dev libfdt-dev liblzo2-dev librdmacm-dev libibverbs-dev libibumad-dev
libzstd-dev
- mkdir build - mkdir build
- cd build - cd build
- ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu - ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu

View File

@ -49,6 +49,7 @@ addons:
- libusb-1.0-0-dev - libusb-1.0-0-dev
- libvdeplug-dev - libvdeplug-dev
- libvte-2.91-dev - libvte-2.91-dev
- libzstd-dev
- sparse - sparse
- uuid-dev - uuid-dev
- gcovr - gcovr

30
configure vendored
View File

@ -449,6 +449,7 @@ lzo=""
snappy="" snappy=""
bzip2="" bzip2=""
lzfse="" lzfse=""
zstd=""
guest_agent="" guest_agent=""
guest_agent_with_vss="no" guest_agent_with_vss="no"
guest_agent_ntddscsi="no" guest_agent_ntddscsi="no"
@ -1371,6 +1372,10 @@ for opt do
;; ;;
--disable-lzfse) lzfse="no" --disable-lzfse) lzfse="no"
;; ;;
--disable-zstd) zstd="no"
;;
--enable-zstd) zstd="yes"
;;
--enable-guest-agent) guest_agent="yes" --enable-guest-agent) guest_agent="yes"
;; ;;
--disable-guest-agent) guest_agent="no" --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) (for reading bzip2-compressed dmg images)
lzfse support of lzfse compression library lzfse support of lzfse compression library
(for reading lzfse-compressed dmg images) (for reading lzfse-compressed dmg images)
zstd support for zstd compression library
(for migration compression)
seccomp seccomp support seccomp seccomp support
coroutine-pool coroutine freelist (better performance) coroutine-pool coroutine freelist (better performance)
glusterfs GlusterFS backend glusterfs GlusterFS backend
@ -2453,6 +2460,24 @@ EOF
fi fi
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 # libseccomp check
@ -6668,6 +6693,7 @@ echo "lzo support $lzo"
echo "snappy support $snappy" echo "snappy support $snappy"
echo "bzip2 support $bzip2" echo "bzip2 support $bzip2"
echo "lzfse support $lzfse" echo "lzfse support $lzfse"
echo "zstd support $zstd"
echo "NUMA host support $numa" echo "NUMA host support $numa"
echo "libxml2 $libxml2" echo "libxml2 $libxml2"
echo "tcmalloc support $tcmalloc" echo "tcmalloc support $tcmalloc"
@ -7242,6 +7268,10 @@ if test "$lzfse" = "yes" ; then
echo "LZFSE_LIBS=-llzfse" >> $config_host_mak echo "LZFSE_LIBS=-llzfse" >> $config_host_mak
fi fi
if test "$zstd" = "yes" ; then
echo "CONFIG_ZSTD=y" >> $config_host_mak
fi
if test "$libiscsi" = "yes" ; then if test "$libiscsi" = "yes" ; then
echo "CONFIG_LIBISCSI=m" >> $config_host_mak echo "CONFIG_LIBISCSI=m" >> $config_host_mak
echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak

View File

@ -33,6 +33,7 @@ ENV PACKAGES \
tar \ tar \
vte-devel \ vte-devel \
xen-devel \ xen-devel \
zlib-devel zlib-devel \
libzstd-devel
RUN yum install -y $PACKAGES RUN yum install -y $PACKAGES
RUN rpm -q $PACKAGES | sort > /packages.txt RUN rpm -q $PACKAGES | sort > /packages.txt

View File

@ -7,7 +7,8 @@ ENV PACKAGES \
gnutls-devel.i686 \ gnutls-devel.i686 \
nettle-devel.i686 \ nettle-devel.i686 \
pixman-devel.i686 \ pixman-devel.i686 \
zlib-devel.i686 zlib-devel.i686 \
libzstd-devel.i686
RUN dnf install -y $PACKAGES RUN dnf install -y $PACKAGES
RUN rpm -q $PACKAGES | sort > /packages.txt RUN rpm -q $PACKAGES | sort > /packages.txt

View File

@ -92,7 +92,8 @@ ENV PACKAGES \
vte291-devel \ vte291-devel \
which \ which \
xen-devel \ xen-devel \
zlib-devel zlib-devel \
libzstd-devel
ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
RUN dnf install -y $PACKAGES RUN dnf install -y $PACKAGES

View File

@ -58,6 +58,7 @@ ENV PACKAGES flex bison \
libvdeplug-dev \ libvdeplug-dev \
libvte-2.91-dev \ libvte-2.91-dev \
libxen-dev \ libxen-dev \
libzstd-dev \
make \ make \
python3-yaml \ python3-yaml \
python3-sphinx \ python3-sphinx \

View File

@ -44,6 +44,7 @@ ENV PACKAGES flex bison \
libvdeplug-dev \ libvdeplug-dev \
libvte-2.91-dev \ libvte-2.91-dev \
libxen-dev \ libxen-dev \
libzstd-dev \
make \ make \
python3-yaml \ python3-yaml \
python3-sphinx \ python3-sphinx \

View File

@ -53,6 +53,9 @@ class FedoraVM(basevm.BaseVM):
# libs: audio # libs: audio
'"pkgconfig(libpulse)"', '"pkgconfig(libpulse)"',
'"pkgconfig(alsa)"', '"pkgconfig(alsa)"',
# libs: migration
'"pkgconfig(libzstd)"',
] ]
BUILD_SCRIPT = """ BUILD_SCRIPT = """

View File

@ -55,6 +55,9 @@ class FreeBSDVM(basevm.BaseVM):
# libs: opengl # libs: opengl
"libepoxy", "libepoxy",
"mesa-libs", "mesa-libs",
# libs: migration
"zstd",
] ]
BUILD_SCRIPT = """ BUILD_SCRIPT = """

View File

@ -49,6 +49,9 @@ class NetBSDVM(basevm.BaseVM):
"SDL2", "SDL2",
"gtk3+", "gtk3+",
"libxkbcommon", "libxkbcommon",
# libs: migration
"zstd",
] ]
BUILD_SCRIPT = """ BUILD_SCRIPT = """

View File

@ -51,6 +51,9 @@ class OpenBSDVM(basevm.BaseVM):
"sdl2", "sdl2",
"gtk+3", "gtk+3",
"libxkbcommon", "libxkbcommon",
# libs: migration
"zstd",
] ]
BUILD_SCRIPT = """ BUILD_SCRIPT = """