#!/bin/sh
# ---------------------------------------------------------------------------
# JOnAS: Java(TM) Open Application Server
# Copyright (C) 1999-2008 Bull S.A.S.
# Contact: jonas-team@objectweb.org
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
# USA
#
# Initial developer(s): ____________________________________.
# Contributor(s): Philippe Durieux
#
# ---------------------------------------------------------------------------
# $Id$
# ---------------------------------------------------------------------------

# Customizable data for Database acces
JDBC_CLASSES=
IDB_HOME=/usr/local/lib
IDB_CLASSES_1=$IDB_HOME/idb.jar
IDB_CLASSES_2=$IDB_HOME/idbexmpl.jar
ORACLE_CLASSES=/usr/local/lib/ojdbc14.jar
POSTGRE_CLASSES=/usr/lib/pgsql/pg73b1jdbc2.jar
INTERBASE_CLASSES=/usr/interclient/interclient.jar
MYSQL_CLASSES=/usr/local/lib/mm.mysql-2.0.14/mm.mysql-2.0.14-bin.jar
MCKOI_CLASSES=/usr/local/lib/mkjdbc.jar

# Avoid to add to the classpath unexisting .jar
for CLS in $IDB_CLASSES_1 $IDB_CLASSES_2 $ORACLE_CLASSES $POSTGRE_CLASSES $INTERBASE_CLASSES $MYSQL_CLASSES $MCKOI_CLASSES
do
    if [ -f "$CLS" ]
    then
	if echo $CLASSPATH | grep $CLS >/dev/null
	then :
	else 
	    if [ -z "$JDBC_CLASSES" ]
	    then
		JDBC_CLASSES=$CLS
	    else
		JDBC_CLASSES=$JDBC_CLASSES$SPS$CLS
	    fi
	fi
    fi
done

# JDBC drivers classes
if [ ! -z "$JDBC_CLASSES" ]
then
    CLASSPATH=$JDBC_CLASSES$SPS$CLASSPATH
fi

# tools.jar needed for JSPs
CLASSPATH=$CLASSPATH$SPS$JAVA_HOME/lib/tools.jar
