lib/scripts/polyml-platform
author haftmann
Fri, 20 Oct 2006 18:22:24 +0200
changeset 21084 1c898a0c0f2d
parent 20991 bb6f570512b5
child 21279 2cb5f1621bcf
permissions -rwxr-xr-x
removed antisym_setup.ML

#!/usr/bin/env bash
#
# $Id$
#
# polyml-platform --- determine Poly/ML's idea of current hardware and
# operating system type
#
# NOTE: platform identifiers should be kept as generic as possible,
# i.e. shared by compatible environments.

PLATFORM="unknown-platform"

case $(uname -s) in
  SunOS)
    case $(uname -r) in
      5.*)
        case $(uname -p) in
          sparc)
            PLATFORM=sparc-solaris
            ;;
        esac
        ;;
    esac
    ;;
  Linux)
    case $(uname -m) in
      i?86 | x86_64)
        PLATFORM=x86-linux
        ;;
      Power* | power* | ppc)
        PLATFORM=ppc-linux
        ;;
    esac
    ;;
  FreeBSD|NetBSD)
    case $(uname -m) in
      i?86)
        PLATFORM=x86-bsd
        ;;
    esac
    ;;
  Darwin)
    case $(uname -m) in
      Power* | power* | ppc)
        PLATFORM=ppc-darwin
        ;;
      i?86)
        PLATFORM=x86-darwin
        ;;
    esac
    ;;
  Windows_NT)
    case $(uname -m) in
      ?86)
        PLATFORM=x86-win32
        ;;
    esac
    ;;
esac

echo "$PLATFORM"