Re: [PATCH spice-common v2 1/2] spice-deps: Make LZ4 check depending on function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 24, 2016 at 03:11:24PM +0100, 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.
> ---
> v2: Added some comments, Switched to AC_CHECK_FUNC
> ---
>  m4/spice-deps.m4 | 22 ++++++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
> index adedec4..6827c7f 100644
> --- a/m4/spice-deps.m4
> +++ b/m4/spice-deps.m4
> @@ -185,12 +185,26 @@ 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"])
> +      # LZ4_compress_default is available in liblz4 >= 129, however liblz has changed
> +      # versioning scheme making the check failing. Rather check for function definition
> +      PKG_CHECK_MODULES([LZ4], [liblz4], [have_lz4="yes"], [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])
> +        # For cross-compilers may be necessary to save & restore LIBS and CFLAGS before AC_SEARCH_LIBS

This is not limited to cross-compilers, you could have installed lz4 in
the /foo/bar/my-lz4 prefix and set PKG_CONFIG_PATH to accordingly.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]