File: pcxarch

package info (click to toggle)
pcx 1.1.18-2
  • links: PTS
  • area: non-free
  • in suites: lenny, squeeze
  • size: 2,644 kB
  • ctags: 1,980
  • sloc: ansic: 20,454; fortran: 2,974; makefile: 367; sh: 150; csh: 48
file content (58 lines) | stat: -rwxr-xr-x 1,543 bytes parent folder | download | duplicates (6)
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/csh -f
#
#   pcxarch - Returns the machine's PCx environmental variable, PCx_ARCH.
#
# This file was copied from the PETSc package
#   http://www.mcs.anl.gov/petsc/petsc.html

if (-e /bin/uname) then
    set LARCH = `/bin/uname -s`
    if ("$LARCH" == "AIX") then
        set LARCH = "rs6000"
    else if ("$LARCH" == "HP-UX") then
	set LARCH = "hpux"
    else if ("$LARCH" == "Linux") then
	set LARCH = "linux"
    else if ("$LARCH" == "FreeBSD") then
	set LARCH = "freebsd"    
    else if ("$LARCH" != "IRIX" && "$LARCH" != "IRIX64") then 
        set LARCH = `/bin/uname -m`
    endif
else  if (-e /usr/bin/uname) then
    set LARCH = `/usr/bin/uname`
    if ("$LARCH" == "FreeBSD") then
      set LARCH = "freebsd"
    else
      echo "Unable to determine machines architecture"
      set LARCH = "unknown"
    endif
else
    echo "Unable to determine machines architecture"
    set LARCH = "unknown"
endif

set SunOSTest = `expr "$LARCH" : "\(....\)"`
if ("$SunOSTest" == "sun4") then
  set LARCH = sun4
  set Version = `/bin/uname -r`
  set MajorVersion = `expr "$Version" : "\(.\)"`
  if ("$MajorVersion" ==  5) then
    set LARCH = "solaris"
  endif
else if ("$LARCH" == "AIX") then
   set LARCH = "rs6000"
else if ("$LARCH" == "RIOS") then
   set LARCH = "rs6000"
else if ("$LARCH" == "sun4m") then
  set LARCH = "sun4"
else if ("$LARCH" == "iris4d") then
  set LARCH = "IRIX"
else if ("$LARCH" == "Linux" ) then 
  set LARCH = "linux"
else if ("$LARCH" == "CRAY Y-MP" ) then 
  set LARCH = "t3d"
endif
#
echo $LARCH
exit 0