lib/scripts/isabelle-platform
author wenzelm
Tue Apr 20 11:31:14 2010 +0200 (2010-04-20)
changeset 36213 4df49260bd82
parent 36196 cbb9ee265cdd
child 37012 106c56e916f8
permissions -rw-r--r--
accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
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@36213
    29
      x86_64)
wenzelm@36213
    30
        ISABELLE_PLATFORM=x86-darwin
wenzelm@36213
    31
        ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36213
    32
        ;;
wenzelm@36196
    33
      Power* | power* | ppc)
wenzelm@36196
    34
        ISABELLE_PLATFORM=ppc-darwin
wenzelm@36196
    35
        ;;
wenzelm@36196
    36
    esac
wenzelm@36196
    37
    ;;
wenzelm@36196
    38
  CYGWIN_NT*)
wenzelm@36196
    39
    case $(uname -m) in
wenzelm@36213
    40
      i?86 | x86_64)
wenzelm@36196
    41
        ISABELLE_PLATFORM=x86-cygwin
wenzelm@36196
    42
        ;;
wenzelm@36196
    43
    esac
wenzelm@36196
    44
    ;;
wenzelm@36196
    45
  SunOS)
wenzelm@36196
    46
    case $(uname -r) in
wenzelm@36196
    47
      5.*)
wenzelm@36196
    48
        case $(uname -p) in
wenzelm@36196
    49
          sparc)
wenzelm@36196
    50
            ISABELLE_PLATFORM=sparc-solaris
wenzelm@36196
    51
            ;;
wenzelm@36213
    52
          i?86 | x86_64)
wenzelm@36196
    53
            ISABELLE_PLATFORM=x86-solaris
wenzelm@36196
    54
            ;;
wenzelm@36196
    55
        esac
wenzelm@36196
    56
        ;;
wenzelm@36196
    57
    esac
wenzelm@36196
    58
    ;;
wenzelm@36196
    59
  FreeBSD|NetBSD)
wenzelm@36196
    60
    case $(uname -m) in
wenzelm@36213
    61
      i?86 | x86_64)
wenzelm@36196
    62
        ISABELLE_PLATFORM=x86-bsd
wenzelm@36196
    63
        ;;
wenzelm@36196
    64
    esac
wenzelm@36196
    65
    ;;
wenzelm@36196
    66
esac
wenzelm@36196
    67