[Rcpp-commits] r396 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 18 05:24:21 CET 2010


Author: edd
Date: 2010-01-18 05:24:18 +0100 (Mon, 18 Jan 2010)
New Revision: 396

Modified:
   pkg/R/RcppLdpath.R
Log:
try explicit path to (multiarch-specific) static library on OS X


Modified: pkg/R/RcppLdpath.R
===================================================================
--- pkg/R/RcppLdpath.R	2010-01-18 01:25:15 UTC (rev 395)
+++ pkg/R/RcppLdpath.R	2010-01-18 04:24:18 UTC (rev 396)
@@ -16,13 +16,16 @@
 RcppLdFlags <- function(static=FALSE) {
     rcppdir <- RcppLdPath()
     flags <- paste("-L", rcppdir, " -lRcpp", sep="")	## general default
-    if (.Platform$OS.type == "unix") {
+    if (.Platform$OS.type == "unix") {			## on Linux, consider rpath as well
         if (length(grep("^linux",R.version$os))) {
             if (static==FALSE) {		## on Linux with dyn. linking, use rpath too
                 flags <- paste(flags, " -Wl,-rpath,", rcppdir, sep="")
             }
         }
     }
+    if (length(grep("darwin", R.version$platform))) { 	## on OS X hardcode static library
+        flags <- paste(rcppdir, "/libRcpp.a", sep="")
+    }
     invisible(flags)
 }
 



More information about the Rcpp-commits mailing list