lib/scripts/isabelle-platform
author wenzelm
Tue Feb 28 23:12:52 2017 +0100 (2017-02-28)
changeset 65072 36c650d1a90d
parent 62911 78e03d8bf1c4
child 65073 b5bf76cf2b4e
permissions -rw-r--r--
more detailed platform information;
     1 # -*- shell-script -*- :mode=shellscript:
     2 #
     3 # determine general hardware and operating system type for Isabelle
     4 #
     5 # NOTE: The ML system or JVM may have their own idea about the platform!
     6 
     7 ISABELLE_PLATFORM_FAMILY=""
     8 ISABELLE_PLATFORM32=""
     9 ISABELLE_PLATFORM64=""
    10 ISABELLE_WINDOWS_PLATFORM32=""
    11 ISABELLE_WINDOWS_PLATFORM64=""
    12 
    13 case $(uname -s) in
    14   Linux)
    15     ISABELLE_PLATFORM_FAMILY="linux"
    16     case $(uname -m) in
    17       i?86)
    18         ISABELLE_PLATFORM32=x86-linux
    19         ;;
    20       x86_64)
    21         ISABELLE_PLATFORM32=x86-linux
    22         ISABELLE_PLATFORM64=x86_64-linux
    23         ;;
    24     esac
    25     ;;
    26   Darwin)
    27     ISABELLE_PLATFORM_FAMILY="macos"
    28     case $(uname -m) in
    29       i?86)
    30         ISABELLE_PLATFORM32=x86-darwin
    31         if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
    32           ISABELLE_PLATFORM64=x86_64-darwin
    33         fi
    34         ;;
    35       x86_64)
    36         ISABELLE_PLATFORM32=x86-darwin
    37         ISABELLE_PLATFORM64=x86_64-darwin
    38         ;;
    39     esac
    40     ;;
    41   CYGWIN_NT*)
    42     ISABELLE_PLATFORM_FAMILY="windows"
    43     case $(uname -m) in
    44       i?86 | x86_64)
    45         ISABELLE_PLATFORM32=x86-cygwin
    46         if [ "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64" ]; then
    47           ISABELLE_WINDOWS_PLATFORM64="x86_64-windows"
    48         else
    49           ISABELLE_WINDOWS_PLATFORM32="x86-windows"
    50         fi
    51         ;;
    52     esac
    53     ;;
    54   *BSD)
    55     ISABELLE_PLATFORM_FAMILY="linux"
    56     case $(uname -m) in
    57       i?86 | x86_64)
    58         ISABELLE_PLATFORM32=x86-linux  #cf. BSD Linux Binary Compatibility
    59         ;;
    60     esac
    61     ;;
    62 esac
    63 
    64 ISABELLE_PLATFORM="$ISABELLE_PLATFORM32"
    65