[Rinside-commits] r128 - in pkg: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Mar 20 19:47:43 CET 2010
Author: romain
Date: 2010-03-20 19:47:43 +0100 (Sat, 20 Mar 2010)
New Revision: 128
Modified:
pkg/DESCRIPTION
pkg/R/RInsidePaths.R
Log:
use new internal functions in Rcpp to have coherent linking paths
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2010-03-20 17:29:58 UTC (rev 127)
+++ pkg/DESCRIPTION 2010-03-20 18:47:43 UTC (rev 128)
@@ -15,7 +15,7 @@
Several examples are provided in the examples/ directory of
the installed package, and Doxygen-generated documentation of
the C++ classes is included as well.
-Depends: R (>= 2.10.0), Rcpp (>= 0.7.10)
+Depends: R (>= 2.10.0), Rcpp (>= 0.7.10.3)
SystemRequirements: None
URL: http://dirk.eddelbuettel.com/code/rinside.html
License: GPL (>= 2)
Modified: pkg/R/RInsidePaths.R
===================================================================
--- pkg/R/RInsidePaths.R 2010-03-20 17:29:58 UTC (rev 127)
+++ pkg/R/RInsidePaths.R 2010-03-20 18:47:43 UTC (rev 128)
@@ -1,37 +1,24 @@
-## Use R's internal knowledge of path settings to find the lib/ directory
-## plus optinally an arch-specific directory on system building multi-arch
-RInsideLdPath <- function() {
- if (nzchar(.Platform$r_arch)) { ## eg amd64, ia64, mips
- system.file("lib",.Platform$r_arch,package="RInside")
- } else {
- system.file("lib",package="RInside")
- }
-}
+# ## Use R's internal knowledge of path settings to find the lib/ directory
+# ## plus optinally an arch-specific directory on system building multi-arch
+# RInsideLdPath <- function() {
+# Rcpp:::packageLibPath( package = "RInside" )
+# }
-## Provide linker flags -- i.e. -L/path/to/libRInside -- as well as an
+## Provide linker flags -- i.e. -L/path/to/libRInside -- as well as an
## optional rpath call needed to tell the Linux dynamic linker about the
## location. This is not needed on OS X where we encode this as library
## built time (see src/Makevars) or Windows where we use a static library
-RInsideLdFlags <- function(static=FALSE) {
- rinsidedir <- RInsideLdPath()
- flags <- paste("-L", rinsidedir, " -lRInside", sep="") ## general default
- if (.Platform$OS.type == "unix") {
- if (length(grep("^linux",R.version$os))) {
- if (static==FALSE) { ## on Linux with dyn. linking, use rpath too
- flags <- paste(flags, " -Wl,-rpath,", rinsidedir, sep="")
- }
- }
- }
- invisible(flags)
+RInsideLdFlags <- function(static=Rcpp:::staticLinking()) {
+ Rcpp:::packageLdFlags( "RInside", static )
}
## Provide compiler flags -- i.e. -I/path/to/RInside.h
RInsideCxxFlags <- function() {
- paste("-I", RInsideLdPath(), sep="")
+ Rcpp:::includeFlag( package = "RInside" )
}
## Shorter names, and call cat() directly
CxxFlags <- function() cat(RInsideCxxFlags())
-LdFlags <- function() cat(RInsideLdFlags())
+LdFlags <- function(static=Rcpp:::staticLinking()) cat(RInsideLdFlags(static))
More information about the Rinside-commits
mailing list