lib/scripts/isabelle-platform
author wenzelm
Thu May 12 16:00:48 2011 +0200 (2011-05-12)
changeset 42716 45eb6829dde2
parent 37012 106c56e916f8
child 48455 a509f19d4cc6
permissions -rw-r--r--
pretend that all versions of BSD are Linux, which might actually work due to binary compatibilty mode of these obsolete platforms;
     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="unknown-platform"
     8 ISABELLE_PLATFORM64=""
     9 
    10 case $(uname -s) in
    11   Linux)
    12     case $(uname -m) in
    13       i?86)
    14         ISABELLE_PLATFORM=x86-linux
    15         ;;
    16       x86_64)
    17         ISABELLE_PLATFORM=x86-linux
    18         ISABELLE_PLATFORM64=x86_64-linux
    19         ;;
    20     esac
    21     ;;
    22   Darwin)
    23     case $(uname -m) in
    24       i?86)
    25         ISABELLE_PLATFORM=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_PLATFORM=x86-darwin
    32         ISABELLE_PLATFORM64=x86_64-darwin
    33         ;;
    34       Power* | power* | ppc)
    35         ISABELLE_PLATFORM=ppc-darwin
    36         ;;
    37     esac
    38     ;;
    39   CYGWIN_NT*)
    40     case $(uname -m) in
    41       i?86 | x86_64)
    42         ISABELLE_PLATFORM=x86-cygwin
    43         ;;
    44     esac
    45     ;;
    46   SunOS)
    47     case $(uname -r) in
    48       5.*)
    49         case $(uname -p) in
    50           sparc)
    51             ISABELLE_PLATFORM=sparc-solaris
    52             ;;
    53           i?86 | x86_64)
    54             ISABELLE_PLATFORM=x86-solaris
    55             ;;
    56         esac
    57         ;;
    58     esac
    59     ;;
    60   *BSD)
    61     case $(uname -m) in
    62       i?86 | x86_64)
    63         ISABELLE_PLATFORM=x86-linux
    64         ;;
    65     esac
    66     ;;
    67 esac
    68