@@ -3283,18 +3283,24 @@ rm -rf "${BUILDDIR}"
32833283printf %s " checking for macOS... " >&6 ; }
32843284RSysinfoName=$( " ${R_HOME} /bin/Rscript" --vanilla -e ' cat(Sys.info()["sysname"])' )
32853285if test x" ${RSysinfoName} " = x" Darwin" ; then
3286- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: found" >&5
3287- printf " %s\n" " found" >&6 ; }
3286+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: found macOS " >&5
3287+ printf " %s\n" " found macOS " >&6 ; }
32883288 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for macOS Apple compiler" >&5
32893289printf %s " checking for macOS Apple compiler... " >&6 ; }
32903290 apple_compiler=$( $CXX --version 2>&1 | grep -i -c -e ' apple llvm' )
32913291 if test x" ${apple_compiler} " = x" 1" ; then
3292- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: found" >&5
3293- printf " %s\n" " found" >&6 ; }
3292+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: found macOS Apple compiler " >&5
3293+ printf " %s\n" " found macOS Apple compiler " >&6 ; }
32943294 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : WARNING: OpenMP unavailable and turned off." >&5
32953295printf " %s\n" " $as_me : WARNING: OpenMP unavailable and turned off." >&2 ; }
32963296 can_use_openmp=" no"
3297+ else
3298+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: not found macOS Apple compiler" >&5
3299+ printf " %s\n" " not found macOS Apple compiler" >&6 ; }
32973300 fi
3301+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : WARNING: Compiler is $CXX " >&5
3302+ printf " %s\n" " $as_me : WARNING: Compiler is $CXX " >&2 ; }
3303+ # "${CXX}" --version
32983304else
32993305 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: not found" >&5
33003306printf " %s\n" " not found" >&6 ; }
@@ -3303,9 +3309,15 @@ fi
33033309if test x" ${can_use_openmp} " = x" yes" ; then
33043310 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for OpenMP" >&5
33053311printf %s " checking for OpenMP... " >&6 ; }
3306- # # if R has -fopenmp we should be good
3307- allldflags=$( ${R_HOME} /bin/R CMD config --ldflags)
3308- hasOpenMP=$( echo ${allldflags} | grep -- -fopenmp)
3312+ if test x" ${RSysinfoName} " = x" Darwin" ; then
3313+ # # if R has ~/.R/Makevars set we might good on macOS
3314+ allldflags=$( ${R_HOME} /bin/R CMD config --ldflags)
3315+ hasOpenMP=$( echo ${allldflags} | grep -- -fopenmp)
3316+ else
3317+ # # if R has -fopenmp we should be good (non macOS)
3318+ allldflags=$( ${R_HOME} /bin/R CMD config --ldflags)
3319+ hasOpenMP=$( echo ${allldflags} | grep -- -lomp)
3320+ fi
33093321 if test x" ${hasOpenMP} " = x" " ; then
33103322 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: missing" >&5
33113323printf " %s\n" " missing" >&6 ; }
0 commit comments