From a754dd9df68a1e5de3b7707050c70d2be9f0c59e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 20 May 2020 23:14:20 -0500 Subject: [PATCH 1/2] [R-package] Reduce duplication in configure.ac --- R-package/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R-package/configure.ac b/R-package/configure.ac index c683a9483e6d..ee583000a9af 100644 --- a/R-package/configure.ac +++ b/R-package/configure.ac @@ -33,7 +33,7 @@ then ac_pkg_openmp=no AC_MSG_CHECKING([whether OpenMP will work in a package]) AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include ]], [[ return (omp_get_max_threads() <= 1); ]])]) - ${CC} -o conftest conftest.c /usr/local/lib/libomp.dylib -Xclang -fopenmp 2>/dev/null && ./conftest && ac_pkg_openmp=yes + ${CC} -o conftest conftest.c ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes AC_MSG_RESULT([${ac_pkg_openmp}]) if test "${ac_pkg_openmp}" = no; then OPENMP_CXXFLAGS='' From d9a92f2ebc5734e00ee31e7ed4dd386286619133 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 May 2020 15:54:53 -0500 Subject: [PATCH 2/2] updated configure --- R-package/configure | 16 ++++++++++++++-- R-package/configure.ac | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/R-package/configure b/R-package/configure index 8dab660a1286..df0b87b78bb5 100755 --- a/R-package/configure +++ b/R-package/configure @@ -613,6 +613,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -682,6 +683,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -934,6 +936,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1071,7 +1082,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1224,6 +1235,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2713,7 +2725,7 @@ main () return 0; } _ACEOF - ${CC} -o conftest conftest.c /usr/local/lib/libomp.dylib -Xclang -fopenmp 2>/dev/null && ./conftest && ac_pkg_openmp=yes + ${CC} -o conftest conftest.c ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pkg_openmp}" >&5 $as_echo "${ac_pkg_openmp}" >&6; } if test "${ac_pkg_openmp}" = no; then diff --git a/R-package/configure.ac b/R-package/configure.ac index ee583000a9af..b8b8cddb6915 100644 --- a/R-package/configure.ac +++ b/R-package/configure.ac @@ -1,6 +1,6 @@ ### configure.ac -*- Autoconf -*- -AC_PREREQ(2.62) +AC_PREREQ(2.69) AC_INIT([xgboost],[0.6-3],[],[xgboost],[])