diff --git a/.github/workflows/custom/before-install/action.yml b/.github/workflows/custom/before-install/action.yml index 3778a28ca8..76158cf5df 100644 --- a/.github/workflows/custom/before-install/action.yml +++ b/.github/workflows/custom/before-install/action.yml @@ -8,8 +8,9 @@ runs: echo '_R_CHECK_PKG_SIZES_=FALSE' | tee -a $GITHUB_ENV shell: bash - - name: Install GLPK on macOS + - name: Install and use GLPK on macOS if: runner.os == 'macOS' run: | brew install glpk + echo -e 'CPPFLAGS = -I/opt/homebrew/include\nLDFLAGS = -L/opt/homebrew/lib' | tee ~/.R/Makevars shell: bash diff --git a/configure b/configure index 22fd44f48a..2734e45287 100755 --- a/configure +++ b/configure @@ -34,7 +34,7 @@ fi OBJECTS='${SOURCES} ${MINIGMPSOURCES}' -if echo '#include ' | `"${R_HOME}/bin/R" CMD config CC` -E $CPPFLAGS - > /dev/null 2>&1; then +if echo '#include ' | `"${R_HOME}/bin/R" CMD config CC` -E `"${R_HOME}/bin/R" CMD config CPPFLAGS` - > /dev/null 2>&1; then echo "Using installed GLPK" PKG_LIBS="$PKG_LIBS -lglpk" else