summaryrefslogtreecommitdiff
path: root/lib/make/known-architectures/linux
blob: 1e5d9adcf8d2f6788dc3d1d85511488a613676b7 (plain)
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
#! /bin/sh
# /*@@
#   @file      linux
#   @date      Thu Jul 15 21:30:04 1999
#   @author    Tom Goodale
#   @desc 
#  
#   @enddesc
#   @version $Header$ 
# @@*/

# Determine which Fortran 90 compiler is in use
LINUX_F90_COMP=

if test -n "$F90" ; then 
    if test "`$F90 -V 2>&1 | grep -i f90 | grep -i vast`" ; then 
	LINUX_F90_COMP=pacific
    elif test "`$F90 -V 2>&1 | grep -i f90 | grep -i absoft`" ; then 
	LINUX_F90_COMP=absoft
    elif test "`$F90 -V 2>&1 | grep -i f90 | grep -i pgf90`" ; then
	LINUX_F90_COMP=portland
    else
	echo Unknown Linux f90 compiler.
	echo Please add appropriate information to 
	echo $srcdir/known-architectures/linux-gnu
	echo and send the updated file to CactusMaint
	exit 2
    fi
else
    LINUX_F90_COMP=none
fi


#Set the appropriate flags
case "$LINUX_F90_COMP" in
     pacific)
     : ${LIBS="vast90 g2c m"} ;;
     absoft)
     : ${LIBS="f90math fio f77math m"} 
     F90FLAGS="-s -O" 
     # Test if it is a version of the absoft compiler which has the library in a custom place.
     if test -n "$ABSOFT" ; then
       : ${LIBDIRS='$(ABSOFT)/lib'}
     fi ;;
     nag)
     : ${LIBS="f90 nagfl90 nag m"} 
     F90FLAGS="$F90FLAGS -N140" ;;
     portland)
     : ${LIBS="pgf90 pgf90_rpm1 pghpf2 pgf90rtl pgc m"} ;;
     none)
     : ${LIBS="m"} ;;
    *)
    echo Unknown Linux f90 compiler.
    echo Please add appropriate information to 
    echo $srcdir/known-architectures/linux-gnu
    echo and send the updated file to CactusMaint
    exit 2 ;;
esac