lib/scripts/isabelle-platform
author wenzelm
Fri Jan 01 16:40:47 2016 +0100 (2016-01-01)
changeset 62028 2ecee4679f99
parent 50182 30177ec0be36
child 62879 4764473c9b8d
permissions -rw-r--r--
updated for release;
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@50182
     7
ISABELLE_PLATFORM_FAMILY=""
wenzelm@48455
     8
ISABELLE_PLATFORM32=""
wenzelm@36196
     9
ISABELLE_PLATFORM64=""
wenzelm@36196
    10
wenzelm@36196
    11
case $(uname -s) in
wenzelm@36196
    12
  Linux)
wenzelm@50182
    13
    ISABELLE_PLATFORM_FAMILY="linux"
wenzelm@36196
    14
    case $(uname -m) in
wenzelm@36196
    15
      i?86)
wenzelm@48455
    16
        ISABELLE_PLATFORM32=x86-linux
wenzelm@36196
    17
        ;;
wenzelm@36196
    18
      x86_64)
wenzelm@48455
    19
        ISABELLE_PLATFORM32=x86-linux
wenzelm@36196
    20
        ISABELLE_PLATFORM64=x86_64-linux
wenzelm@36196
    21
        ;;
wenzelm@36196
    22
    esac
wenzelm@36196
    23
    ;;
wenzelm@36196
    24
  Darwin)
wenzelm@50182
    25
    ISABELLE_PLATFORM_FAMILY="macos"
wenzelm@36196
    26
    case $(uname -m) in
wenzelm@36196
    27
      i?86)
wenzelm@48455
    28
        ISABELLE_PLATFORM32=x86-darwin
wenzelm@36196
    29
        if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
wenzelm@36196
    30
          ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36196
    31
        fi
wenzelm@36196
    32
        ;;
wenzelm@36213
    33
      x86_64)
wenzelm@48455
    34
        ISABELLE_PLATFORM32=x86-darwin
wenzelm@36213
    35
        ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36213
    36
        ;;
wenzelm@36196
    37
    esac
wenzelm@36196
    38
    ;;
wenzelm@36196
    39
  CYGWIN_NT*)
wenzelm@50182
    40
    ISABELLE_PLATFORM_FAMILY="windows"
wenzelm@36196
    41
    case $(uname -m) in
wenzelm@36213
    42
      i?86 | x86_64)
wenzelm@48455
    43
        ISABELLE_PLATFORM32=x86-cygwin
wenzelm@36196
    44
        ;;
wenzelm@36196
    45
    esac
wenzelm@36196
    46
    ;;
wenzelm@42716
    47
  *BSD)
wenzelm@50182
    48
    ISABELLE_PLATFORM_FAMILY="linux"
wenzelm@36196
    49
    case $(uname -m) in
wenzelm@36213
    50
      i?86 | x86_64)
wenzelm@48455
    51
        ISABELLE_PLATFORM32=x86-linux  #cf. BSD Linux Binary Compatibility
wenzelm@36196
    52
        ;;
wenzelm@36196
    53
    esac
wenzelm@36196
    54
    ;;
wenzelm@36196
    55
esac
wenzelm@36196
    56
wenzelm@48455
    57
ISABELLE_PLATFORM="$ISABELLE_PLATFORM32"
wenzelm@48455
    58