Author: astieger
Date: Tue Dec 19 11:47:13 2017
New Revision: 1818662
URL: http://svn.apache.org/viewvc?rev=1818662&view=rev
Log:
Follow-up to r1803127, improve system lz4 version detection
* build/ac-macros/lz4.m4
(SVN_LZ4_STD): Check for 1.7.5 version with pkg-config,
remove AC_MSG_RESULT from AC_CHECK_LIB, add missing "no",
check for LZ4_versionString in fallback, fall back correctly
* INSTALL: note versions and configure options
Modified:
subversion/trunk/INSTALL
subversion/trunk/build/ac-macros/lz4.m4
Modified: subversion/trunk/INSTALL
URL:
http://svn.apache.org/viewvc/subversion/trunk/INSTALL?rev=1818662&r1=1818661&r2=1818662&view=diff
==============================================================================
--- subversion/trunk/INSTALL (original)
+++ subversion/trunk/INSTALL Tue Dec 19 11:47:13 2017
@@ -527,6 +527,19 @@ I. INTRODUCTION
$ ./get-dep.sh gmock
+ 22. LZ4 (OPTIONAL)
+
+ Subversion uses LZ4 compression libary version 1.7.5 or above. Configure
+ will attempt to locate the system library by default using pkg-config
+ and known paths.
+
+ If it is installed in a non-standard location, then use:
+
+ --with-lz4=/path/to/liblz3
+
+ If configure should use the version bundled with the sources, use:
+ --with-lz4=internal
+
D. Documentation
The primary documentation for Subversion is the free book
Modified: subversion/trunk/build/ac-macros/lz4.m4
URL:
http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/lz4.m4?rev=1818662&r1=1818661&r2=1818662&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/lz4.m4 (original)
+++ subversion/trunk/build/ac-macros/lz4.m4 Tue Dec 19 11:47:13 2017
@@ -42,7 +42,7 @@ AC_DEFUN(SVN_LZ4,
SVN_LZ4_PREFIX
fi
if test "$lz4_found" != "yes"; then
- AC_MSG_ERROR([Subversion requires LZ4])
+ AC_MSG_ERROR([Subversion requires LZ4 >= 1.7.5, or use
--with-lz4=internal])
fi
fi
AC_SUBST(SVN_LZ4_INCLUDES)
@@ -53,17 +53,19 @@ AC_DEFUN(SVN_LZ4_STD,
[
if test -n "$PKG_CONFIG"; then
AC_MSG_CHECKING([for lz4 library via pkg-config])
- if $PKG_CONFIG liblz4 --exists; then
+ if $PKG_CONFIG liblz4 --atleast-version=1.7.5; then
AC_MSG_RESULT([yes])
lz4_found=yes
SVN_LZ4_INCLUDES=`$PKG_CONFIG liblz4 --cflags`
SVN_LZ4_LIBS=`$PKG_CONFIG liblz4 --libs`
SVN_LZ4_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($SVN_LZ4_LIBS)`"
+ else
+ AC_MSG_RESULT([no])
fi
- else
+ fi
+ if test "$lz4_found" != "yes"; then
AC_MSG_NOTICE([lz4 configuration without pkg-config])
- AC_CHECK_LIB(lz4, LZ4_decompress_safe, [
- AC_MSG_RESULT([yes])
+ AC_CHECK_LIB(lz4, LZ4_versionString, [
lz4_found=yes
SVN_LZ4_LIBS="-llz4"
])