232-0001-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 63621678f44325b4c48574f9c9d7a3c499d1a608 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
  3. Date: Wed, 23 Nov 2016 10:18:30 -0500
  4. Subject: [PATCH 1/2] build-sys: check for lz4 in the old and new numbering
  5. scheme (#4717)
  6. lz4 upstream decided to switch to an incompatible numbering scheme
  7. (1.7.3 follows 131, to match the so version).
  8. PKG_CHECK_MODULES does not allow two version matches for the same package,
  9. so e.g. lz4 < 10 || lz4 >= 125 cannot be used. Check twice, once for
  10. "new" numbers (anything below 10 is assume to be new), once for the "old"
  11. numbers (anything above >= 125). This assumes that the "new" versioning
  12. will not get to 10 to quickly. I think that's a safe assumption, lz4 is a
  13. mature project.
  14. Fixed #4690.
  15. ---
  16. configure.ac | 9 ++++++---
  17. 1 file changed, 6 insertions(+), 3 deletions(-)
  18. diff --git a/configure.ac b/configure.ac
  19. index 0b10fc7de..1928e65bd 100644
  20. --- a/configure.ac
  21. +++ b/configure.ac
  22. @@ -623,10 +623,13 @@ AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
  23. have_lz4=no
  24. AC_ARG_ENABLE(lz4, AS_HELP_STRING([--disable-lz4], [Disable optional LZ4 support]))
  25. AS_IF([test "x$enable_lz4" != "xno"], [
  26. - PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
  27. - [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available])
  28. + PKG_CHECK_MODULES(LZ4, [ liblz4 < 10 ],
  29. + [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
  30. have_lz4=yes],
  31. - have_lz4=no)
  32. + [PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
  33. + [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
  34. + have_lz4=yes],
  35. + have_lz4=no)])
  36. AS_IF([test "x$have_lz4" = xno -a "x$enable_lz4" = xyes],
  37. [AC_MSG_ERROR([*** LZ4 support requested but libraries not found])])
  38. ])
  39. --
  40. 2.11.0