lib/scripts/isabelle-platform
author wenzelm
Thu May 20 20:20:52 2010 +0200 (2010-05-20)
changeset 37012 106c56e916f8
parent 36213 4df49260bd82
child 42716 45eb6829dde2
permissions -rw-r--r--
enable shell script editor mode;
wenzelm@37012
     1
# -*- shell-script -*- :mode=shellscript:
wenzelm@36196
     2
#
wenzelm@36196
     3
# determine general hardware and operating system type for Isabelle
wenzelm@36196
     4
#
wenzelm@36196
     5
# NOTE: The ML system or JVM may have their own idea about the platform!
wenzelm@36196
     6
wenzelm@36196
     7
ISABELLE_PLATFORM="unknown-platform"
wenzelm@36196
     8
ISABELLE_PLATFORM64=""
wenzelm@36196
     9
wenzelm@36196
    10
case $(uname -s) in
wenzelm@36196
    11
  Linux)
wenzelm@36196
    12
    case $(uname -m) in
wenzelm@36196
    13
      i?86)
wenzelm@36196
    14
        ISABELLE_PLATFORM=x86-linux
wenzelm@36196
    15
        ;;
wenzelm@36196
    16
      x86_64)
wenzelm@36196
    17
        ISABELLE_PLATFORM=x86-linux
wenzelm@36196
    18
        ISABELLE_PLATFORM64=x86_64-linux
wenzelm@36196
    19
        ;;
wenzelm@36196
    20
    esac
wenzelm@36196
    21
    ;;
wenzelm@36196
    22
  Darwin)
wenzelm@36196
    23
    case $(uname -m) in
wenzelm@36196
    24
      i?86)
wenzelm@36196
    25
        ISABELLE_PLATFORM=x86-darwin
wenzelm@36196
    26
        if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
wenzelm@36196
    27
          ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36196
    28
        fi
wenzelm@36196
    29
        ;;
wenzelm@36213
    30
      x86_64)
wenzelm@36213
    31
        ISABELLE_PLATFORM=x86-darwin
wenzelm@36213
    32
        ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36213
    33
        ;;
wenzelm@36196
    34
      Power* | power* | ppc)
wenzelm@36196
    35
        ISABELLE_PLATFORM=ppc-darwin
wenzelm@36196
    36
        ;;
wenzelm@36196
    37
    esac
wenzelm@36196
    38
    ;;
wenzelm@36196
    39
  CYGWIN_NT*)
wenzelm@36196
    40
    case $(uname -m) in
wenzelm@36213
    41
      i?86 | x86_64)
wenzelm@36196
    42
        ISABELLE_PLATFORM=x86-cygwin
wenzelm@36196
    43
        ;;
wenzelm@36196
    44
    esac
wenzelm@36196
    45
    ;;
wenzelm@36196
    46
  SunOS)
wenzelm@36196
    47
    case $(uname -r) in
wenzelm@36196
    48
      5.*)
wenzelm@36196
    49
        case $(uname -p) in
wenzelm@36196
    50
          sparc)
wenzelm@36196
    51
            ISABELLE_PLATFORM=sparc-solaris
wenzelm@36196
    52
            ;;
wenzelm@36213
    53
          i?86 | x86_64)
wenzelm@36196
    54
            ISABELLE_PLATFORM=x86-solaris
wenzelm@36196
    55
            ;;
wenzelm@36196
    56
        esac
wenzelm@36196
    57
        ;;
wenzelm@36196
    58
    esac
wenzelm@36196
    59
    ;;
wenzelm@36196
    60
  FreeBSD|NetBSD)
wenzelm@36196
    61
    case $(uname -m) in
wenzelm@36213
    62
      i?86 | x86_64)
wenzelm@36196
    63
        ISABELLE_PLATFORM=x86-bsd
wenzelm@36196
    64
        ;;
wenzelm@36196
    65
    esac
wenzelm@36196
    66
    ;;
wenzelm@36196
    67
esac
wenzelm@36196
    68