Hi,

On Thu, Sep 07, 2017 at 07:20:04PM +0200, David Sommerseth wrote:
> We are using a deprecated function, LZ4_compress_limitedOutput(), which
> will be removed with time.  The correct function to use is 
> LZ4_compress_default().
> Both function takes the same number of arguments and data types, so the change
> is minimal.
> 
> This patch will also enforce the system LZ4 library to be at least v1.7.1.  If
> the system library is not found or it is older, it will be build using the 
> bundled
> LZ4 library.  The version number requirement is based on the LZ4 version we 
> ship.
> 
> The changes in configure.ac for the version check is modelled around the same
> approach we use for OpenSSL.  Plus it does a few minor reformats and 
> improvements
> to comply with more recommend autoconf coding style.
> 
> This patch is a result of the discussions in this mail thread:
> https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14135.html
> 
> Signed-off-by: David Sommerseth <dav...@openvpn.net>
> 
> ---
> v2 - Don't use LZ4 version based #ifdef wrapper function
>      Do the LZ4 version check in ./configure

This looks good to me.

I have tested on

 - FreeBSD with lz4 installed, lz4.pc -> uses system lib
 - FreeBSD with lz4 installed, no lz4.pc, lz4 stuff in LZ4_CFLAGS/LIBS 
                                      -> uses system lib
 - FreeBSD with lz4 installed, but not in include path
                                      -> uses compat-lz4.*
 - Gentoo Linux with lz4 installed, lz4.pc 
                                      -> uses system lib
 - Gentoo Linux with lz4 installed, no lz4.pc, but lz4 in /usr/{include,lib}/
                                      -> uses system lib
 - Gentoo Linux with no lz4 installed -> uses compat-lz4.*

In all cases, the system builds and produces a working openvpn binary.

The messages in case "2" and "5" are slightly weird, though...

(2)
checking lz4.h usability... yes
checking lz4.h presence... no
configure: WARNING: lz4.h: accepted by the compiler, rejected by the 
preprocessor!
configure: WARNING: lz4.h: proceeding with the compiler's result
checking for lz4.h... yes
checking additionally if system LZ4 version >= 1.7.1... ok

(5)
checking for LZ4... no
checking lz4.h usability... yes
checking lz4.h presence... yes
checking for lz4.h... yes
checking additionally if system LZ4 version >= 1.7.1... ok
checking for LZ4_compress in -llz4... yes

(but this is configure...)


There's an extra added blank line in comp-lz4.c and the bracket whitespace 
Antonio complained about - but those can be fixed on commit.

So, ACK.  Thanks for wading through this.

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to