|
Jan Synacek |
eaf2f3 |
From 047be3e733cff7717ccd49d6422ea0002bd0c515 Mon Sep 17 00:00:00 2001
|
|
Jan Synacek |
eaf2f3 |
From: Jan Synacek <jsynacek@redhat.com>
|
|
Jan Synacek |
eaf2f3 |
Date: Mon, 16 Jan 2017 13:00:03 +0100
|
|
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
|
|
Jan Synacek |
eaf2f3 |
(1.7.3 follows 131, to match the so version). PKG_CHECK_MODULES does
|
|
Jan Synacek |
eaf2f3 |
not allow two version matches for the same package, so e.g. lz4 < 10 ||
|
|
Jan Synacek |
eaf2f3 |
lz4 >= 125 cannot be used. Check twice, once for "new" numbers (anything
|
|
Jan Synacek |
eaf2f3 |
below 10 is assume to be new), once for the "old" numbers (anything
|
|
Jan Synacek |
eaf2f3 |
above >= 125). This assumes that the "new" versioning will not get to 10
|
|
Jan Synacek |
eaf2f3 |
to quickly. I think that's a safe assumption, lz4 is a mature project.
|
|
Jan Synacek |
eaf2f3 |
|
|
Jan Synacek |
eaf2f3 |
Fixed #4690.
|
|
Jan Synacek |
eaf2f3 |
|
|
Jan Synacek |
eaf2f3 |
Cherry-picked from
|
|
Jan Synacek |
eaf2f3 |
https://github.com/systemd/systemd/commit/3d4cf7de48a74726694abbaa09f9804b845ff3ba
|
|
Jan Synacek |
eaf2f3 |
|
|
Jan Synacek |
eaf2f3 |
Resolves: #1404406
|
|
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
|
|
Jan Synacek |
eaf2f3 |
index cf595e6..4a0b269 100644
|
|
Jan Synacek |
eaf2f3 |
--- a/configure.ac
|
|
Jan Synacek |
eaf2f3 |
+++ b/configure.ac
|
|
Jan Synacek |
eaf2f3 |
@@ -602,10 +602,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 |
])
|
|
Jan Synacek |
eaf2f3 |
--
|
|
Jan Synacek |
eaf2f3 |
2.9.3
|
|
Jan Synacek |
eaf2f3 |
|