lib/scripts/isabelle-platform
author wenzelm
Thu, 20 May 2010 20:20:52 +0200
changeset 37023 106c56e916f8
parent 36213 4df49260bd82
child 43629 45eb6829dde2
permissions -rw-r--r--
enable shell script editor mode;
     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   FreeBSD|NetBSD)
    61     case $(uname -m) in
    62       i?86 | x86_64)
    63         ISABELLE_PLATFORM=x86-bsd
    64         ;;
    65     esac
    66     ;;
    67 esac
    68