summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2020-05-25 13:43:25 -0700
committerWayne Davison <wayne@opencoder.net>2020-05-25 13:45:56 -0700
commitc394e861845682d23b6dd6b9114d763fc8c493a8 (patch)
tree2909b7056b8e832c1938bdb026e5f1429c89a918 /configure.ac
parent4aaadc2f2970a22676df60be593c63fa37b49700 (diff)
downloadrsync-c394e861845682d23b6dd6b9114d763fc8c493a8.tar.gz
Include lz4 compression support.
Based on a patch that was emailed to me without a valid return address.
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 c6bd7d69..2b65ef9d 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 zstd.h)
+ zlib.h xxhash.h openssl/md4.h openssl/md5.h zstd.h lz4.h)
AC_HEADER_MAJOR_FIXED
AC_MSG_CHECKING([whether to enable use of openssl crypto library])
@@ -420,6 +420,18 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING([whether to enable LZ4 compression])
+AC_ARG_ENABLE([lz4],
+ AC_HELP_STRING([--disable-lz4], [disable LZ4 compression]))
+AH_TEMPLATE([SUPPORT_LZ4],
+[Undefine if you do not want LZ4 compression. By default this is defined.])
+if test x"$enable_lz4" != x"no" && test x"$ac_cv_header_lz4_h" = x"yes"; then
+ AC_MSG_RESULT(yes)
+ AC_SEARCH_LIBS(LZ4_compress, lz4, [AC_DEFINE(SUPPORT_LZ4)])
+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>