[backport] [R] Get CXX flags from R CMD config. (#8669) (#8680)

This commit is contained in:
Jiaming Yuan 2023-01-14 18:46:59 +08:00 committed by GitHub
parent e5bef4ffce
commit 021e6a842a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 984 additions and 848 deletions

1823
R-package/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,23 @@ AC_PREREQ(2.69)
AC_INIT([xgboost],[1.7.3],[],[xgboost],[])
# Use this line to set CC variable to a C compiler
AC_PROG_CC
: ${R_HOME=`R RHOME`}
if test -z "${R_HOME}"; then
echo "could not determine R_HOME"
exit 1
fi
CXX14=`"${R_HOME}/bin/R" CMD config CXX14`
CXX14STD=`"${R_HOME}/bin/R" CMD config CXX14STD`
CXX="${CXX14} ${CXX14STD}"
CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
CC=`"${R_HOME}/bin/R" CMD config CC`
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`
AC_LANG(C++)
### Check whether backtrace() is part of libc or the external lib libexecinfo
AC_MSG_CHECKING([Backtrace lib])