-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
38 lines (33 loc) · 1.26 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
AC_INIT([MPCC], 0.0.1) dnl package name, version
dnl Select an optional include path, from a configure option
dnl or from an environment variable.
AC_ARG_WITH([mkl-home],
AC_HELP_STRING([--with-mkl-home=MKL_HOME],
[the location of MKL]),
[MKL_HOME=$withval])
if test [ -n "$MKL_HOME" ] ; then
MPCC_CPPFLAGS="-DMKL -DMKL_ILP64 -std=c++11 -I. -I$MKL_HOME/include/"
LIBS="-L$MKL_HOME -Wl,--start-group $MKL_HOME/lib/intel64/libmkl_intel_ilp64.a $MKL_HOME/lib/intel64/libmkl_intel_thread.a $MKL_HOME/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl ${LIBS}"
else
echo "Could not determine MKL_HOME"
MPCC_CPPFLAGS="-DNOMKL -std=c++11 -I."
fi
dnl Now find the compiler and compiler flags to use
: ${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`
CPP=`"${R_HOME}/bin/R" CMD config CPP`
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
AC_PROG_CC
AC_PROG_CPP
CPPFLAGS="${CPPFLAGS} ${MPCC_CPPFLAGS}"
dnl substitute MPCC_CPPFLAGS and LIBS
AC_SUBST(MPCC_CPPFLAGS)
AC_SUBST(LIBS)
dnl and do substitution in the src/Makevars.in and src/config.h
AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT