#!/bin/sh
# Wrapper script to start up Jacl
if (uname -s | grep CYGWIN > /dev/null) ; then
    echo "Must be run from msys shell" ;
    exit 1 ;
fi

# Do not edit this script unless it is called jaclsh.in.
# configure takes jaclsh.in, substitutes the @xx@
# fields and creates jaclsh.

# Author:  Moses DeJong
# Version: @(#)jaclsh.in	1.1 08/07/98
#
# Copyright (c) 1998, 1999, 2000 Moses DeJong
# All Rights Reserved, see license.terms for license information.

# Install prefix for jacl package, defaults to /usr/local
prefix=/usr

# Tcl/Java version number
TCLJAVA_VERSION=1.3.2

# Directory where platform independent files live. This
# includes the .jar files and any .tcl files
XP_TCLJAVA_INSTALL_DIR=${prefix}/lib/tcljava${TCLJAVA_VERSION}

# Add the .jar library files to the CLASSPATH
JACL_CLASSPATH=/usr/lib/jvm/java/jre/lib/rt.jar:${XP_TCLJAVA_INSTALL_DIR}/tcljava.jar:${XP_TCLJAVA_INSTALL_DIR}/jacl.jar:

# Fully qualified path name of JVM executable
JAVA=/usr/lib/jvm/java/bin/java

# The arguments to the JAVA command
JAVA_FLAGS=" -ms5m -mx22m"

# Run java with the args passed in from the calling environment
# We must set the CLASSPATH env var instead of using the -classpath
# argument because jacl might want to exec a program that also
# depends on the CLASSPATH setting and Java can not export env vars

CLASSPATH=${JACL_CLASSPATH}:${CLASSPATH}
export CLASSPATH

exec ${JAVA} ${JAVA_FLAGS} tcl.lang.Shell ${1+"$@"}
