aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-04-23 17:46:10 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-04-23 17:47:25 +0200
commit994c4de26637204ff14fe4be7f5cc051a04573fe (patch)
treeb5a73be63968218d204d9e2dbdbaf55d6de407c4
parentcb1763e48401d77100630184e56908c287e70109 (diff)
configure: Abort/fail if there is not compressor library
Implement a check that verifies that we have at least a single SquashFS block compressor available and aborst the build if none was found. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 94a5eee..16a288f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,6 +274,18 @@ PKG_CHECK_MODULES(READLINE, [readline], [have_readline="yes"],
[have_readline="no"])
AM_CONDITIONAL([WITH_READLINE], [test "x$have_readline" = "xyes"])
+#### make sure we actually have a compressor ####
+have_compressor="no"
+
+AS_IF([test "x$with_gzip" != "xno"], [have_compressor="yes"])
+AS_IF([test "x$with_xz" != "xno"], [have_compressor="yes"])
+AS_IF([test "x$with_lzo" != "xno"], [have_compressor="yes"])
+AS_IF([test "x$with_lz4" != "xno"], [have_compressor="yes"])
+AS_IF([test "x$with_zstd" != "xno"], [have_compressor="yes"])
+
+AS_IF([test "x$have_compressor" != "xyes"],
+ [AC_MSG_FAILURE([no block compression libraries found!])])
+
##### additional checks #####
AC_CHECK_HEADERS([sys/xattr.h], [], [])
AC_CHECK_HEADERS([sys/sysinfo.h], [], [])