]>
Commit | Line | Data |
---|---|---|
625be286 RH |
1 | #!/bin/sh |
2 | ||
3 | compile="$1" | |
4 | kinds="" | |
5 | possible_kinds="4 8 10 16" | |
6 | c=0 | |
7 | ||
8 | for k in $possible_kinds; do | |
9 | echo " real (kind=$k) :: x" > tmp$$.f90 | |
7666351c | 10 | echo " x = 1.0_$k" >> tmp$$.f90 |
625be286 | 11 | echo " end" >> tmp$$.f90 |
4349e292 | 12 | if $compile -S tmp$$.f90 > /dev/null 2>&1; then |
625be286 RH |
13 | kinds="$kinds $k" |
14 | c=`expr $c + 1` | |
15 | fi | |
16 | rm -f tmp$$.* | |
17 | done | |
18 | ||
19 | echo " integer, parameter :: c = $c" | |
20 | echo " type (real_info), parameter :: real_infos(c) = (/ &" | |
21 | ||
22 | i=0 | |
23 | for k in $kinds; do | |
130abd17 | 24 | # echo -n is not portable |
01349049 | 25 | str=" real_info ($k, precision(0.0_$k), range(0.0_$k), radix(0.0_$k))" |
625be286 RH |
26 | i=`expr $i + 1` |
27 | if [ $i -lt $c ]; then | |
130abd17 | 28 | echo "$str, &" |
625be286 | 29 | else |
130abd17 | 30 | echo "$str /)" |
625be286 RH |
31 | fi |
32 | done | |
33 | ||
34 | exit 0 |