#!/bin/sh
# Purpose: to be called by the other scripts to setup the environment
# Author : pc2@ecs.csus.edu
# $HeadURL$

# Change these (& uncomment) for non-standard installations
libdir=../lib
mclbdir=../lib

basedir=`dirname $0`/..
# try development locations first
if [ -f $basedir/dist/pc2.jar ]; then
    libdir=$basedir/dist
fi
if [ -f $basedir/vendor/lib/mclb.jar ]; then
    mclbdir=$basedir/vendor/lib
fi

# then try the distribution locations
if [ -f $basedir/lib/pc2.jar ]; then
    libdir=$basedir/lib
fi
if [ -f $basedir/lib/mclb.jar ]; then
    mclbdir=$basedir/lib
fi

if [ x$libdir = x ]; then
    echo Could not find pc2.jar, please check your installation
    exit
fi

if [ x$mclbdir = x ]; then
    echo Could not find mclb.jar, please check your installation
    exit
fi

pc2_classpath=$libdir/pc2.jar:$mclbdir/mclb.jar
pc2_classpath_mail=$pc2_classpath:$mclbdir/activation.jar:$mclbdir/mailapi.jar:$mclbdir/smtp.jar

# eof pc2env $Id$
