[Spice-devel] [PATCH spice-common] Make LZ4 dependency check more robust
Eduardo Lima (Etrunko)
etrunko at redhat.com
Wed Jun 15 19:35:14 UTC 2016
Add a new 'have_lz4' variable 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 | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index 2e2fcf5..a114e4f 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -185,14 +185,18 @@ AC_DEFUN([SPICE_CHECK_LZ4], [
if test "x$enable_lz4" != "xno"; then
PKG_CHECK_MODULES([LZ4], [liblz4],
- [enable_lz4=yes
+ [have_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]
+ [have_lz4="no"
+ if test "x$enable_lz4" = "xyes"; then
+ AC_MSG_ERROR([lz4 support requested but liblz4 could not be found])
+ fi]
)
+ else
+ have_lz4=no
fi
+ AM_CONDITIONAL(HAVE_LZ4, test "x$have_lz4" = "xyes")
])
--
2.5.5
More information about the Spice-devel
mailing list