source: trunk/source/scripts/ccl64 @ 13066

Last change on this file since 13066 was 13066, checked in by rme, 10 years ago

Change "OpenMCL" to "Clozure CL" in comments and docstrings.

  • Property svn:executable set to *
File size: 2.3 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/ccl64" ]; 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/ccl64}"
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
35# This is shorter (& easier to type), making the invocation below
36# a little easier to read.
37
38DD=${CCL_DEFAULT_DIRECTORY}
39
40# If you don't want to guess the name of the Clozure CL kernel on
41# every invocation (or if you want to use a kernel with a
42# non-default name), you might want to uncomment and change
43# the following line:
44#OPENMCL_KERNEL=some_name
45
46# Set the CCL_DEFAULT_DIRECTORY  environment variable;
47# the lisp will use this to setup translations for the CCL: logical host.
48
49if [ -z "$OPENMCL_KERNEL" ]; then
50  case `uname -s` in
51    Darwin)
52    case `arch` in
53      ppc*)
54      OPENMCL_KERNEL=dppccl64
55      ;;
56      i386|x86_64)
57      OPENMCL_KERNEL=dx86cl64
58      ;;
59    esac
60    ;;
61    Linux)
62    case `uname -m` in
63      ppc64)
64      OPENMCL_KERNEL=ppccl64
65      ;;
66      x86_64)
67      OPENMCL_KERNEL=lx86cl64
68      ;;
69      *)
70      echo "Can't determine machine architecture.  Fix this."
71      exit 1
72      ;;
73    esac
74    ;;
75    FreeBSD)
76    case `uname -m` in
77      amd64)
78      OPENMCL_KERNEL=fx86cl64
79      ;;
80      *)
81      echo "unsupported architecture"
82      exit 1
83      ;;
84    esac
85    ;;
86    SunOS)
87    case `uname -m` in
88      i86pc)
89      OPENMCL_KERNEL=sx86cl64
90      ;;
91      *)
92      echo "unsupported architecture"
93      exit 1
94      ;;
95    esac
96    ;;
97    CYGWIN*)
98    OPENMCL_KERNEL=wx86cl64.exe
99    CCL_DEFAULT_DIRECTORY="C:/cygwin$CCL_DEFAULT_DIRECTORY"
100    ;;
101    *)
102    echo "Can't determine host OS.  Fix this."
103    exit 1
104    ;;
105  esac
106fi
107
108CCL_DEFAULT_DIRECTORY=${DD} exec ${DD}/${OPENMCL_KERNEL} "$@"
109
Note: See TracBrowser for help on using the repository browser.