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;
     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_PLATFORM32=""
     8 ISABELLE_PLATFORM64=""
     9 
    10 case $(uname -s) in
    11   Linux)
    12     case $(uname -m) in
    13       i?86)
    14         ISABELLE_PLATFORM32=x86-linux
    15         ;;
    16       x86_64)
    17         ISABELLE_PLATFORM32=x86-linux
    18         ISABELLE_PLATFORM64=x86_64-linux
    19         ;;
    20     esac
    21     ;;
    22   Darwin)
    23     case $(uname -m) in
    24       i?86)
    25         ISABELLE_PLATFORM32=x86-darwin
    26         if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
    27           ISABELLE_PLATFORM64=x86_64-darwin
    28         fi
    29         ;;
    30       x86_64)
    31         ISABELLE_PLATFORM32=x86-darwin
    32         ISABELLE_PLATFORM64=x86_64-darwin
    33         ;;
    34     esac
    35     ;;
    36   CYGWIN_NT*)
    37     case $(uname -m) in
    38       i?86 | x86_64)
    39         ISABELLE_PLATFORM32=x86-cygwin
    40         ;;
    41     esac
    42     ;;
    43   *BSD)
    44     case $(uname -m) in
    45       i?86 | x86_64)
    46         ISABELLE_PLATFORM32=x86-linux  #cf. BSD Linux Binary Compatibility
    47         ;;
    48     esac
    49     ;;
    50 esac
    51 
    52 ISABELLE_PLATFORM="$ISABELLE_PLATFORM32"
    53