forked from geco-bern/rsofun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·29 lines (23 loc) · 933 Bytes
/
configure
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
#!/bin/sh
# System dependent config script to deal with
# CLANG / LLVM issues through custom compiler flags
# taken from Writing R Extensions, 1.2. Configure and cleanup
: ${R_HOME=`R RHOME`}
if test -z "${R_HOME}"; then
echo "could not determine R_HOME"
exit 1
fi
# determine the Fortran 9x compiler
FC="`"${R_HOME}/bin/R" CMD config FC`"
# grab system specific flags already set
SFLAGS="`"${R_HOME}/bin/R" CMD config FCFLAGS`"
# Use --version output to determine the compiler
# A different compiler will either accept --version and print something
# else or fail due to "unknown argument". In both cases the branch will
#
# use this routine to create the header / start of the Makevars file
# if "$FC" --version 2>/dev/null | grep -q 'flang'; then
# echo "PKG_FCFLAGS = $SFLAGS -fc-prototypes-external" > src/Makevars
# fi
# Complete the Makevars file with known system agnostic settings
cat src/Makevars.in >> src/Makevars