-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
51 lines (40 loc) · 1.25 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
42
43
44
45
46
47
48
49
50
51
AC_INIT(DESCRIPTION)
AC_CONFIG_MACRO_DIR([tools/])
: ${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`
R_CPPFLAGS=`"${R_HOME}/bin/R" CMD config --cppflags`
AC_PROG_CC_C99
BACKEND="GPU"
AX_CHECK_CUDA()
SPMD_CPPFLAGS=`"${R_HOME}/bin/Rscript" -e "source('./R/conf/get_conf.r');get.conf('PKG_CPPFLAGS','"${R_ARCH}"')"`
SPMD_LDFLAGS=`"${R_HOME}/bin/Rscript" -e "source('./R/conf/get_conf.r');get.conf('PKG_LIBS','"${R_ARCH}"')"`
# Report
echo " "
echo "***************** Results of dimrgame package configure *****************"
echo " "
echo "* R Report:"
echo " >> R_CPPFLAGS=${R_CPPFLAGS}"
echo "* Backend:"
echo " >> BACKEND=${BACKEND}"
echo "* CUDA Report:"
echo " >> NVCC=${NVCC}"
echo " >> CUDA_CFLAGS=${CUDA_CFLAGS}"
echo " >> CUDA_LDFLAGS=${CUDA_LDFLAGS}"
echo "* MPI report:"
echo " >> SPMD_CPPFLAGS = ${SPMD_CPPFLAGS}"
echo " >> SPMD_LDFLAGS = ${SPMD_LDFLAGS}"
echo "*************************************************************************"
echo " "
dnl Start to substitute templates
AC_SUBST(NVCC)
AC_SUBST(CUDA_CFLAGS)
AC_SUBST(CUDA_LDFLAGS)
AC_SUBST(R_CPPFLAGS)
AC_SUBST(BACKEND)
AC_SUBST(SPMD_CPPFLAGS)
AC_SUBST(SPMD_LDFLAGS)
AC_OUTPUT(src/Makevars)