lib/scripts/isabelle-platform
author wenzelm
Mon Jul 23 21:01:16 2012 +0200 (2012-07-23)
changeset 48455 a509f19d4cc6
parent 42716 45eb6829dde2
child 50182 30177ec0be36
permissions -rw-r--r--
provide explicit ISABELLE_PLATFORM32 as well;
discontinued some obsolete platforms;
explicit error for unknown platform;
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@48455
     7
ISABELLE_PLATFORM32=""
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@48455
    14
        ISABELLE_PLATFORM32=x86-linux
wenzelm@36196
    15
        ;;
wenzelm@36196
    16
      x86_64)
wenzelm@48455
    17
        ISABELLE_PLATFORM32=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@48455
    25
        ISABELLE_PLATFORM32=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@48455
    31
        ISABELLE_PLATFORM32=x86-darwin
wenzelm@36213
    32
        ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36213
    33
        ;;
wenzelm@36196
    34
    esac
wenzelm@36196
    35
    ;;
wenzelm@36196
    36
  CYGWIN_NT*)
wenzelm@36196
    37
    case $(uname -m) in
wenzelm@36213
    38
      i?86 | x86_64)
wenzelm@48455
    39
        ISABELLE_PLATFORM32=x86-cygwin
wenzelm@36196
    40
        ;;
wenzelm@36196
    41
    esac
wenzelm@36196
    42
    ;;
wenzelm@42716
    43
  *BSD)
wenzelm@36196
    44
    case $(uname -m) in
wenzelm@36213
    45
      i?86 | x86_64)
wenzelm@48455
    46
        ISABELLE_PLATFORM32=x86-linux  #cf. BSD Linux Binary Compatibility
wenzelm@36196
    47
        ;;
wenzelm@36196
    48
    esac
wenzelm@36196
    49
    ;;
wenzelm@36196
    50
esac
wenzelm@36196
    51
wenzelm@48455
    52
ISABELLE_PLATFORM="$ISABELLE_PLATFORM32"
wenzelm@48455
    53