[Rcpp-commits] r2602 - in pkg/RcppGSL: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 29 22:23:36 CET 2010


Author: edd
Date: 2010-11-29 22:23:36 +0100 (Mon, 29 Nov 2010)
New Revision: 2602

Modified:
   pkg/RcppGSL/R/inline.R.in
   pkg/RcppGSL/configure.win
Log:
first try at windows config for GSL


Modified: pkg/RcppGSL/R/inline.R.in
===================================================================
--- pkg/RcppGSL/R/inline.R.in	2010-11-29 20:22:41 UTC (rev 2601)
+++ pkg/RcppGSL/R/inline.R.in	2010-11-29 21:23:36 UTC (rev 2602)
@@ -15,10 +15,22 @@
 ## You should have received a copy of the GNU General Public License
 ## along with RcppArmadillo.  If not, see <http://www.gnu.org/licenses/>.
 
-inlineCxxPlugin <- Rcpp:::Rcpp.plugin.maker(
-	include.before = "#include <RcppGSL.h>",
-	#LinkingTo     = unique( c( package, "Rcpp", "RcppGSL" ) ),
-	#Depends       = unique( c( package, "Rcpp", "RcppGSL" ) ),
-	libs           = "@GSL_LIBS@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)",
-	package        = "RcppGSL"
-)
+## inlineCxxPlugin <- Rcpp:::Rcpp.plugin.maker(
+## 	include.before = "#include <RcppGSL.h>",
+## 	#LinkingTo     = unique( c( package, "Rcpp", "RcppGSL" ) ),
+## 	#Depends       = unique( c( package, "Rcpp", "RcppGSL" ) ),
+## 	libs           = "@GSL_LIBS@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)",
+## 	package        = "RcppGSL"
+## )
+
+inlineCxxPlugin <- local({
+    settings <- Rcpp:::Rcpp.plugin.maker(include.before = "#include <RcppGSL.h>",
+                                         ##LinkingTo = unique( c( package, "Rcpp", "RcppGSL" ) ),
+                                         ##Depends = unique( c( package, "Rcpp", "RcppGSL" ) ),
+                                         libs = "@GSL_LIBS@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)",
+                                         package = "RcppGSL"
+                                         )()
+    settings$env$PKG_CPPFLAGS <- "@GSL_CFLAGS@"
+    function(...) settings
+})
+

Modified: pkg/RcppGSL/configure.win
===================================================================
--- pkg/RcppGSL/configure.win	2010-11-29 20:22:41 UTC (rev 2601)
+++ pkg/RcppGSL/configure.win	2010-11-29 21:23:36 UTC (rev 2602)
@@ -1,3 +1,11 @@
 #!/bin/sh
 
+## you need to define LIB_GSL as the directory containing GSL directories include/ and lib/
+gslinc=-I$(LIB_GSL)/include
+gsllib=-L$(LIB_GSL)/lib -lgsl -lgslcblas
 
+# Use sed to substitute the values in
+sed -e "s|\@GSL_CFLAGS\@|${gslinc}|" -e "s|\@GSL_LIBs\@|${gsllib}|" R/inline.R.in > R/inline.R
+
+
+



More information about the Rcpp-commits mailing list