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

This commit is contained in:
Jiaming Yuan 2023-01-14 16:48:21 +08:00 committed by GitHub
parent 07cf3d3e53
commit f7a2f52136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 378 additions and 799 deletions

1158
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],[2.0.0],[],[xgboost],[]) AC_INIT([xgboost],[2.0.0],[],[xgboost],[])
# Use this line to set CC variable to a C compiler : ${R_HOME=`R RHOME`}
AC_PROG_CC 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 ### Check whether backtrace() is part of libc or the external lib libexecinfo
AC_MSG_CHECKING([Backtrace lib]) AC_MSG_CHECKING([Backtrace lib])