aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-27 11:44:20 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-28 16:15:35 +0100
commit113b174c5807f76cb14cfed7a8f86a299393666e (patch)
tree5049d9bf32dbc582c5da0f251e7fdfcfe817c2f4 /configure.ac
parent2e109625bb7496bf1f3e75e30345c8cbd6eacede (diff)
Add a small version of liblz4 that can be built in statically
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 12 insertions, 2 deletions
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"])