--- configure 2024-10-11 10:50:25.000000000 +0800 +++ configure 2024-11-02 04:49:39.000000000 +0800 @@ -113,8 +113,8 @@ printf "%s" "* checking if R installation supports OpenMP with \"-Xclang -fopenmp\" ... " if CPPFLAGS="${CPPFLAGS} -Xclang -fopenmp" PKG_LIBS="-lomp" "${R_HOME}/bin/R" CMD SHLIB test-omp.c >> config.log 2>&1; then echo "yes" - export PKG_CFLAGS="${PKG_CFLAGS} -Xclang -fopenmp" - export PKG_LIBS="${PKG_LIBS} -lomp" + export PKG_CFLAGS="${PKG_CFLAGS} -I@PREFIX@/include/libomp -Xclang -fopenmp" + export PKG_LIBS="${PKG_LIBS} -L@PREFIX@/lib/libomp -lomp" export R_OPENMP_ENABLED=1 return else @@ -132,27 +132,6 @@ echo "no" fi - if [ "$(uname -m)" = "arm64" ]; then - HOMEBREW_PREFIX=/opt/homebrew - else - HOMEBREW_PREFIX=/usr/local - fi - - if [ -e "${HOMEBREW_PREFIX}/opt/libomp" ]; then - printf "%s" "* checking if libomp installation at ${HOMEBREW_PREFIX}/opt/libomp can be used... " - LIBOMP_INCLUDE="-I${HOMEBREW_PREFIX}/opt/libomp/include -Xclang -fopenmp" - LIBOMP_LINK="-L${HOMEBREW_PREFIX}/opt/libomp/lib -lomp" - if ${CC} ${CFLAGS} ${LIBOMP_INCLUDE} ${LIBOMP_LINK} test-omp.c >> config.log 2>&1; then - echo "yes" - export PKG_CFLAGS="${PKG_CFLAGS} ${LIBOMP_INCLUDE}" - export PKG_LIBS="${PKG_LIBS} ${LIBOMP_LINK}" - export R_OPENMP_ENABLED=1 - return - else - echo "no" - fi - fi - fi # uname=Darwin # No support for OpenMP available