You need something like the following in your src/Makevars
file; that is (borrowing from how RcppGSL
does things):
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` `gsl-config --libs`
so R knows that it needs to link against GSL when compiling your package. See R-exts for more details.
You can probably learn a lot by checking how RcppGSL
is configured to look for GSL, and use a similar approach in your package.