[Spice-commits] m4/spice-deps.m4

Pavel Grunt pgrunt at kemper.freedesktop.org
Thu Jan 28 05:17:45 PST 2016


 m4/spice-deps.m4 |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 6424c0baee9b25cc4508e3f1a81f7be5546a3793
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Wed Jan 20 09:02:30 2016 +0100

    Use lz4 if possible
    
    Change the default option to "auto"
    
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index d533c81..88edf7e 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -207,14 +207,20 @@ AC_DEFUN([SPICE_CHECK_PYTHON_MODULES], [
 # ---------------
 AC_DEFUN([SPICE_CHECK_LZ4], [
     AC_ARG_ENABLE([lz4],
-      AS_HELP_STRING([--enable-lz4=@<:@yes/no@:>@],
-                     [Enable LZ4 compression support @<:@default=no@:>@]),
+      AS_HELP_STRING([--enable-lz4=@<:@yes/no/auto@:>@],
+                     [Enable LZ4 compression support @<:@default=auto@:>@]),
       [],
-      [enable_lz4="no"])
+      [enable_lz4="auto"])
 
     if test "x$enable_lz4" != "xno"; then
-      PKG_CHECK_MODULES([LZ4], [liblz4])
-      AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support])
+      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]
+      )
     fi
 ])
 


More information about the Spice-commits mailing list