lib/scripts/isabelle-platform
author nipkow
Thu Sep 15 11:48:20 2016 +0200 (2016-09-15)
changeset 63882 018998c00003
parent 62911 78e03d8bf1c4
child 65072 36c650d1a90d
permissions -rw-r--r--
renamed listsum -> sum_list, listprod ~> prod_list
     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 
    11 case $(uname -s) in
    12   Linux)
    13     ISABELLE_PLATFORM_FAMILY="linux"
    14     case $(uname -m) in
    15       i?86)
    16         ISABELLE_PLATFORM32=x86-linux
    17         ;;
    18       x86_64)
    19         ISABELLE_PLATFORM32=x86-linux
    20         ISABELLE_PLATFORM64=x86_64-linux
    21         ;;
    22     esac
    23     ;;
    24   Darwin)
    25     ISABELLE_PLATFORM_FAMILY="macos"
    26     case $(uname -m) in
    27       i?86)
    28         ISABELLE_PLATFORM32=x86-darwin
    29         if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
    30           ISABELLE_PLATFORM64=x86_64-darwin
    31         fi
    32         ;;
    33       x86_64)
    34         ISABELLE_PLATFORM32=x86-darwin
    35         ISABELLE_PLATFORM64=x86_64-darwin
    36         ;;
    37     esac
    38     ;;
    39   CYGWIN_NT*)
    40     ISABELLE_PLATFORM_FAMILY="windows"
    41     case $(uname -m) in
    42       i?86 | x86_64)
    43         ISABELLE_PLATFORM32=x86-cygwin
    44         ;;
    45     esac
    46     ;;
    47   *BSD)
    48     ISABELLE_PLATFORM_FAMILY="linux"
    49     case $(uname -m) in
    50       i?86 | x86_64)
    51         ISABELLE_PLATFORM32=x86-linux  #cf. BSD Linux Binary Compatibility
    52         ;;
    53     esac
    54     ;;
    55 esac
    56 
    57 ISABELLE_PLATFORM="$ISABELLE_PLATFORM32"
    58