summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--configure.ac6
-rw-r--r--include/comp_src.h.in6
-rw-r--r--include/manconfig.h.in1
4 files changed, 16 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 0f7c3d3f..9078e68c 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Major changes since man-db 2.9.1:
* Add a bug tracker link to man-db's own manual pages.
+ * Add support for zstd-compressed manual pages, thanks to Bernhard
+ Rosenkränzer.
+
man-db 2.9.1 (25 February 2020)
===============================
diff --git a/configure.ac b/configure.ac
index 3406c5e6..5aefa5c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -327,6 +327,11 @@ if test -n "$lzip"
then
unlzip="$lzip -dc"
fi
+MAN_CHECK_PROGS([zstd], [ZSTD], [use ZSTD as zstd compression utility], [zstd])
+if test -n "$zstd"
+then
+ unzstd="$zstd -dc"
+fi
if test -n "$compressor"
then
AC_DEFINE([COMP_CAT], [1], [Define if you have compressors and want to support compressed cat files.])
@@ -339,6 +344,7 @@ AC_SUBST([bunzip2])
AC_SUBST([unlzma])
AC_SUBST([unxz])
AC_SUBST([unlzip])
+AC_SUBST([unzstd])
MAN_COMPRESS_LIB([z], [gzopen])
dnl To add more decompressors just follow the scheme above.
diff --git a/include/comp_src.h.in b/include/comp_src.h.in
index d3ef8901..bc5d6016 100644
--- a/include/comp_src.h.in
+++ b/include/comp_src.h.in
@@ -77,6 +77,12 @@ struct compression comp_list[] = {
{UNLZIP, "lz", NULL},
#endif /* HAVE_LZIP */
+/* If we have zstd, incorporate the following */
+#ifdef HAVE_ZSTD
+ {UNZSTD, "zst", NULL},
+ {UNZSTD, "zstd", NULL},
+#endif /* HAVE_ZSTD */
+
/*------------------------------------------------------*/
/* Add your decompressor(s) and extension(s) below here */
/*------------------------------------------------------*/
diff --git a/include/manconfig.h.in b/include/manconfig.h.in
index 859970f3..6992d979 100644
--- a/include/manconfig.h.in
+++ b/include/manconfig.h.in
@@ -225,6 +225,7 @@
#define UNLZMA "@unlzma@"
#define UNXZ "@unxz@"
#define UNLZIP "@unlzip@"
+#define UNZSTD "@unzstd@"
/*-----------------------------------------------------------------------*/
/* The things below here shouldn't really be changed unless you really */