summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2020-05-25 13:31:30 -0700
committerWayne Davison <wayne@opencoder.net>2020-05-25 13:44:48 -0700
commit4aaadc2f2970a22676df60be593c63fa37b49700 (patch)
treeb86728e1f65fa908cb332f7e1b89b356716fbcc1 /configure.ac
parentabef92c03767d0c5dc9070eba15805f0f7075e6c (diff)
downloadrsync-4aaadc2f2970a22676df60be593c63fa37b49700.tar.gz
Include zstd compression support.
Based on a patch by Sebastian A. Siewior. Fixes bug #14338.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index cbf93056..c6bd7d69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,7 +381,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \
popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h \
- zlib.h xxhash.h openssl/md4.h openssl/md5.h)
+ zlib.h xxhash.h openssl/md4.h openssl/md5.h zstd.h)
AC_HEADER_MAJOR_FIXED
AC_MSG_CHECKING([whether to enable use of openssl crypto library])
@@ -408,6 +408,18 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING([whether to enable zstd compression])
+AC_ARG_ENABLE([zstd],
+ AC_HELP_STRING([--disable-zstd], [disable zstd compression]))
+AH_TEMPLATE([SUPPORT_ZSTD],
+[Undefine if you do not want zstd compression. By default this is defined.])
+if test x"$enable_zstd" != x"no" && test x"$ac_cv_header_zstd_h" = x"yes"; then
+ AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS(ZSTD_minCLevel, zstd, [AC_DEFINE(SUPPORT_ZSTD)])
+else
+ AC_MSG_RESULT(no)
+fi
+
AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h>