@@ -3294,6 +3294,9 @@ printf "%s\n" "found" >&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" >&5
3299+ printf " %s\n" " not found" >&6 ; }
32973300 fi
32983301else
32993302 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: not found" >&5
@@ -3303,9 +3306,15 @@ fi
33033306if test x" ${can_use_openmp} " = x" yes" ; then
33043307 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for OpenMP" >&5
33053308printf %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)
3309+ if test x" ${RSysinfoName} " = x" Darwin" ; then
3310+ # # if R has ~/.R/Makevars set we might good on macOS
3311+ allldflags=$( ${R_HOME} /bin/R CMD config --ldflags)
3312+ hasOpenMP=$( echo ${allldflags} | grep -- -fopenmp)
3313+ else
3314+ # # if R has -fopenmp we should be good (non macOS)
3315+ allldflags=$( ${R_HOME} /bin/R CMD config --ldflags)
3316+ hasOpenMP=$( echo ${allldflags} | grep -- -lomp)
3317+ fi
33093318 if test x" ${hasOpenMP} " = x" " ; then
33103319 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: missing" >&5
33113320printf " %s\n" " missing" >&6 ; }
0 commit comments