3 @@ -1077,68 +1077,15 @@ dnl
4 AC_ARG_VAR([LZ4_CFLAGS], [C compiler flags for lz4])
5 AC_ARG_VAR([LZ4_LIBS], [linker flags for lz4])
6 if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then
7 - if test -z "${LZ4_CFLAGS}" -a -z "${LZ4_LIBS}"; then
8 - # if the user did not explicitly specify flags, try to autodetect
9 - PKG_CHECK_MODULES([LZ4],
10 - [liblz4 >= 1.7.1 liblz4 < 100],
12 - [LZ4_LIBS="-llz4"] # If this fails, we will do another test next.
13 - # We also add set LZ4_LIBS otherwise the
14 - # linker will not know about the lz4 library
18 saved_CFLAGS="${CFLAGS}"
20 CFLAGS="${CFLAGS} ${LZ4_CFLAGS}"
21 LIBS="${LIBS} ${LZ4_LIBS}"
23 - # If pkgconfig check failed or LZ4_CFLAGS/LZ4_LIBS env vars
24 - # are used, check the version directly in the LZ4 include file
25 - if test "${have_lz4}" != "yes"; then
26 - AC_CHECK_HEADERS([lz4.h],
30 - if test "${have_lz4h}" = "yes" ; then
31 - AC_MSG_CHECKING([additionally if system LZ4 version >= 1.7.1])
37 -/* Version encoding: MMNNPP (Major miNor Patch) - see lz4.h for details */
38 -#if LZ4_VERSION_NUMBER < 10701L
39 -#error LZ4 is too old
47 - [AC_MSG_RESULT([system LZ4 library is too old])]
52 - # Double check we have a few needed functions
53 - if test "${have_lz4}" = "yes" ; then
55 - [LZ4_compress_default],
59 - [LZ4_decompress_safe],
64 - if test "${have_lz4}" != "yes" ; then
65 - AC_MSG_RESULT([ usable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
66 - AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
69 + AC_MSG_RESULT([ usable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
70 + AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
72 OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
73 OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
74 AC_DEFINE(ENABLE_LZ4, [1], [Enable LZ4 compression library])