build-sys: Disable zchunk for libdnf if we don't have it

Going to update rpm-ostree for RHEL 8.3, we did a huge bump
in libdnf which now defaults to enabling zchunk in its build
system.  We added the infrastructure before to detect things,
so propagate that to libdnf.
This commit is contained in:
Colin Walters 2020-05-14 00:38:48 +00:00 committed by OpenShift Merge Robot
parent ac5489b065
commit 0bfd20c900

View File

@ -131,8 +131,9 @@ AS_IF([pkg-config --atleast-version=4.14.2 rpm], [], [AC_MSG_ERROR([librpm 4.14.
dnl We don't *actually* use this ourself, but librepo does, and libdnf gets confused
dnl if librepo doesn't support it.
have_zchunk=no
AS_IF([pkg-config --exists zck],
[AC_DEFINE([HAVE_ZCHUNK], 1, [Define if we have zchunk])])
[have_zchunk=yes; AC_DEFINE([HAVE_ZCHUNK], 1, [Define if we have zchunk])])
AC_PATH_PROG([XSLTPROC], [xsltproc])
@ -259,6 +260,9 @@ cmake_args=-DCMAKE_BUILD_TYPE=RelWithDebugInfo
if test ${debug_release} = debug; then
cmake_args="-DCMAKE_BUILD_TYPE=Debug"
fi
if test x${have_zchunk} = xno; then
cmake_args="${cmake_args} -DWITH_ZCHUNK:BOOL=0"
fi
export cmake_args
dnl I picked /usr/libexec/rpm-ostree just because we need an