-
Notifications
You must be signed in to change notification settings - Fork 22
/
configure.ac
executable file
·41 lines (32 loc) · 1.07 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
AC_INIT([SPP], [1.7], [[email protected]])
AC_CHECK_LIB(bz2, BZ2_bzDecompressInit)
AC_SUBST(HAVE_LIBBZ2)
# find R and set CC/CFLAGS
: ${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`;
CXX11=`"${R_HOME}/bin/R" CMD config CXX11`
CXX11STD=`"${R_HOME}/bin/R" CMD config CXX11STD`
CXX="${CXX11} ${CXX11STD}"
CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXX11FLAGS`
AC_LANG(C++)
CPPFLAGS="${CPPFLAGS} ${PKG_CPPFLAGS}"
CXXFLAGS="${CXXFLAGS} ${PKG_CXXFLAGS}"
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
CFLAGS="${CFLAGS} ${PKG_CFLAGS}"
RINC=`${R_HOME}/bin/R CMD config --cppflags`
RCPP_CXX=`${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"`
CPPFLAGS="${CPPFLAGS} ${RCPP_CXX}"
RCPP_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"`
LIBS="${LIBS} ${PKG_LIBS} ${RCPP_LIBS}"
AC_SUBST(R_HOME)
AC_SUBST(RINC)
AC_SUBST(RLD)
AC_ARG_VAR([PKG_CPPFLAGS],[additional pre-processor flags])
AC_ARG_VAR([PKG_LIBS],[additional linker library flags])
AC_CONFIG_FILES([src/Makevars])
cp confdefs.h src/config.h
AC_OUTPUT