From 113b174c5807f76cb14cfed7a8f86a299393666e Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 27 Dec 2019 11:44:20 +0100 Subject: Add a small version of liblz4 that can be built in statically Signed-off-by: David Oberhollenzer --- configure.ac | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e885348..96419b9 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,10 @@ AC_ARG_WITH([lz4], [AS_HELP_STRING([--with-lz4], [Build with lz4 compression support])], [], [with_lz4="check"]) +AC_ARG_WITH([builtin-lz4], + [AS_HELP_STRING([--with-builtin-lz4], [Use a custom, static liblz4])], + [], [with_builtin_lz4="no"]) + AC_ARG_WITH([zstd], [AS_HELP_STRING([--with-zstd], [Build with zstd compression support])], [], [with_zstd="check"]) @@ -139,13 +143,15 @@ AS_IF([test "x$with_xz" != "xno"], [ [with_xz="no"])]) ], []) -AS_IF([test "x$with_lz4" != "xno"], [ +AS_IF([test "x$with_lz4" != "xno" -a "x$with_builtin_lz4" != "xyes"], [ PKG_CHECK_MODULES(LZ4, [liblz4], [with_lz4="yes"], [AS_IF([test "x$with_lz4" = "xyes"], [AC_MSG_ERROR([cannot find liblz4])], [with_lz4="no"])]) ], []) +AS_IF([test "x$with_builtin_lz4" != "xno"], [with_lz4="yes"], []) + AS_IF([test "x$with_zstd" != "xno"], [ PKG_CHECK_MODULES(ZSTD, [libzstd], [with_zstd="yes"], [AS_IF([test "x$with_zstd" = "xyes"], @@ -197,10 +203,14 @@ AM_CONDITIONAL([WITH_LZO], [test "x$with_lzo" = "xyes"]) AM_CONDITIONAL([WITH_SELINUX], [test "x$with_selinux" = "xyes"]) AM_CONDITIONAL([HAVE_PTHREAD], [test "x$with_pthread" = "xyes"]) +AM_CONDITIONAL([WITH_OWN_LZ4], [test "x$with_builtin_lz4" = "xyes"]) + libsqfs_dep_mod="" +AS_IF([test "x$with_lz4" = "xyes" -a "x$with_builtin_lz4" != "xyes"], + [libsqfs_dep_mod="$libsqfs_dep_mod liblz4"], []) + AM_COND_IF([WITH_GZIP], [libsqfs_dep_mod="$libsqfs_dep_mod zlib"], []) AM_COND_IF([WITH_XZ], [libsqfs_dep_mod="$libsqfs_dep_mod liblzma >= 5.0.0"], []) -AM_COND_IF([WITH_LZ4], [libsqfs_dep_mod="$libsqfs_dep_mod liblz4"], []) AM_COND_IF([WITH_ZSTD], [libsqfs_dep_mod="$libsqfs_dep_mod libzstd"], []) AC_SUBST([LIBSQFS_DEP_MOD], ["$libsqfs_dep_mod"]) -- cgit v1.2.3