[R-SIG-Mac] External header files not found

cstrato cstrato at aon.at
Fri Apr 19 21:59:48 CEST 2013


Dear All,

Currently I am testing whether my package xps can be compiled on the Mac 
with clang, and indeed everything is fine.

However, when I create ~/.R/Makevars to set CC and CXX as described in:
http://cran.r-project.org/doc/manuals/r-patched/R-admin.html#OS-X-packages
then the header files of the external framework that I use are no longer 
found.

Since my package depends on the external C++ framework, I had to create 
my own 'configure.in' and 'Makefile' which checks e.g. for the presence 
of the variable ROOTSYS containing the path to the framework.

Trying to follow the example:
http://cran.r-project.org/doc/manuals/r-patched/R-exts.html#Configure-example
I added following lines to my configure.in file:

: ${R_HOME=`R RHOME`}
if test -z "${R_HOME}"; then
    echo "could not determine R_HOME"
    exit 1
fi
CC=`"${R_HOME}/bin/R" CMD config CC`
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
AC_LANG(C++)
AC_PROG_CPP
AC_PROG_CC

ROOT_CPPFLAGS="-I. -I${ROOTSYS}/include"
CPPFLAGS="${CPPFLAGS} ${ROOT_CPPFLAGS}"

However, this did not help, the header files are still not found.

Can someone tell me what I need to do so that the external header files 
are found, or does ~/.R/Makevars overwrite everything?

Best regards,
Christian
_._._._._._._._._._._._._._._._._._
C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
V.i.e.n.n.a           A.u.s.t.r.i.a
e.m.a.i.l:        cstrato at aon.at
_._._._._._._._._._._._._._._._._._



More information about the R-SIG-Mac mailing list