lib/scripts/isabelle-platform
author wenzelm
Sat Apr 17 22:58:29 2010 +0200 (2010-04-17)
changeset 36196 cbb9ee265cdd
child 36213 4df49260bd82
permissions -rw-r--r--
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
     1 #
     2 # determine general hardware and operating system type for Isabelle
     3 #
     4 # NOTE: The ML system or JVM may have their own idea about the platform!
     5 
     6 ISABELLE_PLATFORM="unknown-platform"
     7 ISABELLE_PLATFORM64=""
     8 
     9 case $(uname -s) in
    10   Linux)
    11     case $(uname -m) in
    12       i?86)
    13         ISABELLE_PLATFORM=x86-linux
    14         ;;
    15       x86_64)
    16         ISABELLE_PLATFORM=x86-linux
    17         ISABELLE_PLATFORM64=x86_64-linux
    18         ;;
    19     esac
    20     ;;
    21   Darwin)
    22     case $(uname -m) in
    23       i?86)
    24         ISABELLE_PLATFORM=x86-darwin
    25         if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
    26           ISABELLE_PLATFORM64=x86_64-darwin
    27         fi
    28         ;;
    29       Power* | power* | ppc)
    30         ISABELLE_PLATFORM=ppc-darwin
    31         ;;
    32     esac
    33     ;;
    34   CYGWIN_NT*)
    35     case $(uname -m) in
    36       i?86)
    37         ISABELLE_PLATFORM=x86-cygwin
    38         ;;
    39     esac
    40     ;;
    41   SunOS)
    42     case $(uname -r) in
    43       5.*)
    44         case $(uname -p) in
    45           sparc)
    46             ISABELLE_PLATFORM=sparc-solaris
    47             ;;
    48           i?86)
    49             ISABELLE_PLATFORM=x86-solaris
    50             ;;
    51         esac
    52         ;;
    53     esac
    54     ;;
    55   FreeBSD|NetBSD)
    56     case $(uname -m) in
    57       i?86)
    58         ISABELLE_PLATFORM=x86-bsd
    59         ;;
    60     esac
    61     ;;
    62 esac
    63