From d3cb26c3301459fa29029e45a6ff6bc340a04563 Mon Sep 17 00:00:00 2001
From: Lukas Stadler <lukas.stadler@oracle.com>
Date: Wed, 25 Jan 2017 14:53:59 +0100
Subject: [PATCH] fix zlib version check

---
 com.oracle.truffle.r.native/gnur/Makefile.gnur | 1 +
 com.oracle.truffle.r.native/gnur/edconfigure   | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 com.oracle.truffle.r.native/gnur/edconfigure

diff --git a/com.oracle.truffle.r.native/gnur/Makefile.gnur b/com.oracle.truffle.r.native/gnur/Makefile.gnur
index 4b9f8580e4..4fc3a0637a 100644
--- a/com.oracle.truffle.r.native/gnur/Makefile.gnur
+++ b/com.oracle.truffle.r.native/gnur/Makefile.gnur
@@ -68,6 +68,7 @@ all: Makefile $(GNUR_HOME) iconv config build
 
 $(GNUR_HOME): 
 	tar xf $(TOPDIR)/../libdownloads/R-$(R_VERSION).tar.gz
+	ed $(GNUR_HOME)/configure < edconfigure # to fix the zlib version check (fixed in GNUR in the meantime)
 
 
 # After this platform check, GNUR_CONFIG_FLAGS must be set
diff --git a/com.oracle.truffle.r.native/gnur/edconfigure b/com.oracle.truffle.r.native/gnur/edconfigure
new file mode 100644
index 0000000000..ba5c8bbaf6
--- /dev/null
+++ b/com.oracle.truffle.r.native/gnur/edconfigure
@@ -0,0 +1,9 @@
+35510,35513c
+#ifdef ZLIB_VERNUM
+  if (ZLIB_VERNUM < 0x1250) {
+    exit(1);
+  }
+  exit(0);
+.
+w
+q
-- 
GitLab