[Rcpp-devel] Configuring GSL headers for inline

Dirk Eddelbuettel edd at debian.org
Sat Jul 7 05:43:18 CEST 2012


On 7 July 2012 at 02:47, Silkworth,David J. wrote:
| I need explicit help building a plugin that will do the same things that Makevars.win did in the example package.  Perhaps we could call this plugin "RcppGSL.win" or something similar and make it available to everyone.

Actually, the same plugin should work. We should be able to branch inside
based on what the platform is.  

In fact, looking at RcppGSL/R/inline.RRcppGSL/R/inline.R, we see that the
Windows side is currently empty:

if(.Platform$OS.type=="windows") {
    LIB_GSL <- Sys.getenv("LIB_GSL")
    gsl_cflags <- sprintf( "-I%s/include", LIB_GSL )
    gsl_libs   <- sprintf( "-L%s/lib -lgsl -lgslcblas", LIB_GSL )
    know_flags <- TRUE
} else {             
    gsl_cflags <- ""
    gsl_libs <- ""
    know_flags <- FALSE    
}

because there simply is not general way to set these for all Windows
systems. On Linux I have

edd at max:~$ gsl-config --cflags
-I/usr/include
edd at max:~$ gsl-config --libs
-L/usr/lib -lgsl -lgslcblas -lm
edd at max:~$ 

but on Windows all bets are, as usual, off as we can't even assume a sane
$PATH.

If you have fixes that work in a general setup, I'd be delighted to
incorporate them.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list