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