[Rcpp-devel] configure

Romain François francoisromain at free.fr
Fri Jan 8 13:47:31 CET 2010


On 01/08/2010 01:37 PM, Dirk Eddelbuettel wrote:
>
> Basic configure support to detect g++ versions has been added.  This
> currently only sets PKG_CXXFLAGS to include (or not) the magic -std=c++0x but
> that is all we need so far.  And it may make for an easy example :)

Cool

> edd at ron:~/svn/rcpp/pkg$ autoconf
> edd at ron:~/svn/rcpp/pkg$ CXX=g++-4.2 ./configure
> checking whether the C++ compiler works... yes
> checking for C++ compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++-4.2 accepts -g... yes
> checking how to run the C++ preprocessor... g++-4.2 -E
> checking whether we are using the GNU C++ compiler... (cached) yes
> checking whether g++-4.2 accepts -g... (cached) yes
> configure: WARNING: With g++ version 4.2 core functionality should be stable.
> checking for R... yes
> checking for Rscript... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> Completed configuration and ready to build.
> edd at ron:~/svn/rcpp/pkg$ grep PKG_CXX src/Makevars
> PKG_CXXFLAGS += -g -O2
> edd at ron:~/svn/rcpp/pkg$ ./configure
> checking for g++... g++
> checking whether the C++ compiler works... yes
> checking for C++ compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking how to run the C++ preprocessor... g++ -E
> checking whether we are using the GNU C++ compiler... (cached) yes
> checking whether g++ accepts -g... (cached) yes
> configure: WARNING: With g++ version 4.3 parts of the new Cxx0x standard are available.
> checking for R... yes
> checking for Rscript... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> Completed configuration and ready to build.
> edd at ron:~/svn/rcpp/pkg$ grep PKG_CXX src/Makevars
> PKG_CXXFLAGS += -g -O2 -std=c++0x
> edd at ron:~/svn/rcpp/pkg$ CXX=g++-4.4 ./configure
> checking whether the C++ compiler works... yes
> checking for C++ compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++-4.4 accepts -g... yes
> checking how to run the C++ preprocessor... g++-4.4 -E
> checking whether we are using the GNU C++ compiler... (cached) yes
> checking whether g++-4.4 accepts -g... (cached) yes
> configure: WARNING: With g++ version 4.4 or newer more parts of the new Cxx0x standard are available.
> checking for R... yes
> checking for Rscript... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> Completed configuration and ready to build.
> edd at ron:~/svn/rcpp/pkg$ grep PKG_CXX src/Makevars
> PKG_CXXFLAGS += -g -O2 -std=c++0x
> edd at ron:~/svn/rcpp/pkg$
>
> The 'messaging' ie the 'configure: WARNING' could be improved.  I don't know
> to do it with a configure macro with the WARNING bit -- could simply switch
> to echo...
>
> And I don't quite know yet what to do on Windows. I say for now just hardcode
> one way or the other.  We could simple ask Uwe / Stefan what compilers CRAN
> and R-Forge use...

http://cran.r-project.org/web/checks/check_flavors.html
so I guess no fancy features for windows or mac.

Also 0.7.1 seems to make sunstudio unhappy:
http://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-sun/Rcpp-00install.html

I've logged this on the bug tracker:
http://r-forge.r-project.org/tracker/index.php?func=detail&aid=773&group_id=155&atid=637

> Dirk
>


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009
|- http://tr.im/IW9B : C++ exceptions at the R level
`- http://tr.im/IlMh : CPP package: exposing C++ objects



More information about the Rcpp-devel mailing list