lib/scripts/isabelle-platform
changeset 36196 cbb9ee265cdd
child 36213 4df49260bd82
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lib/scripts/isabelle-platform	Sat Apr 17 22:58:29 2010 +0200
     1.3 @@ -0,0 +1,63 @@
     1.4 +#
     1.5 +# determine general hardware and operating system type for Isabelle
     1.6 +#
     1.7 +# NOTE: The ML system or JVM may have their own idea about the platform!
     1.8 +
     1.9 +ISABELLE_PLATFORM="unknown-platform"
    1.10 +ISABELLE_PLATFORM64=""
    1.11 +
    1.12 +case $(uname -s) in
    1.13 +  Linux)
    1.14 +    case $(uname -m) in
    1.15 +      i?86)
    1.16 +        ISABELLE_PLATFORM=x86-linux
    1.17 +        ;;
    1.18 +      x86_64)
    1.19 +        ISABELLE_PLATFORM=x86-linux
    1.20 +        ISABELLE_PLATFORM64=x86_64-linux
    1.21 +        ;;
    1.22 +    esac
    1.23 +    ;;
    1.24 +  Darwin)
    1.25 +    case $(uname -m) in
    1.26 +      i?86)
    1.27 +        ISABELLE_PLATFORM=x86-darwin
    1.28 +        if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then
    1.29 +          ISABELLE_PLATFORM64=x86_64-darwin
    1.30 +        fi
    1.31 +        ;;
    1.32 +      Power* | power* | ppc)
    1.33 +        ISABELLE_PLATFORM=ppc-darwin
    1.34 +        ;;
    1.35 +    esac
    1.36 +    ;;
    1.37 +  CYGWIN_NT*)
    1.38 +    case $(uname -m) in
    1.39 +      i?86)
    1.40 +        ISABELLE_PLATFORM=x86-cygwin
    1.41 +        ;;
    1.42 +    esac
    1.43 +    ;;
    1.44 +  SunOS)
    1.45 +    case $(uname -r) in
    1.46 +      5.*)
    1.47 +        case $(uname -p) in
    1.48 +          sparc)
    1.49 +            ISABELLE_PLATFORM=sparc-solaris
    1.50 +            ;;
    1.51 +          i?86)
    1.52 +            ISABELLE_PLATFORM=x86-solaris
    1.53 +            ;;
    1.54 +        esac
    1.55 +        ;;
    1.56 +    esac
    1.57 +    ;;
    1.58 +  FreeBSD|NetBSD)
    1.59 +    case $(uname -m) in
    1.60 +      i?86)
    1.61 +        ISABELLE_PLATFORM=x86-bsd
    1.62 +        ;;
    1.63 +    esac
    1.64 +    ;;
    1.65 +esac
    1.66 +