|
Zbigniew Jędrzejewski-Szmek |
5d6eed |
From 25cd9391929a46f1f38daf6aa4421de6a1afc47e Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
Date: Wed, 23 Nov 2016 10:18:30 -0500
|
|
Jan Synacek |
eaf2f3 |
Subject: [PATCH] build-sys: check for lz4 in the old and new numbering scheme
|
|
Jan Synacek |
eaf2f3 |
(#4717)
|
|
Jan Synacek |
eaf2f3 |
|
|
Jan Synacek |
eaf2f3 |
lz4 upstream decided to switch to an incompatible numbering scheme
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
(1.7.3 follows 131, to match the so version).
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
PKG_CHECK_MODULES does not allow two version matches for the same package,
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
so e.g. lz4 < 10 || lz4 >= 125 cannot be used. Check twice, once for
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
"new" numbers (anything below 10 is assume to be new), once for the "old"
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
numbers (anything above >= 125). This assumes that the "new" versioning
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
will not get to 10 to quickly. I think that's a safe assumption, lz4 is a
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
mature project.
|
|
Jan Synacek |
eaf2f3 |
|
|
Jan Synacek |
eaf2f3 |
Fixed #4690.
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
(cherry picked from commit 3d4cf7de48a74726694abbaa09f9804b845ff3ba)
|
|
Jan Synacek |
eaf2f3 |
---
|
|
Jan Synacek |
eaf2f3 |
configure.ac | 9 ++++++---
|
|
Jan Synacek |
eaf2f3 |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
Jan Synacek |
eaf2f3 |
|
|
Jan Synacek |
eaf2f3 |
diff --git a/configure.ac b/configure.ac
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
index 0b10fc7de7..1928e65bde 100644
|
|
Jan Synacek |
eaf2f3 |
--- a/configure.ac
|
|
Jan Synacek |
eaf2f3 |
+++ b/configure.ac
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
@@ -623,10 +623,13 @@ AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
|
|
Jan Synacek |
eaf2f3 |
have_lz4=no
|
|
Jan Synacek |
eaf2f3 |
AC_ARG_ENABLE(lz4, AS_HELP_STRING([--disable-lz4], [Disable optional LZ4 support]))
|
|
Jan Synacek |
eaf2f3 |
AS_IF([test "x$enable_lz4" != "xno"], [
|
|
Jan Synacek |
eaf2f3 |
- PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
|
|
Jan Synacek |
eaf2f3 |
- [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available])
|
|
Jan Synacek |
eaf2f3 |
+ PKG_CHECK_MODULES(LZ4, [ liblz4 < 10 ],
|
|
Jan Synacek |
eaf2f3 |
+ [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
|
|
Jan Synacek |
eaf2f3 |
have_lz4=yes],
|
|
Jan Synacek |
eaf2f3 |
- have_lz4=no)
|
|
Jan Synacek |
eaf2f3 |
+ [PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
|
|
Jan Synacek |
eaf2f3 |
+ [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
|
|
Jan Synacek |
eaf2f3 |
+ have_lz4=yes],
|
|
Jan Synacek |
eaf2f3 |
+ have_lz4=no)])
|
|
Jan Synacek |
eaf2f3 |
AS_IF([test "x$have_lz4" = xno -a "x$enable_lz4" = xyes],
|
|
Jan Synacek |
eaf2f3 |
[AC_MSG_ERROR([*** LZ4 support requested but libraries not found])])
|
|
Jan Synacek |
eaf2f3 |
])
|