[Rcpp-commits] r2610 - in pkg/RcppGSL: . inst inst/detective inst/skeleton

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 30 10:11:33 CET 2010


Author: romain
Date: 2010-11-30 10:11:33 +0100 (Tue, 30 Nov 2010)
New Revision: 2610

Added:
   pkg/RcppGSL/inst/detective/
   pkg/RcppGSL/inst/detective/Makevars.in
   pkg/RcppGSL/inst/detective/configure.in
   pkg/RcppGSL/inst/skeleton/
   pkg/RcppGSL/inst/skeleton/Makevars
   pkg/RcppGSL/inst/skeleton/Makevars.win
Modified:
   pkg/RcppGSL/configure.in
Log:
 calculate flags at runtime (3)

Modified: pkg/RcppGSL/configure.in
===================================================================
--- pkg/RcppGSL/configure.in	2010-11-30 09:11:19 UTC (rev 2609)
+++ pkg/RcppGSL/configure.in	2010-11-30 09:11:33 UTC (rev 2610)
@@ -50,4 +50,4 @@
 AC_SUBST(RCPP_LDFLAGS)
 
 AC_OUTPUT(src/Makevars)
-AC_OUTPUT(R/inline.R)
+

Added: pkg/RcppGSL/inst/detective/Makevars.in
===================================================================
--- pkg/RcppGSL/inst/detective/Makevars.in	                        (rev 0)
+++ pkg/RcppGSL/inst/detective/Makevars.in	2010-11-30 09:11:33 UTC (rev 2610)
@@ -0,0 +1,2 @@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_LIBS = @GSL_LIBS@

Added: pkg/RcppGSL/inst/detective/configure.in
===================================================================
--- pkg/RcppGSL/inst/detective/configure.in	                        (rev 0)
+++ pkg/RcppGSL/inst/detective/configure.in	2010-11-30 09:11:33 UTC (rev 2610)
@@ -0,0 +1,49 @@
+
+## Process this file with autoconf to produce a configure script.
+##
+## Configure.in for RcppGSL
+##
+## Copyright (C) 2010 Romain Francois and Dirk Eddelbuettel
+## Licensed under GNU GPL 2 or later
+
+# The version set here will propagate to other files from here
+AC_INIT([RcppGSL], 0.1.0)
+
+# Checks for common programs using default macros
+AC_PROG_CC
+
+## Use gsl-config to find arguments for compiler and linker flags
+##
+## Check for non-standard programs: gsl-config(1)
+AC_PATH_PROG([GSL_CONFIG], [gsl-config])
+## If gsl-config was found, let's use it
+if test "${GSL_CONFIG}" != ""; then
+    # Use gsl-config for header and linker arguments
+    GSL_CFLAGS=`${GSL_CONFIG} --cflags`
+    GSL_LIBS=`${GSL_CONFIG} --libs`
+else
+    AC_MSG_ERROR([gsl-config not found, is GSL installed?])
+fi
+
+## Use Rscript to query Rcpp for compiler and linker flags
+##
+## look for Rscript, but use the one found via R_HOME to allow for multiple installations
+AC_DEFUN(AC_PROG_RSCRIPT, [AC_CHECK_PROG(RSCRIPT,Rscript,yes)])
+AC_PROG_RSCRIPT
+if test x"${RSCRIPT}" == x"yes" ; then
+     : ${R_HOME=`R RHOME`}
+     if test -z "${R_HOME}"; then
+         AC_MSG_ERROR([Could not determine R_HOME.])
+     fi
+     ## link flag providing libary as well as path to library, and optionally rpath
+     RCPP_LDFLAGS=`${R_HOME}/bin/Rscript -e 'Rcpp:::LdFlags()'`
+else
+    AC_MSG_ERROR([Rscript not found, is R installed?])
+fi
+
+# Now substitute these variables in src/Makevars.in to create src/Makevars
+AC_SUBST(GSL_CFLAGS)
+AC_SUBST(GSL_LIBS)
+
+AC_OUTPUT(Makevars)
+

Added: pkg/RcppGSL/inst/skeleton/Makevars
===================================================================
--- pkg/RcppGSL/inst/skeleton/Makevars	                        (rev 0)
+++ pkg/RcppGSL/inst/skeleton/Makevars	2010-11-30 09:11:33 UTC (rev 2610)
@@ -0,0 +1 @@
+

Added: pkg/RcppGSL/inst/skeleton/Makevars.win
===================================================================
--- pkg/RcppGSL/inst/skeleton/Makevars.win	                        (rev 0)
+++ pkg/RcppGSL/inst/skeleton/Makevars.win	2010-11-30 09:11:33 UTC (rev 2610)
@@ -0,0 +1 @@
+



More information about the Rcpp-commits mailing list