[Rcpp-commits] r2625 - in pkg/RcppGSL: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 30 19:44:17 CET 2010


Author: romain
Date: 2010-11-30 19:44:17 +0100 (Tue, 30 Nov 2010)
New Revision: 2625

Removed:
   pkg/RcppGSL/inst/detective/
Modified:
   pkg/RcppGSL/R/inline.R
Log:
trying to be less silly

Modified: pkg/RcppGSL/R/inline.R
===================================================================
--- pkg/RcppGSL/R/inline.R	2010-11-30 16:41:36 UTC (rev 2624)
+++ pkg/RcppGSL/R/inline.R	2010-11-30 18:44:17 UTC (rev 2625)
@@ -29,28 +29,9 @@
 }
 
 get_gsl_flags <- function(){
-    td <- tempfile()
-    here <- getwd()
-    dir.create( td ); on.exit( {
-        setwd( here )         
-        unlink( td, recursive = TRUE )
-    } )
+    gsl_cflags <- system( "gsl-config --cflags" )
+    gsl_libs   <- system( "gsl-config --libs" )
     
-    file.copy( 
-        system.file( "detective", "configure.in", package = "RcppGSL" ), 
-        td )
-    file.copy( 
-        system.file( "detective", "Makevars.in", package = "RcppGSL" ), 
-        td )
-    setwd( td )
-    
-    system( "autoconf", intern = TRUE )
-    system( "sh configure", intern = TRUE )
-    
-    txt <- readLines( "Makevars" )
-    gsl_cflags <- sub( "^GSL_CFLAGS[[:space:]]*=[[:space:]]*", "" , grep( "^GSL_CFLAGS", txt, value = TRUE ) )
-    gsl_libs   <- sub( "^GSL_LIBS[[:space:]]*=[[:space:]]*", "" , grep( "^GSL_LIBS", txt, value = TRUE ) )
-    
     unlockBinding( "gsl_cflags", NAMESPACE )
     unlockBinding( "gsl_libs", NAMESPACE )
     unlockBinding( "know_flags", NAMESPACE )
@@ -62,7 +43,6 @@
     lockBinding( "gsl_cflags", NAMESPACE )
     lockBinding( "gsl_libs", NAMESPACE )
     lockBinding( "know_flags", NAMESPACE )
-       
 }
        
 



More information about the Rcpp-commits mailing list