summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2015-12-31 10:07:17 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2015-12-31 10:07:17 +0000
commit31c14638d661559cfb5aeda90c6854eb25934c39 (patch)
treee543787c6e62810d4d975e27325e37fba47d784e
parentTranslations. Ukrainian translation update. (diff)
downloadinkscape-31c14638d661559cfb5aeda90c6854eb25934c39.tar.gz
inkscape-31c14638d661559cfb5aeda90c6854eb25934c39.zip
Enable build with old libgc version
Fixed bugs: - https://launchpad.net/bugs/1530286 (bzr r14558)
-rw-r--r--configure.ac12
-rw-r--r--src/inkgc/gc.cpp6
2 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 973166082..30aed6224 100644
--- a/configure.ac
+++ b/configure.ac
@@ -721,6 +721,18 @@ PKG_CHECK_MODULES(INKSCAPE,
pangoft2 >= 1.24
)
+dnl See if we are able to use new libgc API. This test should be removed and
+dnl the version number in the INKSCAPE test above should be bumped to >= 7.2
+dnl once all supported platforms have the required library version.
+dnl See bug #1530286.
+PKG_CHECK_MODULES(GC_7_2, bdw-gc >= 7.2, with_gc_7_2=yes, with_gc_7_2=no)
+
+if test "x$with_gc_7_2" = "xyes"; then
+ AC_DEFINE(WITH_GC_7_2, 1, [Build with GC 7.2 or higher])
+else
+ AC_MSG_WARN([Using an old version of libgc. Please consider upgrading to version 7.2 or newer.])
+fi
+
dnl *********************************
dnl Allow experimental GTK+3 build
dnl *********************************
diff --git a/src/inkgc/gc.cpp b/src/inkgc/gc.cpp
index ffa94ea2a..9372ac693 100644
--- a/src/inkgc/gc.cpp
+++ b/src/inkgc/gc.cpp
@@ -28,9 +28,15 @@ void display_warning(char *msg, GC_word arg) {
}
void do_init() {
+#if WITH_GC_7_2
GC_set_no_dls(1);
GC_set_all_interior_pointers(1);
GC_set_finalize_on_demand(0);
+#else
+ GC_no_dls = 1;
+ GC_all_interior_pointers = 1;
+ GC_finalize_on_demand = 0;
+#endif
GC_INIT();