source: trunk/source/contrib/rittweiler/ccl @ 13098

Last change on this file since 13098 was 13098, checked in by gb, 10 years ago

Move contributed ccl/ccl64 shell scripts to contrib/rittweiler. Revert
to pre-contributed (simpler, less flexible) versions in scripts, both
to avoid issues with platforms (Solaris 10) where /bin/sh doesn't refer
to a POSIX shell and to avoid the need for documentation changes.

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/sh
2#
3# Change the definition of CCL_DEFAULT_DIRECTORY below to refer to
4# your Clozure CL installation directory. 
5# Any definition of CCL_DEFAULT_DIRECTORY already present in the environment
6# takes precedence over definitions made below.
7
8probe()
9{
10    if [ -e "$1"  -a  -e "$1/scripts/ccl" ]; then
11        CCL_DEFAULT_DIRECTORY="$1"
12    fi
13}
14
15if [ -z "$CCL_DEFAULT_DIRECTORY"  -a  -n "`which readlink`" ]; then
16    dir="`readlink $0`"
17    probe "${dir%/scripts/ccl}"
18fi
19
20if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then
21    probe "`pwd`"
22fi
23
24if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then
25    probe "/usr/local/src/ccl"
26fi
27
28if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then
29    echo "Can't find CCL directory.  Please edit $0 or"
30    echo "set the environment variable CCL_DEFAULT_DIRECTORY"
31    echo "and try again."
32    exit 1
33fi
34
35export CCL_DEFAULT_DIRECTORY
36
37# This is shorter (& easier to type), making the invocation below
38# a little easier to read.
39
40DD=${CCL_DEFAULT_DIRECTORY}
41
42# If you don't want to guess the name of the Clozure CL kernel on
43# every invocation (or if you want to use a kernel with a
44# non-default name), you might want to uncomment and change
45# the following line:
46#OPENMCL_KERNEL=some_name
47
48# Set the CCL_DEFAULT_DIRECTORY  environment variable;
49# the lisp will use this to setup translations for the CCL: logical host.
50
51if [ -z "$OPENMCL_KERNEL" ]; then
52  case `uname -s` in
53    Darwin) case `arch` in
54              ppc*) OPENMCL_KERNEL=dppccl ;;
55              i386) OPENMCL_KERNEL=dx86cl ;;
56            esac ;;
57    Linux) case `uname -m` in
58              ppc*) OPENMCL_KERNEL=ppccl ;;
59              *86*) OPENMCL_KERNEL=lx86cl ;;
60           esac ;;
61    CYGWIN*)
62       OPENMCL_KERNEL=wx86cl.exe
63       CCL_DEFAULT_DIRECTORY="C:/cygwin$CCL_DEFAULT_DIRECTORY"
64    ;;
65    SunOS) OPENMCL_KERNEL=sx86cl
66    ;;
67    FreeBSD) OPENMCL_KERNEL=fx86cl
68    ;;
69    *)
70    echo "Can't determine host OS.  Fix this."
71    exit 1
72    ;;
73  esac
74fi
75
76exec ${DD}/${OPENMCL_KERNEL} "$@"
77
Note: See TracBrowser for help on using the repository browser.