[Spice-devel] [PATCH spice-common] spice-deps: Make LZ4 check depending on function
Uri Lublin
uril at redhat.com
Thu Nov 24 12:10:12 UTC 2016
On 11/24/2016 10:57 AM, Pavel Grunt wrote:
> LZ4 changed versioning scheme from r131 to v1.7.3 making our configure
> fail with (1.7.3 < 129).
>
> Switch from version checking to checking that the necessary function
> is available.
Ack.
Uri.
> ---
> m4/spice-deps.m4 | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
> index adedec4..43a7d4a 100644
> --- a/m4/spice-deps.m4
> +++ b/m4/spice-deps.m4
> @@ -185,12 +185,14 @@ AC_DEFUN([SPICE_CHECK_LZ4], [
>
> have_lz4="no"
> if test "x$enable_lz4" != "xno"; then
> - PKG_CHECK_MODULES([LZ4], [liblz4 >= 129], [have_lz4="yes"], [have_lz4="no"])
> + PKG_CHECK_MODULES([LZ4], [liblz4], [
> + AC_SEARCH_LIBS([LZ4_compress_default], [lz4], [have_lz4="yes"], [have_lz4="no"])],
> + [have_lz4="no"])
>
> if test "x$have_lz4" = "xyes"; then
> AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support])
> elif test "x$enable_lz4" = "xyes"; then
> - AC_MSG_ERROR([lz4 support requested but liblz4 could not be found])
> + AC_MSG_ERROR([lz4 support requested but liblz4 >= 129 could not be found])
> fi
> fi
> AM_CONDITIONAL(HAVE_LZ4, test "x$have_lz4" = "xyes")
>
More information about the Spice-devel
mailing list