source: git/MP/pvmgetarch @ 22b7de8

spielwiese
Last change on this file since 22b7de8 was 22b7de8, checked in by Hans Schönemann <hannes@…>, 25 years ago
*hannes: added i686 git-svn-id: file:///usr/local/Singular/svn/trunk@2999 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 4.5 KB
Line 
1#!/bin/sh
2#
3# pvmgetarch.sh
4#
5# Generate PVM architecture string.
6#
7# This is a heuristic thing that may need to be tuned from time
8# to time.  I don't know of a real solution to determining the
9# machine type.
10#
11# Notes:
12#   1. Local people mess with things.
13#   2. It's good to try a few things for robustness.
14#   3. Don't use test -x
15#
16# 08 Apr 1993  Robert Manchek  manchek@CS.UTK.EDU.
17# 24 Aug 1994  last revision
18# 28 Jul 1995  release 3.3.8
19#
20
21#
22# begin section that may need to be tuned.
23#
24ARCH=UNKNOWN
25
26if [ -f /bin/uname -o -f /usr/bin/uname ]; then
27        if [ -f /bin/uname ]; then
28                os="`/bin/uname -s`"
29                ht="`/bin/uname -m`"
30        else
31                os="`/usr/bin/uname -s`"
32                ht="`/usr/bin/uname -m`"
33        fi
34
35        case "$os,$ht" in
36        SunOS,sun3* )           ARCH=SUN3 ;;
37        SunOS,sun4* )           ARCH=SUN4 ;;
38        ULTRIX,RISC )           ARCH=PMAX ;;
39        ULTRIX,VAX )            ARCH=UVAX ;;
40        AIX*,* )                ARCH=RS6K ;;
41        *HP*,9000/[2345]* )     ARCH=HP300 ;;
42        *HP*,9000/[78]* )       ARCH=HPPA ;;
43        IRIX,* )                ARCH=SGI ;;
44        *,alpha )               ARCH=ALPHA ;;
45        CRSOS,smp )             ARCH=CRAYSMP ;;
46        *,paragon )             ARCH=PGON ;;
47        dgux,AViiON )           ARCH=DGAV ;;
48        *,88k )                 ARCH=E88K ;;
49        *,mips )                ARCH=MIPS ;;
50        *,CRAY-2 )              ARCH=CRAY2 ;;
51        Linux,i[3456]86 )       ARCH=LINUX ;;
52        BSD/OS,i[3456]86 )      ARCH=BSD386 ;;
53        FreeBSD,i386 )          ARCH=FREEBSD ;;
54        SUPER-UX,SX-3 )         ARCH=SX3 ;;
55        uts,* )                 ARCH=UTS2 ;;
56        esac
57fi
58
59# fix suggested by Paul Wang to distinguish between hpux 9.xx and 10.xx
60if [ "$ARCH" = HPPA ]; then
61     case "`/bin/uname -r`" in
62        A.09.* )    ARCH=HPPA9 ;;
63        B.10.* )    ARCH=HPPA10 ;;
64     esac
65fi
66
67if [ "$ARCH" = UNKNOWN ]; then
68        if [ -f /bin/arch ]; then
69                case "`/bin/arch`" in
70                ksr1 ) ARCH=KSR1 ;;
71                sun2 ) ARCH=SUN2 ;;
72                sun3 ) ARCH=SUN3 ;;
73                sun4 ) ARCH=SUN4 ;;
74                esac
75        fi
76fi
77
78if [ "$ARCH" = UNKNOWN ]; then
79
80        if [ -f /ultrixboot ]; then
81                if [ -f /pcs750.bin ]; then
82                        ARCH=UVAX
83                else
84                        ARCH=PMAX
85                fi
86        else
87                if [ -f /pcs750.bin ]; then ARCH=VAX; fi
88        fi
89
90        if [ -d /usr/alliant ]; then ARCH=AFX8; fi
91        if [ -f /usr/bin/cluster ]; then ARCH=BFLY; fi
92        if [ -d /usr/convex ]; then ARCH=CNVX; fi
93        if [ -f /unicos ]; then ARCH=CRAY; fi
94        if [ -f /hp-ux ]; then ARCH=HP300; fi
95        if [ -f /usr/bin/getcube ]; then ARCH=I860; fi
96        if [ -f /usr/bin/asm56000 ]; then ARCH=NEXT; fi
97        if [ -f /etc/vg ]; then ARCH=RS6K; fi
98        if [ -d /usr/include/caif ]; then ARCH=RT; fi
99        if [ -f /bin/4d ]; then ARCH=SGI; fi
100        if [ -f /dynix ]; then ARCH=SYMM; fi
101        if [ -f /bin/titan ]; then ARCH=TITN; fi
102
103        if [ -f /netbsd ]; then
104                case "`/usr/bin/machine`" in
105                i386)   ARCH=NETBSDI386 ;;
106                amiga)  ARCH=NETBSDAMIGA ;;
107                hp300)  ARCH=NETBSDHP300 ;;
108                mac68k) ARCH=NETBSDMAC68K ;;
109                pmax)   ARCH=NETBSDPMAX ;;
110                sparc)  ARCH=NETBSDSPARC ;;
111                sun3)   ARCH=NETBSDSUN3 ;;
112                esac
113        elif [ -f /usr/bin/machine ]; then
114                case "`/usr/bin/machine`" in
115                i386 ) ARCH=BSD386 ;;
116                esac
117        fi
118        if [ -f /usr/bin/uxpm ] && /usr/bin/uxpm ; then
119                ARCH=UXPM
120        fi
121fi
122
123if [ "$ARCH" = UNKNOWN ]; then
124        if [ -f /bin/uname -o -f /usr/bin/uname ]; then
125                if [ -f /bin/uname ]; then
126                        os="`/bin/uname -s`"
127                        ht="`/bin/uname -m`"
128                else
129                        os="`/usr/bin/uname -s`"
130                        ht="`/usr/bin/uname -m`"
131                fi
132
133                case "$os,$ht" in
134                *,i[345]86 )            ARCH=SCO ;;
135                esac
136        fi
137fi
138
139if [ "$ARCH" = SUN4 ]; then
140        rel="`/bin/uname -r`"
141        case "$rel" in
142        5.* )   ARCH=SUN4SOL2 ;;
143        esac
144fi
145if [ "$ARCH" = SUN4SOL2 ]; then
146        nproc="`/bin/mpstat | wc -l`"
147        if [ $nproc -gt 2 ]; then ARCH=SUNMP; fi
148fi
149if [ "$ARCH" = ALPHA ]; then
150        rel="`/usr/bin/uname -r`"
151        case "$rel" in
152        *3.*)
153                nproc="`/usr/sbin/sizer -p`"
154                if [ $nproc -gt 1 ]; then ARCH=ALPHAMP; fi ;;
155        esac
156fi
157if [ "$ARCH" = SGI ]; then
158        rel="`/bin/uname -r`"
159        case "$rel" in
160        5.* )   ARCH=SGI5 ;;
161        6.* )   ARCH=SGI64 ;;
162        esac
163fi
164if [ "$ARCH" = SGI64 ]; then
165        nproc="`/usr/sbin/mpadmin -n | wc -w`"
166        if [ $nproc -gt 1 -a "$SGIMP" = ON ]; then ARCH=SGIMP64; fi
167fi
168if [ "$ARCH" = SGI5 ]; then
169        nproc="`/usr/sbin/mpadmin -n | wc -w`"
170        if [ $nproc -gt 1 -a "$SGIMP" = ON ]; then ARCH=SGIMP; fi
171fi
172if [ "$ARCH" = SUN4 -a -f /dev/cm ]; then ARCH=CM2; fi
173if [ "$ARCH" = SUN4 -a -f /dev/cmni ]; then ARCH=CM5; fi
174if [ "$ARCH" = CNVX ]; then
175        if /usr/convex/getsysinfo -f native_default; then
176                ARCH=CNVXN
177        fi
178fi
179if [ "$ARCH" = PMAX -a -d /usr/maspar ]; then ARCH=MASPAR; fi
180if [ "$ARCH" = RS6K ]; then 
181        nproc="`/usr/sbin/lsdev -C | grep proc | wc -l`"
182        if [ $nproc -gt 2 ]; then ARCH=RS6KMP; fi
183fi
184if [ "$ARCH" = HPPA -a -f /bin/sysinfo ]; then ARCH=CSPP; fi
185
186#
187# ugh, done.
188#
189
190echo $ARCH
191exit
192
Note: See TracBrowser for help on using the repository browser.