3 @@ -1068,62 +1068,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],
12 - [] # If this fails, we will do another test next
16 saved_CFLAGS="${CFLAGS}"
18 CFLAGS="${CFLAGS} ${LZ4_CFLAGS}"
19 LIBS="${LIBS} ${LZ4_LIBS}"
21 - # If pkgconfig check failed or LZ4_CFLAGS/LZ4_LIBS env vars
22 - # are used, check the version directly in the LZ4 include file
23 - if test "${have_lz4}" != "yes"; then
24 - AC_CHECK_HEADERS([lz4.h],
28 - if test "${have_lz4h}" = "yes" ; then
29 - AC_MSG_CHECKING([additionally if system LZ4 version >= 1.7.1])
35 -/* Version encoding: MMNNPP (Major miNor Patch) - see lz4.h for details */
36 -#if LZ4_VERSION_NUMBER < 10701L
37 -#error LZ4 is too old
45 - [AC_MSG_RESULT([system LZ4 library is too old])]
50 - # if LZ4_LIBS is set, we assume it will work, otherwise test
51 - if test -z "${LZ4_LIBS}"; then
58 - if test "${have_lz4}" != "yes" ; then
59 - AC_MSG_RESULT([ usuable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
60 - AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
63 + AC_MSG_RESULT([ usuable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
64 + AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
66 OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
67 OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
68 AC_DEFINE(ENABLE_LZ4, [1], [Enable LZ4 compression library])