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

Eduardo Lima etrunko at kemper.freedesktop.org
Thu Jun 16 14:06:13 UTC 2016


 m4/spice-deps.m4 |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 535930471320fb370c3027c158a1944a9729ce93
Author: Eduardo Lima (Etrunko) <etrunko at redhat.com>
Date:   Wed Jun 15 16:21:21 2016 -0300

    Make LZ4 dependency check more robust
    
    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>

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")
 ])
 
 


More information about the Spice-commits mailing list