summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 422a113..b138c6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,15 +71,27 @@ AC_ARG_WITH([lzo],
esac],
[AM_CONDITIONAL([WITH_LZO], [true])])
+AC_ARG_WITH([lz4],
+ [AS_HELP_STRING([--without-lz4],
+ [Build without lz4 compression support])],
+ [case "${withval}" in
+ yes) AM_CONDITIONAL([WITH_LZ4], [true]) ;;
+ no) AM_CONDITIONAL([WITH_LZ4], [false]) ;;
+ *) AC_MSG_ERROR([bad value ${withval} for --without-lz4]) ;;
+ esac],
+ [AM_CONDITIONAL([WITH_LZ4], [true])])
+
##### search for dependencies #####
need_zlib="no"
need_xz="no"
need_lzo="no"
+need_lz4="no"
AM_COND_IF([WITH_GZIP], [need_zlib="yes"])
AM_COND_IF([WITH_XZ], [need_xz="yes"])
AM_COND_IF([WITH_LZO], [need_lzo="yes"])
+AM_COND_IF([WITH_LZ4], [need_lz4="yes"])
if test "x$need_zlib" = "xyes"; then
PKG_CHECK_MODULES(ZLIB, [zlib], [], [AC_MSG_ERROR([cannot find zlib])])
@@ -100,6 +112,11 @@ if test "x$need_lzo" = "xyes"; then
)
fi
+if test "x$need_lz4" = "xyes"; then
+ PKG_CHECK_MODULES(LZ4, [liblz4], [],
+ [AC_MSG_ERROR([cannot lz4 library])])
+fi
+
##### generate output #####
AC_CONFIG_HEADERS([config.h])