aix: Use lcomm for TLS static data.
[official-gcc.git] / libgfortran / mk-sik-inc.sh
blobe7f237ec52664e91307d160d52d17fa306d606ab
1 #!/bin/sh
3 if test "$#" -ne 2; then
4 echo "Usage $0 int_kinds compile"
5 exit 1
6 fi
8 # Possible kinds must be listed in ascending order
9 possible_integer_kinds="$1"
10 compile="$2"
12 kinds=""
13 c=0
15 for k in $possible_integer_kinds; do
16 echo " integer (kind=$k) :: x" > tmp$$.f90
17 echo " x = 1_$k" >> tmp$$.f90
18 echo " end" >> tmp$$.f90
19 if $compile -S tmp$$.f90 > /dev/null 2>&1; then
20 kinds="$kinds $k"
21 c=`expr $c + 1`
23 rm -f tmp$$.*
24 done
26 echo " integer, parameter :: c = $c"
27 echo " type (int_info), parameter :: int_infos(c) = (/ &"
29 i=0
30 for k in $kinds; do
31 # echo -n is not portable
32 str=" int_info ($k, range(0_$k))"
33 i=`expr $i + 1`
34 if [ $i -lt $c ]; then
35 echo "$str, &"
36 else
37 echo "$str /)"
39 done
41 exit 0