From 3b5142257f90ae82828f15e0531d5c3862dc20b9 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Thu, 15 Mar 2018 12:18:38 -0700
Subject: [PATCH 4/5] Fix configure check for OpenMP on macOS

RBIN was not getting set.
---
 R-package/configure    |  8 ++++++++
 R-package/configure.ac | 10 +++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/R-package/configure b/R-package/configure
index 6c14550c..46fbe6da 100755
--- a/R-package/configure
+++ b/R-package/configure
@@ -1663,6 +1663,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+# find R home and set CC/CFLAGS
+: ${R_HOME=`R RHOME`}
+if test -z "${R_HOME}"; then
+  echo "could not determine R_HOME"
+  exit 1
+fi
+RBIN="${R_HOME}/bin/R"
+
 OPENMP_CXXFLAGS=""
 
 if test `uname -s` = "Linux"
diff --git a/R-package/configure.ac b/R-package/configure.ac
index a2a05d22..1bee0b92 100644
--- a/R-package/configure.ac
+++ b/R-package/configure.ac
@@ -2,7 +2,15 @@
 
 AC_PREREQ(2.62)
 
-AC_INIT([xgboost],[0.6-3],[],[xgboost],[])
+AC_INIT([xgboost],[0.7-0],[],[xgboost],[])
+
+# find R home and set CC/CFLAGS
+: ${R_HOME=`R RHOME`}
+if test -z "${R_HOME}"; then
+  echo "could not determine R_HOME"
+  exit 1
+fi
+RBIN="${R_HOME}/bin/R"
 
 OPENMP_CXXFLAGS=""
 
-- 
2.17.1

