Skip to content

Commit cfe38fb

Browse files
committed
Remove commented-out code from configure.ac
1 parent 653fa3d commit cfe38fb

File tree

4 files changed

+2
-234
lines changed

4 files changed

+2
-234
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* configure: Idem
77

88
* inst/include/current/: Sync with Armadillo 15.2
9+
910
2025-10-18 Dirk Eddelbuettel <[email protected]>
1011

1112
* configure.ac: Simplified OpenMP setup

configure

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -3278,122 +3278,6 @@ fi
32783278
cd "${owd}"
32793279
rm -rf "${BUILDDIR}"
32803280

3281-
# ## If the above checks failed, then perform other heuristics
3282-
# ## based on the compiler version, etc.
3283-
# if test x"${openmp_already_works}" = x"no"; then
3284-
#
3285-
# ## Check the C++ compiler using the CXX value set
3286-
#
3287-
# ## If it is g++, we have GXX set so let's examine it
3288-
# if test "${GXX}" = yes; then
3289-
# AC_MSG_CHECKING([whether g++ version is sufficient])
3290-
# gxx_version=$(${CXX} -v 2>&1 | awk '/^.*g.. version/ {print $3}')
3291-
# case ${gxx_version} in
3292-
# 1.*|2.*|3.*|4.0.*|4.1.*|4.2.*|4.3.*|4.4.*|4.5.*|4.6.*|4.7.0|4.7.1)
3293-
# AC_MSG_RESULT([no])
3294-
# AC_MSG_WARN([Only g++ version 4.7.2 or greater can be used with RcppArmadillo.])
3295-
# AC_MSG_ERROR([Please use a different compiler.])
3296-
# ;;
3297-
# 4.7.*|4.8.*|4.9.*|5.0*|5.1*|5.2*|5.3*)
3298-
# AC_MSG_RESULT([yes, but without OpenMP as version ${gxx_version} (Armadillo constraint)])
3299-
# ## we know this one is bad
3300-
# can_use_openmp="no"
3301-
# ;;
3302-
# 5.4*|5.5*|5.6*|5.7*|5.8*|5.9*|6.*|7.*|8.*|9.*|1?.*)
3303-
# AC_MSG_RESULT([yes, with OpenMP as version ${gxx_version}])
3304-
# ## we know this one is good, yay
3305-
# can_use_openmp="yes"
3306-
# ;;
3307-
# *)
3308-
# AC_MSG_RESULT([almost])
3309-
# AC_MSG_WARN([Compiler self-identifies as being compliant with GNUC extensions but is not g++.])
3310-
# ## we know nothing, so no
3311-
# can_use_openmp="no"
3312-
# ;;
3313-
# esac
3314-
# fi
3315-
#
3316-
# ## Check for Apple LLVM
3317-
#
3318-
# AC_MSG_CHECKING([for macOS])
3319-
# RSysinfoName=$("${R_HOME}/bin/Rscript" --vanilla -e 'cat(Sys.info()[["sysname"]])')
3320-
#
3321-
# if test x"${RSysinfoName}" = x"Darwin"; then
3322-
# AC_MSG_RESULT([found])
3323-
# AC_MSG_CHECKING([for macOS Apple compiler])
3324-
#
3325-
# apple_compiler=$($CXX --version 2>&1 | grep -i -c -e 'apple llvm')
3326-
#
3327-
# if test x"${apple_compiler}" = x"1"; then
3328-
# AC_MSG_RESULT([found])
3329-
# AC_MSG_WARN([OpenMP unavailable and turned off.])
3330-
# can_use_openmp="no"
3331-
# else
3332-
# AC_MSG_RESULT([not found])
3333-
# AC_MSG_CHECKING([for clang compiler])
3334-
# clang_compiler=$($CXX --version 2>&1 | grep -i -c -e 'clang ')
3335-
#
3336-
# if test x"${clang_compiler}" = x"1"; then
3337-
# AC_MSG_RESULT([found])
3338-
# AC_MSG_CHECKING([for OpenMP compatible version of clang])
3339-
# clang_version=$(${CXX} -v 2>&1 | awk '/^.*clang version/ {print $3}')
3340-
#
3341-
# case ${clang_version} in
3342-
# 4.*|5.*|6.*|7.*|8.*|9.*|10.*|11.*)
3343-
# AC_MSG_RESULT([found and suitable])
3344-
# can_use_openmp="yes"
3345-
# ;;
3346-
# *)
3347-
# AC_MSG_RESULT([not found])
3348-
# AC_MSG_WARN([OpenMP unavailable and turned off.])
3349-
# can_use_openmp="no"
3350-
# ;;
3351-
# esac
3352-
# else
3353-
# AC_MSG_RESULT([not found])
3354-
# AC_MSG_WARN([unsupported macOS build detected; if anything breaks, you keep the pieces.])
3355-
# fi
3356-
# fi
3357-
# else
3358-
# AC_MSG_RESULT([no])
3359-
# fi
3360-
#
3361-
# fi # if test x"${openmp_already_works}" = x"no"
3362-
3363-
# ## Check for suitable LAPACK_LIBS
3364-
# AC_MSG_CHECKING([LAPACK_LIBS])
3365-
#
3366-
# ## external LAPACK has the required function
3367-
# lapack=$(${R_HOME}/bin/R CMD config LAPACK_LIBS)
3368-
# hasRlapack=$(echo ${lapack} | grep lRlapack)
3369-
#
3370-
# ## in what follows below we substitute both side of the define/undef
3371-
# ## while this may seem a little unusual we do it to fully reproduce the
3372-
# ## previous bash-based implementation
3373-
#
3374-
# if test x"${hasRlapack}" = x""; then
3375-
# ## We are using a full Lapack and can use zgbsv -- so #undef remains
3376-
# AC_MSG_RESULT([system LAPACK found])
3377-
# ## arma_lapack="#undef ARMA_CRIPPLED_LAPACK"
3378-
# else
3379-
# ## We are using R's subset of Lapack and CANNOT use zgbsv etc, so we mark it
3380-
# AC_MSG_RESULT([R-supplied partial LAPACK found])
3381-
# ## AC_MSG_WARN([Some complex-valued LAPACK functions may not be available])
3382-
# ## arma_lapack="#define ARMA_CRIPPLED_LAPACK 1"
3383-
# fi
3384-
#
3385-
# ## Default the OpenMP flag to the empty string.
3386-
# ## If and only if OpenMP is found, expand to $(SHLIB_OPENMP_CXXFLAGS)
3387-
# openmp_flag=""
3388-
#
3389-
# ## Set the fallback, by default it is nope
3390-
# arma_have_openmp="#define ARMA_DONT_USE_OPENMP 1"
3391-
#
3392-
# if test x"${openmp_already_works}" = x"yes"; then
3393-
# arma_have_openmp="#define ARMA_USE_OPENMP 1"
3394-
# openmp_flag='$(SHLIB_OPENMP_CXXFLAGS)'
3395-
# fi
3396-
33973281
## Additional Apple check
33983282
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for macOS" >&5
33993283
printf %s "checking for macOS... " >&6; }
@@ -3436,7 +3320,6 @@ printf "%s\n" "found and suitable" >&6; }
34363320
fi
34373321

34383322
## now use all these
3439-
## AC_SUBST([ARMA_LAPACK],["${arma_lapack}"])
34403323
ARMA_HAVE_OPENMP="${arma_have_openmp}"
34413324

34423325
OPENMP_FLAG="${openmp_flag}"

configure.ac

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -76,122 +76,6 @@ fi
7676
cd "${owd}"
7777
rm -rf "${BUILDDIR}"
7878

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-
19579
## Additional Apple check
19680
AC_MSG_CHECKING([for macOS])
19781
RSysinfoName=$("${R_HOME}/bin/Rscript" --vanilla -e 'cat(Sys.info()[["sysname"]])')
@@ -225,7 +109,6 @@ if test x"${can_use_openmp}" = x"yes"; then
225109
fi
226110

227111
## now use all these
228-
## AC_SUBST([ARMA_LAPACK],["${arma_lapack}"])
229112
AC_SUBST([ARMA_HAVE_OPENMP], ["${arma_have_openmp}"])
230113
AC_SUBST([OPENMP_FLAG], ["${openmp_flag}"])
231114
AC_CONFIG_FILES([inst/include/RcppArmadillo/config/RcppArmadilloConfigGenerated.h src/Makevars])

inst/NEWS.Rd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
\item Reworked detection of aliasing, leading to more efficient
1515
compiled code
1616
}
17+
\item OpenMP detection in \code{configure} has been simplified
1718
}
1819
}
1920

0 commit comments

Comments
 (0)