configure: add dependency

This dependency is required for adequate Parallels images support.
Typically the disk consists of several images which are glued by
XML disk descriptor. Also XML hides inside several important parameters
which are not available in the image header.

The patch also adds clause to checkpatch.pl to understand libxml2 types.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Klim Kireev <klim.kireev@virtuozzo.com>
Signed-off-by: Edgar Kaziakhmedov <edgar.kaziakhmedov@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20180112090122.1702-3-klim.kireev@virtuozzo.com
CC: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Klim Kireev 2018-01-12 12:01:19 +03:00 committed by Stefan Hajnoczi
parent 5292e79f22
commit ed279a06c5
3 changed files with 30 additions and 0 deletions

View File

@ -47,3 +47,5 @@ block-obj-$(if $(CONFIG_BZIP2),m,n) += dmg-bz2.o
dmg-bz2.o-libs := $(BZIP2_LIBS) dmg-bz2.o-libs := $(BZIP2_LIBS)
qcow.o-libs := -lz qcow.o-libs := -lz
linux-aio.o-libs := -laio linux-aio.o-libs := -laio
parallels.o-cflags := $(LIBXML2_CFLAGS)
parallels.o-libs := $(LIBXML2_LIBS)

27
configure vendored
View File

@ -435,6 +435,7 @@ tcmalloc="no"
jemalloc="no" jemalloc="no"
replication="yes" replication="yes"
vxhs="" vxhs=""
libxml2=""
supported_cpu="no" supported_cpu="no"
supported_os="no" supported_os="no"
@ -1298,6 +1299,10 @@ for opt do
;; ;;
--enable-numa) numa="yes" --enable-numa) numa="yes"
;; ;;
--disable-libxml2) libxml2="no"
;;
--enable-libxml2) libxml2="yes"
;;
--disable-tcmalloc) tcmalloc="no" --disable-tcmalloc) tcmalloc="no"
;; ;;
--enable-tcmalloc) tcmalloc="yes" --enable-tcmalloc) tcmalloc="yes"
@ -1573,6 +1578,7 @@ disabled with --disable-FEATURE, default is enabled if available:
tpm TPM support tpm TPM support
libssh2 ssh block device support libssh2 ssh block device support
numa libnuma support numa libnuma support
libxml2 for Parallels image format
tcmalloc tcmalloc support tcmalloc tcmalloc support
jemalloc jemalloc support jemalloc jemalloc support
replication replication support replication replication support
@ -3748,6 +3754,20 @@ EOF
fi fi
fi fi
##########################################
# libxml2 probe
if test "$libxml2" != "no" ; then
if $pkg_config --exists libxml-2.0; then
libxml2="yes"
libxml2_cflags=$($pkg_config --cflags libxml-2.0)
libxml2_libs=$($pkg_config --libs libxml-2.0)
else
if test "$libxml2" = "yes"; then
feature_not_found "libxml2" "Install libxml2 devel"
fi
libxml2="no"
fi
fi
########################################## ##########################################
# glusterfs probe # glusterfs probe
@ -5630,6 +5650,7 @@ echo "lzo support $lzo"
echo "snappy support $snappy" echo "snappy support $snappy"
echo "bzip2 support $bzip2" echo "bzip2 support $bzip2"
echo "NUMA host support $numa" echo "NUMA host support $numa"
echo "libxml2 $libxml2"
echo "tcmalloc support $tcmalloc" echo "tcmalloc support $tcmalloc"
echo "jemalloc support $jemalloc" echo "jemalloc support $jemalloc"
echo "avx2 optimization $avx2_opt" echo "avx2 optimization $avx2_opt"
@ -6299,6 +6320,12 @@ if test "$have_rtnetlink" = "yes" ; then
echo "CONFIG_RTNETLINK=y" >> $config_host_mak echo "CONFIG_RTNETLINK=y" >> $config_host_mak
fi fi
if test "$libxml2" = "yes" ; then
echo "CONFIG_LIBXML2=y" >> $config_host_mak
echo "LIBXML2_CFLAGS=$libxml2_cflags" >> $config_host_mak
echo "LIBXML2_LIBS=$libxml2_libs" >> $config_host_mak
fi
if test "$replication" = "yes" ; then if test "$replication" = "yes" ; then
echo "CONFIG_REPLICATION=y" >> $config_host_mak echo "CONFIG_REPLICATION=y" >> $config_host_mak
fi fi

View File

@ -265,6 +265,7 @@ our @typeList = (
qr{${Ident}_handler_fn}, qr{${Ident}_handler_fn},
qr{target_(?:u)?long}, qr{target_(?:u)?long},
qr{hwaddr}, qr{hwaddr},
qr{xml${Ident}},
); );
# This can be modified by sub possible. Since it can be empty, be careful # This can be modified by sub possible. Since it can be empty, be careful