public
Created

Clozure CL launcher script

  • Download Gist
ccl
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
#!/bin/sh
#
# Change the definition of CCL_DEFAULT_DIRECTORY below to refer to
# your Clozure CL installation directory. The lisp will use this
# environment variable to set up translations for the CCL: logical
# host.
 
# Any definition of CCL_DEFAULT_DIRECTORY already present in the
# environment takes precedence over definition made below.
 
if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then
CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl
echo "CCL_DEFAULT_DIRECTORY not set, defaulting to $CCL_DEFAULT_DIRECTORY"
fi
 
OS="$(uname -s)"
MARCH="$(uname -m)"
 
if [ "$MARCH" = x86_64 ]; then
postfix="64"
else
postfix=""
fi
 
# 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
 
if [ -z "$OPENMCL_KERNEL" ]; then
case $OS in
Darwin)
case `arch` in
ppc*)
OPENMCL_KERNEL="dppccl${postfix}"
;;
i386|x86_64)
OPENMCL_KERNEL="dx86cl${postfix}"
;;
esac
;;
Linux)
case $MARCH in
ppc64)
OPENMCL_KERNEL="ppccl${postfix}"
;;
x86_64)
OPENMCL_KERNEL="lx86cl${postfix}"
;;
*)
echo "Can't determine machine architecture. Fix this."
exit 1
;;
esac
;;
FreeBSD)
case $MARCH in
amd64)
OPENMCL_KERNEL="fx86cl${postfix}"
;;
*)
echo "unsupported architecture"
exit 1
;;
esac
;;
SunOS)
case $MARCH in
i86pc)
OPENMCL_KERNEL="sx86cl${postfix}"
;;
*)
echo "unsupported architecture"
exit 1
;;
esac
;;
CYGWIN*)
OPENMCL_KERNEL="wx86cl${postfix}.exe"
CCL_DEFAULT_DIRECTORY="C:/cygwin$CCL_DEFAULT_DIRECTORY"
;;
*)
echo "Can't determine host OS. Fix this."
exit 1
;;
esac
fi
 
export CCL_DEFAULT_DIRECTORY
exec ${CCL_DEFAULT_DIRECTORY}/${OPENMCL_KERNEL} "$@"

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.