openvpn: update to 2.4.3
[openwrt/openwrt.git] / package / network / services / openvpn / patches / 210-build_always_use_internal_lz4.patch
1 --- a/configure.ac
2 +++ b/configure.ac
3 @@ -1076,37 +1076,14 @@ 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 - AC_CHECKING([for LZ4 Library and Header files])
8 - havelz4lib=1
9
10 - # if LZ4_LIBS is set, we assume it will work, otherwise test
11 - if test -z "${LZ4_LIBS}"; then
12 - AC_CHECK_LIB(lz4, LZ4_compress,
13 - [ LZ4_LIBS="-llz4" ],
14 - [
15 - AC_MSG_RESULT([LZ4 library not found.])
16 - havelz4lib=0
17 - ])
18 - fi
19 + AC_MSG_RESULT([Using LZ4 library in src/compat/compat-lz4.*])
20 + AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
21 + LZ4_LIBS=""
22
23 - saved_CFLAGS="${CFLAGS}"
24 - CFLAGS="${CFLAGS} ${LZ4_CFLAGS}"
25 - AC_CHECK_HEADERS(lz4.h,
26 - ,
27 - [
28 - AC_MSG_RESULT([LZ4 headers not found.])
29 - havelz4lib=0
30 - ])
31 -
32 - if test $havelz4lib = 0 ; then
33 - AC_MSG_RESULT([LZ4 library or header not found, using version in src/compat/compat-lz4.*])
34 - AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
35 - LZ4_LIBS=""
36 - fi
37 OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
38 OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
39 AC_DEFINE(ENABLE_LZ4, 1, [Enable LZ4 compression library])
40 - CFLAGS="${saved_CFLAGS}"
41 fi
42
43