This question relates to some others out there, like RccpArmadillo or element-wise-multiplication.
However, my settings are such that I do not know what I have to ed
A small tweak to the answer from @kevin-ushey (that at least I needed; I use Prezto) was adding single quotes to grep '^libraries:', resulting in:
FLIBS=`gfortran -print-search-dirs | grep '^libraries:' | sed 's|libraries: =||' | sed 's|:| -L|g' | sed 's|^|-L|'`
Adding that line to my ~/.R/Makevars file did the trick!