aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch')
-rw-r--r--package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch b/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch
new file mode 100644
index 0000000000..67191076d5
--- /dev/null
+++ b/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch
@@ -0,0 +1,41 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1014,37 +1014,14 @@ dnl
+ AC_ARG_VAR([LZ4_CFLAGS], [C compiler flags for lz4])
+ AC_ARG_VAR([LZ4_LIBS], [linker flags for lz4])
+ if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then
+- AC_CHECKING([for LZ4 Library and Header files])
+- havelz4lib=1
+
+- # if LZ4_LIBS is set, we assume it will work, otherwise test
+- if test -z "${LZ4_LIBS}"; then
+- AC_CHECK_LIB(lz4, LZ4_compress,
+- [ LZ4_LIBS="-llz4" ],
+- [
+- AC_MSG_RESULT([LZ4 library not found.])
+- havelz4lib=0
+- ])
+- fi
++ AC_MSG_RESULT([Using LZ4 library in src/compat/compat-lz4.*])
++ AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
++ LZ4_LIBS=""
+
+- saved_CFLAGS="${CFLAGS}"
+- CFLAGS="${CFLAGS} ${LZ4_CFLAGS}"
+- AC_CHECK_HEADERS(lz4.h,
+- ,
+- [
+- AC_MSG_RESULT([LZ4 headers not found.])
+- havelz4lib=0
+- ])
+-
+- if test $havelz4lib = 0 ; then
+- AC_MSG_RESULT([LZ4 library or header not found, using version in src/compat/compat-lz4.*])
+- AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
+- LZ4_LIBS=""
+- fi
+ OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
+ OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
+ AC_DEFINE(ENABLE_LZ4, 1, [Enable LZ4 compression library])
+- CFLAGS="${saved_CFLAGS}"
+ fi