-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
72 lines (55 loc) · 1.76 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
## autoconf configure.ac && autoreconf -if
AC_PREREQ([2.69])
AC_INIT([pbdBASE],[0.3-0])
AC_CONFIG_SRCDIR([src/base_scalapack.c])
AC_PROG_CC_C99
# Determine R_HOME.
: ${R_HOME=`R RHOME`}
if test -z "${R_HOME}"; then
echo "could not determine R_HOME"
exit 1
fi
R_SCMD="${R_HOME}/bin/Rscript -e"
### Ability to disable src/export_blacs/ --- needed for Intel mpi
AC_ARG_ENABLE(blacsexport,
AS_HELP_STRING([--enable-blacsexport],[Enable BLACS export, default yes. Disable for Intel MPI.
]),
[ENABLE_BLACSEXPORT="no"],
[ENABLE_BLACSEXPORT="yes"]
)
if test "X$ENABLE_BLACSEXPORT" = "Xyes"; then
EXPORT_BLACS="export_blacs/pkg_tools.o"
else
EXPORT_BLACS=""
fi
# pbdSLAP
EXT_LDFLAGS=`${R_SCMD} "source('./R/conf/get_conf.r');get.conf('EXT_LDFLAGS','"${R_ARCH}"','pbdSLAP')"`
R_SLAP=`${R_SCMD} "source('./R/conf/get_lib.r');get.lib('R_SLAP','"${R_ARCH}"')"`
if test -f "$R_SLAP"; then
SLAP_LDFLAGS="$R_SLAP \$(LAPACK_LIBS) \$(BLAS_LIBS)"
else
SLAP_LDFLAGS="$EXT_LDFLAGS"
fi
# pbdMPI
SPMD_CPPFLAGS=`${R_SCMD} "source('./R/conf/get_conf.r');get.conf('PKG_CPPFLAGS','"${R_ARCH}"')"`
SPMD_LDFLAGS=`${R_SCMD} "source('./R/conf/get_conf.r');get.conf('PKG_LIBS','"${R_ARCH}"')"`
# Report
echo " "
echo "****************** Results of pbdBASE package configure *****************"
echo " "
echo ">> EXT_LDFLAGS = ${EXT_LDFLAGS}"
echo ">> EXPORT_BLACS = ${EXPORT_BLACS}"
echo ">> R_SLAP = ${R_SLAP}"
echo ">> SLAP_LDFLAGS = ${SLAP_LDFLAGS}"
echo ">> SPMD_CPPFLAGS = ${SPMD_CPPFLAGS}"
echo ">> SPMD_LDFLAGS = ${SPMD_LDFLAGS}"
echo " "
echo "*************************************************************************"
echo " "
# Substitute templates
AC_SUBST(SLAP_LDFLAGS)
AC_SUBST(SPMD_CPPFLAGS)
AC_SUBST(SPMD_LDFLAGS)
AC_SUBST(EXPORT_BLACS)
AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT