|
76 | 76 | cd "${owd}" |
77 | 77 | rm -rf "${BUILDDIR}" |
78 | 78 |
|
79 | | -# ## If the above checks failed, then perform other heuristics |
80 | | -# ## based on the compiler version, etc. |
81 | | -# if test x"${openmp_already_works}" = x"no"; then |
82 | | -# |
83 | | -# ## Check the C++ compiler using the CXX value set |
84 | | -# |
85 | | -# ## If it is g++, we have GXX set so let's examine it |
86 | | -# if test "${GXX}" = yes; then |
87 | | -# AC_MSG_CHECKING([whether g++ version is sufficient]) |
88 | | -# gxx_version=$(${CXX} -v 2>&1 | awk '/^.*g.. version/ {print $3}') |
89 | | -# case ${gxx_version} in |
90 | | -# 1.*|2.*|3.*|4.0.*|4.1.*|4.2.*|4.3.*|4.4.*|4.5.*|4.6.*|4.7.0|4.7.1) |
91 | | -# AC_MSG_RESULT([no]) |
92 | | -# AC_MSG_WARN([Only g++ version 4.7.2 or greater can be used with RcppArmadillo.]) |
93 | | -# AC_MSG_ERROR([Please use a different compiler.]) |
94 | | -# ;; |
95 | | -# 4.7.*|4.8.*|4.9.*|5.0*|5.1*|5.2*|5.3*) |
96 | | -# AC_MSG_RESULT([yes, but without OpenMP as version ${gxx_version} (Armadillo constraint)]) |
97 | | -# ## we know this one is bad |
98 | | -# can_use_openmp="no" |
99 | | -# ;; |
100 | | -# 5.4*|5.5*|5.6*|5.7*|5.8*|5.9*|6.*|7.*|8.*|9.*|1?.*) |
101 | | -# AC_MSG_RESULT([yes, with OpenMP as version ${gxx_version}]) |
102 | | -# ## we know this one is good, yay |
103 | | -# can_use_openmp="yes" |
104 | | -# ;; |
105 | | -# *) |
106 | | -# AC_MSG_RESULT([almost]) |
107 | | -# AC_MSG_WARN([Compiler self-identifies as being compliant with GNUC extensions but is not g++.]) |
108 | | -# ## we know nothing, so no |
109 | | -# can_use_openmp="no" |
110 | | -# ;; |
111 | | -# esac |
112 | | -# fi |
113 | | -# |
114 | | -# ## Check for Apple LLVM |
115 | | -# |
116 | | -# AC_MSG_CHECKING([for macOS]) |
117 | | -# RSysinfoName=$("${R_HOME}/bin/Rscript" --vanilla -e 'cat(Sys.info()[["sysname"]])') |
118 | | -# |
119 | | -# if test x"${RSysinfoName}" = x"Darwin"; then |
120 | | -# AC_MSG_RESULT([found]) |
121 | | -# AC_MSG_CHECKING([for macOS Apple compiler]) |
122 | | -# |
123 | | -# apple_compiler=$($CXX --version 2>&1 | grep -i -c -e 'apple llvm') |
124 | | -# |
125 | | -# if test x"${apple_compiler}" = x"1"; then |
126 | | -# AC_MSG_RESULT([found]) |
127 | | -# AC_MSG_WARN([OpenMP unavailable and turned off.]) |
128 | | -# can_use_openmp="no" |
129 | | -# else |
130 | | -# AC_MSG_RESULT([not found]) |
131 | | -# AC_MSG_CHECKING([for clang compiler]) |
132 | | -# clang_compiler=$($CXX --version 2>&1 | grep -i -c -e 'clang ') |
133 | | -# |
134 | | -# if test x"${clang_compiler}" = x"1"; then |
135 | | -# AC_MSG_RESULT([found]) |
136 | | -# AC_MSG_CHECKING([for OpenMP compatible version of clang]) |
137 | | -# clang_version=$(${CXX} -v 2>&1 | awk '/^.*clang version/ {print $3}') |
138 | | -# |
139 | | -# case ${clang_version} in |
140 | | -# 4.*|5.*|6.*|7.*|8.*|9.*|10.*|11.*) |
141 | | -# AC_MSG_RESULT([found and suitable]) |
142 | | -# can_use_openmp="yes" |
143 | | -# ;; |
144 | | -# *) |
145 | | -# AC_MSG_RESULT([not found]) |
146 | | -# AC_MSG_WARN([OpenMP unavailable and turned off.]) |
147 | | -# can_use_openmp="no" |
148 | | -# ;; |
149 | | -# esac |
150 | | -# else |
151 | | -# AC_MSG_RESULT([not found]) |
152 | | -# AC_MSG_WARN([unsupported macOS build detected; if anything breaks, you keep the pieces.]) |
153 | | -# fi |
154 | | -# fi |
155 | | -# else |
156 | | -# AC_MSG_RESULT([no]) |
157 | | -# fi |
158 | | -# |
159 | | -# fi # if test x"${openmp_already_works}" = x"no" |
160 | | - |
161 | | -# ## Check for suitable LAPACK_LIBS |
162 | | -# AC_MSG_CHECKING([LAPACK_LIBS]) |
163 | | -# |
164 | | -# ## external LAPACK has the required function |
165 | | -# lapack=$(${R_HOME}/bin/R CMD config LAPACK_LIBS) |
166 | | -# hasRlapack=$(echo ${lapack} | grep lRlapack) |
167 | | -# |
168 | | -# ## in what follows below we substitute both side of the define/undef |
169 | | -# ## while this may seem a little unusual we do it to fully reproduce the |
170 | | -# ## previous bash-based implementation |
171 | | -# |
172 | | -# if test x"${hasRlapack}" = x""; then |
173 | | -# ## We are using a full Lapack and can use zgbsv -- so #undef remains |
174 | | -# AC_MSG_RESULT([system LAPACK found]) |
175 | | -# ## arma_lapack="#undef ARMA_CRIPPLED_LAPACK" |
176 | | -# else |
177 | | -# ## We are using R's subset of Lapack and CANNOT use zgbsv etc, so we mark it |
178 | | -# AC_MSG_RESULT([R-supplied partial LAPACK found]) |
179 | | -# ## AC_MSG_WARN([Some complex-valued LAPACK functions may not be available]) |
180 | | -# ## arma_lapack="#define ARMA_CRIPPLED_LAPACK 1" |
181 | | -# fi |
182 | | -# |
183 | | -# ## Default the OpenMP flag to the empty string. |
184 | | -# ## If and only if OpenMP is found, expand to $(SHLIB_OPENMP_CXXFLAGS) |
185 | | -# openmp_flag="" |
186 | | -# |
187 | | -# ## Set the fallback, by default it is nope |
188 | | -# arma_have_openmp="#define ARMA_DONT_USE_OPENMP 1" |
189 | | -# |
190 | | -# if test x"${openmp_already_works}" = x"yes"; then |
191 | | -# arma_have_openmp="#define ARMA_USE_OPENMP 1" |
192 | | -# openmp_flag='$(SHLIB_OPENMP_CXXFLAGS)' |
193 | | -# fi |
194 | | - |
195 | 79 | ## Additional Apple check |
196 | 80 | AC_MSG_CHECKING([for macOS]) |
197 | 81 | RSysinfoName=$("${R_HOME}/bin/Rscript" --vanilla -e 'cat(Sys.info()[["sysname"]])') |
@@ -225,7 +109,6 @@ if test x"${can_use_openmp}" = x"yes"; then |
225 | 109 | fi |
226 | 110 |
|
227 | 111 | ## now use all these |
228 | | -## AC_SUBST([ARMA_LAPACK],["${arma_lapack}"]) |
229 | 112 | AC_SUBST([ARMA_HAVE_OPENMP], ["${arma_have_openmp}"]) |
230 | 113 | AC_SUBST([OPENMP_FLAG], ["${openmp_flag}"]) |
231 | 114 | AC_CONFIG_FILES([inst/include/RcppArmadillo/config/RcppArmadilloConfigGenerated.h src/Makevars]) |
|
0 commit comments