forked from geodynamics/selen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
flags.guess
138 lines (132 loc) · 3.72 KB
/
flags.guess
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/bin/sh
# Attempt to guess suitable flags for the Fortran compiler.
if test x"$UNAME_MS" = x; then
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_MS="${UNAME_MACHINE}:${UNAME_SYSTEM}"
fi
case $FC in
ftn|*/ftn|crayftn|*/crayftn)
#
# Cray Fortran
#
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM=""
fi
if test x"$LDFLAGS_PLATFORM" = x; then
LDFLAGS_PLATFORM=""
fi
;;
pgf95|*/pgf95|pgf90|*/pgf90)
#
# Portland PGI
#
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM=""
fi
if test x"$LDFLAGS_PLATFORM" = x; then
LDFLAGS_PLATFORM=""
fi
;;
ifort|*/ifort)
#
# Intel ifort Fortran90 for Linux
#
if test x"$RUN_COMMANDS" = x; then
RUN_COMMANDS="FORT_FMT_RECL=1024"
fi
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM=""
fi
if test x"$LDFLAGS_PLATFORM" = x; then
if test x"$UNAME_SYSTEM" = xDarwin; then
LDFLAGS_PLATFORM="-Wl,-stack_size,0x10000000"
else
LDFLAGS_PLATFORM=""
fi
fi
# for debugging change to -check all -debug -g -O0 -fp-stack-check -traceback -ftrapuv
#
;;
gfortran|*/gfortran|f95|*/f95)
#
# GNU gfortran
#
if test x"$FCFLAGS_PLATFORM" = x; then
if test x"$UNAME_SYSTEM" = xDarwin; then
FCFLAGS_PLATFORM="-m64"
else
FCFLAGS_PLATFORM=""
fi
fi
if test x"$LDFLAGS_PLATFORM" = x; then
if test x"$UNAME_SYSTEM" = xDarwin; then
LDFLAGS_PLATFORM="-m64 -Wl,-stack_size,0x10000000"
else
LDFLAGS_PLATFORM=""
fi
fi
;;
g95|*/g95)
#
# g95 (free f95 compiler from http://www.g95.org)
#
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM=""
fi
if test x"$LDFLAGS_PLATFORM" = x; then
LDFLAGS_PLATFORM=""
fi
;;
f90|*/f90)
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM=""
fi
if test x"$LDFLAGS_PLATFORM" = x; then
LDFLAGS_PLATFORM=""
fi
;;
lf95|*/lf95)
#
# Lahey f90
#
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM=""
fi
if test x"$LDFLAGS_PLATFORM" = x; then
LDFLAGS_PLATFORM=""
fi
;;
######## IBM ######
*xlf*|*/*xlf*)
#
# on some (but not all) IBM machines one might need to add -qsave otherwise the IBM compiler allocates the
# arrays in the stack and the code crashes if the stack size is too
# small (which is sometimes the case, but less often these days on large machines)
#
if test x"$RUN_COMMANDS" = x; then
RUN_COMMANDS="XLFRTEOPTS=\"uwidth=64\""
fi
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM="-qtune=pwr6 -qarch=pwr6 -WF,-DXLF"
fi
if test x"$LDFLAGS_PLATFORM" = x; then
LDFLAGS_PLATFORM="-qtune=pwr6 -qarch=pwr6 -WF,-DXLF"
fi
;;
pathf90|*/pathf90)
#
# pathscale
#
if test x"$FCFLAGS_PLATFORM" = x; then
FCFLAGS_PLATFORM=""
fi
if test x"$LDFLAGS_PLATFORM" = x; then
LDFLAGS_PLATFORM=""
fi
;;
esac
echo FCFLAGS_PLATFORM=\"$FCFLAGS_PLATFORM\" | sed 's/\$/\\\$/g'
echo LDFLAGS_PLATFORM=\"$LDFLAGS_PLATFORM\" | sed 's/\$/\\\$/g'
echo RUN_COMMANDS=\"$RUN_COMMANDS\" | sed 's/\$/\\\$/g'
# end of file