lib/scripts/isabelle-platform
author wenzelm
Mon Sep 25 20:43:21 2017 +0200 (22 months ago)
changeset 66691 a8703e8ee1d3
parent 65073 b5bf76cf2b4e
child 66731 fe2a6ec20b4d
permissions -rw-r--r--
basic support for x86_64-cygwin;
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@65072
    10
ISABELLE_WINDOWS_PLATFORM32=""
wenzelm@65072
    11
ISABELLE_WINDOWS_PLATFORM64=""
wenzelm@36196
    12
wenzelm@36196
    13
case $(uname -s) in
wenzelm@36196
    14
  Linux)
wenzelm@50182
    15
    ISABELLE_PLATFORM_FAMILY="linux"
wenzelm@36196
    16
    case $(uname -m) in
wenzelm@36196
    17
      i?86)
wenzelm@48455
    18
        ISABELLE_PLATFORM32=x86-linux
wenzelm@36196
    19
        ;;
wenzelm@36196
    20
      x86_64)
wenzelm@48455
    21
        ISABELLE_PLATFORM32=x86-linux
wenzelm@36196
    22
        ISABELLE_PLATFORM64=x86_64-linux
wenzelm@36196
    23
        ;;
wenzelm@36196
    24
    esac
wenzelm@36196
    25
    ;;
wenzelm@36196
    26
  Darwin)
wenzelm@50182
    27
    ISABELLE_PLATFORM_FAMILY="macos"
wenzelm@36196
    28
    case $(uname -m) in
wenzelm@36196
    29
      i?86)
wenzelm@48455
    30
        ISABELLE_PLATFORM32=x86-darwin
wenzelm@36196
    31
        if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
wenzelm@36196
    32
          ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36196
    33
        fi
wenzelm@36196
    34
        ;;
wenzelm@36213
    35
      x86_64)
wenzelm@48455
    36
        ISABELLE_PLATFORM32=x86-darwin
wenzelm@36213
    37
        ISABELLE_PLATFORM64=x86_64-darwin
wenzelm@36213
    38
        ;;
wenzelm@36196
    39
    esac
wenzelm@36196
    40
    ;;
wenzelm@36196
    41
  CYGWIN_NT*)
wenzelm@50182
    42
    ISABELLE_PLATFORM_FAMILY="windows"
wenzelm@66691
    43
    if [ "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64" ]; then
wenzelm@66691
    44
      ISABELLE_WINDOWS_PLATFORM32="x86-windows"
wenzelm@66691
    45
      ISABELLE_WINDOWS_PLATFORM64="x86_64-windows"
wenzelm@66691
    46
    else
wenzelm@66691
    47
      ISABELLE_WINDOWS_PLATFORM32="x86-windows"
wenzelm@66691
    48
    fi
wenzelm@36196
    49
    case $(uname -m) in
wenzelm@66691
    50
      x86_64)
wenzelm@66691
    51
        ISABELLE_PLATFORM64=x86_64-cygwin
wenzelm@66691
    52
        ;;
wenzelm@66691
    53
      i?86)
wenzelm@48455
    54
        ISABELLE_PLATFORM32=x86-cygwin
wenzelm@36196
    55
        ;;
wenzelm@36196
    56
    esac
wenzelm@36196
    57
    ;;
wenzelm@42716
    58
  *BSD)
wenzelm@50182
    59
    ISABELLE_PLATFORM_FAMILY="linux"
wenzelm@36196
    60
    case $(uname -m) in
wenzelm@36213
    61
      i?86 | x86_64)
wenzelm@48455
    62
        ISABELLE_PLATFORM32=x86-linux  #cf. BSD Linux Binary Compatibility
wenzelm@36196
    63
        ;;
wenzelm@36196
    64
    esac
wenzelm@36196
    65
    ;;
wenzelm@36196
    66
esac
wenzelm@36196
    67
wenzelm@66691
    68
ISABELLE_PLATFORM="${ISABELLE_PLATFORM32:-$ISABELLE_PLATFORM64}"
wenzelm@66691
    69
ISABELLE_WINDOWS_PLATFORM="${ISABELLE_WINDOWS_PLATFORM32:-$ISABELLE_WINDOWS_PLATFORM64}"