subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From james...@apache.org
Subject svn commit: r1818807 - in /subversion/trunk: INSTALL build/ac-macros/lz4.m4
Date Wed, 20 Dec 2017 15:40:15 GMT
Author: jamessan
Date: Wed Dec 20 15:40:15 2017
New Revision: 1818807

URL: http://svn.apache.org/viewvc?rev=1818807&view=rev
Log:
Lower minimum required version of LZ4 to r120

* INSTALL
  (C.22.LZ4): Change minimum version to r120

* build/ac-macros/lz4.m4
  (SVN_LZ4): Change minimum version in "not found" error message to r120
  (SVN_LZ4_STD): Adjust version check to handle both version schemes and use
    120 as the minimum version.  Replace check for LZ4_versionString symbol
    with LZ4_versionNumber.
  (SVN_LZ4_PREFIX): Replace check for LZ4_decompress_safe symbol with
    LZ4_versionNumber.

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=1818807&r1=1818806&r2=1818807&view=diff
==============================================================================
--- subversion/trunk/INSTALL (original)
+++ subversion/trunk/INSTALL Wed Dec 20 15:40:15 2017
@@ -529,14 +529,14 @@ I.    INTRODUCTION
 
       22. LZ4 (OPTIONAL)
 
-      Subversion uses LZ4 compression libary version 1.7.5 or above. Configure
+      Subversion uses LZ4 compression libary version r120 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
 

Modified: subversion/trunk/build/ac-macros/lz4.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/lz4.m4?rev=1818807&r1=1818806&r2=1818807&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/lz4.m4 (original)
+++ subversion/trunk/build/ac-macros/lz4.m4 Wed Dec 20 15:40:15 2017
@@ -42,18 +42,24 @@ AC_DEFUN(SVN_LZ4,
       SVN_LZ4_PREFIX
     fi
     if test "$lz4_found" != "yes"; then
-      AC_MSG_ERROR([Subversion requires LZ4 >= 1.7.5, or use --with-lz4=internal])
+      AC_MSG_ERROR([Subversion requires LZ4 >= r120, or use --with-lz4=internal])
     fi
   fi
   AC_SUBST(SVN_LZ4_INCLUDES)
   AC_SUBST(SVN_LZ4_LIBS)
 ])
 
+dnl LZ4 changed versioning schemes after r131, the next version being 1.7.3, so
+dnl we need to check for both schemes.  We can't use "--atleast-version=1.7.3"
+dnl because that will result in a >= 1 check for the older versioning scheme.
+dnl Instead, fallback to --max-version=3 if the old scheme fails.  This gives a
+dnl little room for major version changes, but won't falsely identify old
+dnl versions as supported.
 AC_DEFUN(SVN_LZ4_STD,
 [
   if test -n "$PKG_CONFIG"; then
     AC_MSG_CHECKING([for lz4 library via pkg-config])
-    if $PKG_CONFIG liblz4 --atleast-version=1.7.5; then
+    if $PKG_CONFIG liblz4 --atleast-version=120 || $PKG_CONFIG liblz4 --max-version=3; then
       AC_MSG_RESULT([yes])
       lz4_found=yes
       SVN_LZ4_INCLUDES=`$PKG_CONFIG liblz4 --cflags`
@@ -65,7 +71,7 @@ AC_DEFUN(SVN_LZ4_STD,
   fi
   if test "$lz4_found" != "yes"; then
     AC_MSG_NOTICE([lz4 configuration without pkg-config])
-    AC_CHECK_LIB(lz4, LZ4_versionString, [
+    AC_CHECK_LIB(lz4, LZ4_versionNumber, [
       lz4_found=yes
       SVN_LZ4_LIBS="-llz4"
     ])
@@ -79,7 +85,7 @@ AC_DEFUN(SVN_LZ4_PREFIX,
   CPPFLAGS="$CPPFLAGS -I$lz4_prefix/include"
   save_ldflags="$LDFLAGS"
   LDFLAGS="$LDFLAGS -L$lz4_prefix/lib"
-  AC_CHECK_LIB(lz4, LZ4_decompress_safe, [
+  AC_CHECK_LIB(lz4, LZ4_versionNumber, [
     AC_MSG_RESULT([yes])
     lz4_found=yes
     SVN_LZ4_INCLUDES="-I$lz4_prefix/include"



Mime
View raw message