Debian Codegraph @

config/intel-fflags

raw
1 # -*- shell-script -*-
2 #
3 # Copyright by The HDF Group.
4 # All rights reserved.
5 #
6 # This file is part of the HDF4 build script. It is processed shortly
7 # after configure starts and defines, among other things, flags for
8 # the various compilation modes.
9
10 # This file should be sourced into configure if the compiler is the
11 # Intel ifort compiler or a derivative. It is careful not to do anything
12 # if the compiler is not Intel; otherwise `f9x_flags_set' is set to `yes'
13 #
14
15 #
16 # Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as
17 # subroutine argument(s), remove comments starting with # and ending
18 # at EOL, replace spans of whitespace (including newlines) with spaces,
19 # and re-emit the file(s) thus filtered on the standard output stream.
20 #
21 load_intel_arguments()
22 {
23 set -- $(for arg; do
24 sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg}
25 done)
26 IFS=' ' echo "$*"
27 }
28
29 # Get the compiler version in a way that works for ifort
30 # ifort unless a compiler version is already known
31 #
32 # f9x_vendor: The compiler name: ifort
33 # f9x_version: Version number: 8.0
34 #
35 if test X = "X$f9x_flags_set"; then
36 f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 |grep '^Intel'`"
37 if test X != "X$f9x_version"; then
38 f9x_vendor=ifort
39 f9x_version="`echo $f9x_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'`"
40 echo "compiler '$FC' is Intel $f9x_vendor-$f9x_version"
41
42 # Some version numbers
43 # Intel version numbers are of the form: "major.minor"
44 f9x_vers_major=`echo $f9x_version | cut -f1 -d.`
45 f9x_vers_minor=`echo $f9x_version | cut -f2 -d.`
46 #f9x_vers_patch=`echo $f9x_version | cut -f2 -d.`
47 test -n "$f9x_vers_major" || f9x_vers_major=0
48 test -n "$f9x_vers_minor" || f9x_vers_minor=0
49 test -n "$f9x_vers_patch" || f9x_vers_patch=0
50 f9x_vers_all=`expr $f9x_vers_major '*' 1000000 + $f9x_vers_minor '*' 1000 + $f9x_vers_patch`
51 fi
52 fi
53
54 if test "X-ifort" = "X-$f9x_vendor"; then
55
56 FC_BASENAME=ifort
57 F9XSUFFIXFLAG=""
58 FSEARCH_DIRS=""
59
60 ###############################
61 # Architecture-specific flags #
62 ###############################
63
64 arch=
65 # Nothing currently. (Uncomment code below and modify to add any)
66 #case "$host_os-$host_cpu" in
67 # *-i686)
68 # arch="-march=i686"
69 # ;;
70 #esac
71
72 # Host-specific flags
73 # Nothing currently. (Uncomment code below and modify to add any)
74 #case "`hostname`" in
75 # sleipnir.ncsa.uiuc.edu)
76 # arch="$arch -pipe"
77 # ;;
78 #esac
79
80 ##############
81 # Production #
82 ##############
83
84 PROD_FCFLAGS=
85
86 #########
87 # Debug #
88 #########
89
90 DEBUG_FCFLAGS="-check all"
91
92 ###########
93 # Symbols #
94 ###########
95
96 NO_SYMBOLS_FCFLAGS=
97 SYMBOLS_FCFLAGS="-g"
98
99 #############
100 # Profiling #
101 #############
102
103 PROFILE_FCFLAGS="-p"
104
105 ################
106 # Optimization #
107 ################
108
109 HIGH_OPT_FCFLAGS="-O3"
110 DEBUG_OPT_FCFLAGS=
111 NO_OPT_FCFLAGS=
112
113 ############
114 # Warnings #
115 ############
116
117 ###########
118 # General #
119 ###########
120
121 H5_FCFLAGS="$H5_FCFLAGS -free"
122 H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments classic/ifort-general)"
123
124 #############################
125 # Version-specific warnings #
126 #############################
127
128
129 #################
130 # Flags are set #
131 #################
132 f9x_flags_set=yes
133 fi
134
135 # Clear f9x info if no flags set
136 if test "X-$f9x_flags_set" = "X-"; then
137 f9x_vendor=
138 f9x_version=
139 fi
140