[Spice-devel] [PATCH spice-server 2/3] Add support for building with meson

Eduardo Lima (Etrunko) etrunko at redhat.com
Tue Jul 24 13:53:27 UTC 2018


On 24/07/18 06:14, Frediano Ziglio wrote:
> ...
> 
>>>>> +
>>>>> +# lz4
>>>>> +spice_server_has_lz4 = false
>>>>> +if get_option('lz4')
>>>>> +  lz4_dep = dependency('liblz4', required : false, version : '>= 129')
>>>>> +  if not lz4_dep.found()
>>>>> +    lz4_dep = dependency('liblz4', version : '>= 1.7.3')
>>>>> +  endif
>>>>> +
>>>>> +  spice_server_deps += lz4_dep
>>>>> +  spice_server_config_data.set('USE_LZ4', '1')
>>>>> +  spice_server_has_lz4 = true
>>>>
>>>> trying this patch looks like we need to check for
>>>> LZ4_compress_fast_continue
>>>> function. Also in m4/spice-deps.m4 there is a check for
>>>> LZ4_compress_default
>>>> to verify we can link lz4 library.
>>>>
>>>
>>> I remember adding those specific version numbers so that it is not
>>> required to check for LZ4_compress_default. It was added back in version
>>> 129, and then they changed the numbering scheme, to Major.Minor.Release,
>>> with the first one being 1.7.3.
>>>
>>
>> But it is not testing for LZ4_compress_fast_continue
>>
> 
> Easy to solve:
> 
> diff --git a/meson.build b/meson.build
> index a564daf1f..15e9811ba 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -125,6 +125,9 @@ if get_option('lz4')
>    spice_server_deps += lz4_dep
>    spice_server_config_data.set('USE_LZ4', '1')
>    spice_server_has_lz4 = true
> +  if compiler.has_function('LZ4_compress_fast_continue', dependencies : lz4_dep)
> +    spice_server_config_data.set('HAVE_LZ4_COMPRESS_FAST_CONTINUE', '1')
> +  endif

Now I got it, the code does have a #ifdef for that function. Will add
this, thanks for pointing out.

>  endif
> 
>  # sasl
> 
> Frediano
> 


-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com


More information about the Spice-devel mailing list