In commit f91e4863bc1382 we fixed an issue where LZ4_LIBS could be
overwritten in some situations. But on systems where lz4 is installed on
the system but is lacking pkg-config information, the linker will not know
about the lz4 library when completing the build.
This fixes the issue by explicitly setting LZ4_LIBS to contain -llz4
if pkg-config test was run and failed verifying the installed lz4 version
number. This also ensures that LZ4_LIBS will not be overwritten if it
has been provided on the ./configure command line.
Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20171002190732.12531-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15549.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
... | ... |
@@ -1093,7 +1093,9 @@ if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then |
1093 | 1093 |
PKG_CHECK_MODULES([LZ4], |
1094 | 1094 |
[liblz4 >= 1.7.1 liblz4 < 100], |
1095 | 1095 |
[have_lz4="yes"], |
1096 |
- [] # If this fails, we will do another test next |
|
1096 |
+ [LZ4_LIBS="-llz4"] # If this fails, we will do another test next. |
|
1097 |
+ # We also add set LZ4_LIBS otherwise the |
|
1098 |
+ # linker will not know about the lz4 library |
|
1097 | 1099 |
) |
1098 | 1100 |
fi |
1099 | 1101 |
|