[Spice-devel,spice-common] Detect LZ4_compress_fast_continue function

Submitted by Frediano Ziglio on Nov. 28, 2016, 5:50 p.m.

Details

Message ID 20161128175016.20243-1-fziglio@redhat.com
State Accepted
Commit 6b409c4a7979f043a997ae762f16c6edec68345e
Headers show
Series "Detect LZ4_compress_fast_continue function" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Nov. 28, 2016, 5:50 p.m.
Newer lz4 headers give deprecated warning using LZ4_compress_continue
instead of LZ_compress_fast_continue so detect this function
to allow usage and avoid the warning.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 m4/spice-deps.m4 | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index 3b22422..5e9ad17 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -198,6 +198,7 @@  AC_DEFUN([SPICE_CHECK_LZ4], [
         AC_CHECK_FUNC([LZ4_compress_default], [
             AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support])],
             [have_lz4="no"])
+        AC_CHECK_FUNCS([LZ4_compress_fast_continue])
 
         LIBS="$old_LIBS"
         CFLAGS="$old_CFLAGS"

Comments

On Mon, 2016-11-28 at 17:50 +0000, Frediano Ziglio wrote:
> Newer lz4 headers give deprecated warning using
> LZ4_compress_continue
> instead of LZ_compress_fast_continue so detect this function
> to allow usage and avoid the warning.
> 
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
> ---
>  m4/spice-deps.m4 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
> index 3b22422..5e9ad17 100644
> --- a/m4/spice-deps.m4
> +++ b/m4/spice-deps.m4
> @@ -198,6 +198,7 @@ AC_DEFUN([SPICE_CHECK_LZ4], [
>          AC_CHECK_FUNC([LZ4_compress_default], [
>              AC_DEFINE(USE_LZ4, [1], [Define to build with lz4
> support])],
>              [have_lz4="no"])
> +        AC_CHECK_FUNCS([LZ4_compress_fast_continue])
>  
>          LIBS="$old_LIBS"
>          CFLAGS="$old_CFLAGS"