#!/bin/sh
#
# Change the definition of CCL_DEFAULT_DIRECTORY below to refer to
# your OpenMCL installation directory.

CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl

# This is shorter (& easier to type), making the invocation below
# a little easier to read.

DD=${CCL_DEFAULT_DIRECTORY}

# If you don't want to guess the name of the OpenMCL kernel on
# every invocation (or if you want to use a kernel with a
# non-default name), you might want to uncomment and change
# the following line:
#OPENMCL_KERNEL=some_name

# Set the CCL_DEFAULT_DIRECTORY  environment variable; 
# the lisp will use this to setup translations for the CCL: logical host.

if [ -z "$OPENMCL_KERNEL" ]; then
  case `uname -s` in
    Darwin)
    OPENMCL_KERNEL=dppccl
    ;;
    Linux)
    OPENMCL_KERNEL=ppccl
    ;;
    *)
    echo "Can't determine host OS.  Fix this."
    exit 1
    ;;
  esac
fi

CCL_DEFAULT_DIRECTORY=${DD} exec ${DD}/${OPENMCL_KERNEL} "$@"

