summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTorge Matthies <openglfreak@googlemail.com>2020-09-08 21:59:20 +0200
committerLucas De Marchi <lucas.demarchi@intel.com>2020-09-10 21:55:01 -0700
commit3821e1971ec53fabbbb9f2679ea988ee12db61c8 (patch)
tree0af3bd902300467b35af96f38e8c135e6a7dd122 /configure.ac
parentf5434cf5fc5b567359e1b9207bbab24c6782cfbd (diff)
downloadkmod-3821e1971ec53fabbbb9f2679ea988ee12db61c8.tar.gz
add Zstandard compression support
I changed the style of the hackargs variable in autogen.sh to multiline because said line was becoming a bit long with the new --with-zstd arg added. A previous version of this patch has been running on my two Arch Linux installations (with an accompanying mkinitcpio patch) for several months over many kernel updates without any issues. Any additional testing and/or patch review would of course be appreciated. Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4a65d6b..a49f6b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,17 @@ AC_ARG_WITH([rootlibdir],
[], [with_rootlibdir=$libdir])
AC_SUBST([rootlibdir], [$with_rootlibdir])
+AC_ARG_WITH([zstd],
+ AS_HELP_STRING([--with-zstd], [handle Zstandard-compressed modules @<:@default=disabled@:>@]),
+ [], [with_zstd=no])
+AS_IF([test "x$with_zstd" != "xno"], [
+ PKG_CHECK_MODULES([libzstd], [libzstd >= 1.4.4])
+ AC_DEFINE([ENABLE_ZSTD], [1], [Enable Zstandard for modules.])
+], [
+ AC_MSG_NOTICE([Zstandard support not requested])
+])
+CC_FEATURE_APPEND([with_features], [with_zstd], [ZSTD])
+
AC_ARG_WITH([xz],
AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]),
[], [with_xz=no])
@@ -307,7 +318,7 @@ AC_MSG_RESULT([
tools: ${enable_tools}
python bindings: ${enable_python}
logging: ${enable_logging}
- compression: xz=${with_xz} zlib=${with_zlib}
+ compression: zstd=${with_zstd} xz=${with_xz} zlib=${with_zlib}
debug: ${enable_debug}
coverage: ${enable_coverage}
doc: ${enable_gtk_doc}