summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2016-01-07 15:33:17 +0100
committerPavel Grunt <pgrunt@redhat.com>2016-01-19 16:39:20 +0100
commit1882c9cc2bc59d650950556309d143d46d1a033e (patch)
treeaee8862f83d74795219b3f8998d58c9c965b5ce2
parentb61f43f228950505ef809dccd6a73aefdfd44ce1 (diff)
Use lz4 if possibleauto_lz4
Change the default option to "auto"
-rw-r--r--m4/spice-deps.m416
1 files changed, 11 insertions, 5 deletions
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
])