0001-Allow-building-with-mdds-1.2.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. From f6d14b3b510de5c50e45c98fe812a73ba00f3def Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
  3. Date: Thu, 9 Jun 2016 10:50:41 +0200
  4. Subject: [PATCH] Allow building with mdds-1.2
  5. Change-Id: If8791b4c1c3fbefdd06af345276e0a724dff5482
  6. ---
  7. configure.ac | 44 +++++++++++++++++++++++---------------------
  8. 1 file changed, 23 insertions(+), 21 deletions(-)
  9. diff --git a/configure.ac b/configure.ac
  10. index ca4bb07..bb946eb 100644
  11. --- a/configure.ac
  12. +++ b/configure.ac
  13. @@ -24,7 +24,7 @@ AC_LANG([C++])
  14. # Configure options
  15. # =================
  16. AC_ARG_WITH([mdds],
  17. - AS_HELP_STRING([--with-mdds=1.0|0.x], [Specify which version of mdds to use (1.0 is the default)]),
  18. + AS_HELP_STRING([--with-mdds=1.2|1.0|0.x], [Specify which version of mdds to use (1.0 is the default)]),
  19. [], [with_mdds="1.0"])
  20. # ===========================
  21. @@ -47,7 +47,7 @@ AC_PROG_SED
  22. AM_MISSING_PROG([GPERF], [gperf])
  23. -AS_IF([test "$with_mdds" = "1.0"], [AX_CXX_COMPILE_STDCXX_11([noext])])
  24. +AS_IF([test "$with_mdds" = "1.0" -o "$with_mdds" = "1.2" ], [AX_CXX_COMPILE_STDCXX_11([noext])])
  25. # ===============
  26. # Find librevenge
  27. @@ -138,25 +138,27 @@ AC_SUBST([GLM_CFLAGS])
  28. # =========
  29. # Find mdds
  30. # =========
  31. -AS_IF([test "$with_mdds" = "1.0"], [
  32. - PKG_CHECK_MODULES([MDDS], [mdds-1.0])
  33. -], [
  34. - PKG_CHECK_MODULES([MDDS], [mdds])
  35. - AC_MSG_CHECKING([checking if mdds::flat_segment_tree can store values of any type])
  36. - old_CPPFLAGS="$CPPFLAGS"
  37. - CPPFLAGS="$MDDS_CFLAGS $CPPFLAGS"
  38. - AC_COMPILE_IFELSE([AC_LANG_SOURCE([
  39. - #include <mdds/flat_segment_tree.hpp>
  40. - struct Value {};
  41. - mdds::flat_segment_tree<int, Value> tree(0, 4, Value());
  42. - ])], [
  43. - AC_MSG_RESULT([yes])
  44. - ], [
  45. - AC_MSG_RESULT([no])
  46. - AC_MSG_ERROR([please install mdds >= 0.12.1])
  47. - ])
  48. - CPPFLAGS="$old_CPPFLAGS"
  49. -])
  50. +AS_CASE(["$with_mdds"],
  51. + ["1.2"], [PKG_CHECK_MODULES([MDDS], [mdds-1.2])],
  52. + ["1.0"], [PKG_CHECK_MODULES([MDDS], [mdds-1.0])],
  53. + [
  54. + PKG_CHECK_MODULES([MDDS], [mdds])
  55. + AC_MSG_CHECKING([checking if mdds::flat_segment_tree can store values of any type])
  56. + old_CPPFLAGS="$CPPFLAGS"
  57. + CPPFLAGS="$MDDS_CFLAGS $CPPFLAGS"
  58. + AC_COMPILE_IFELSE([AC_LANG_SOURCE([
  59. + #include <mdds/flat_segment_tree.hpp>
  60. + struct Value {};
  61. + mdds::flat_segment_tree<int, Value> tree(0, 4, Value());
  62. + ])], [
  63. + AC_MSG_RESULT([yes])
  64. + ], [
  65. + AC_MSG_RESULT([no])
  66. + AC_MSG_ERROR([please install mdds >= 0.12.1])
  67. + ])
  68. + CPPFLAGS="$old_CPPFLAGS"
  69. + ]
  70. +)
  71. # =================================
  72. # Libtool/Version Makefile settings
  73. --
  74. 2.9.3