[Spice-devel] [PATCH v2 spice-common] Make LZ4 dependency check more robust
Eduardo Lima (Etrunko)
etrunko at redhat.com
Thu Jun 16 14:06:36 UTC 2016
On 06/16/2016 10:54 AM, Christophe Fergeau wrote:
> Looks good to me,
> Acked-by: Christophe Fergeau <cfergeau at redhat.com>
>
Pushed, thanks (forgot to add your ack to the message)
> On Thu, Jun 16, 2016 at 10:39:58AM -0300, Eduardo Lima (Etrunko) wrote:
>> Add a new 'HAVE_LZ4' automake conditional to really tell if we have the
>> dependency installed on the system. It will later be used in Makefile to
>> decide whether or not the specific files related to LZ4 should be built.
>>
>> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
>> ---
>> m4/spice-deps.m4 | 17 +++++++++--------
>> 1 file changed, 9 insertions(+), 8 deletions(-)
>>
>> diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
>> index 2e2fcf5..6cb8bde 100644
>> --- a/m4/spice-deps.m4
>> +++ b/m4/spice-deps.m4
>> @@ -183,16 +183,17 @@ AC_DEFUN([SPICE_CHECK_LZ4], [
>> [],
>> [enable_lz4="auto"])
>>
>> + have_lz4="no"
>> if test "x$enable_lz4" != "xno"; then
>> - PKG_CHECK_MODULES([LZ4], [liblz4],
>> - [enable_lz4=yes
>> - AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support])
>> - ],
>> - [if test "x$enable_lz4" = "xyes"; then
>> - AC_MSG_ERROR([lz4 support requested but liblz4 could not be found])
>> - fi]
>> - )
>> + 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])
>> + fi
>> fi
>> + AM_CONDITIONAL(HAVE_LZ4, test "x$have_lz4" = "xyes")
>> ])
>>
>>
>> --
>> 2.5.5
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/spice-devel
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com
More information about the Spice-devel
mailing list