#!/bin/csh -f
# ----------------------------------------------------------------------
#  RAPPTURE ENVIRONMENT
#
#  This is the main script that most people use to invoke the
#  Rappture GUI.  It sets environment variables so that the Rappture
#  GUI driver will work properly for the current installation.
#
# ======================================================================
#  AUTHOR:  Michael McLennan, Purdue University
#  Copyright (c) 2004-2008  Purdue Research Foundation
#
#  See the file "license.terms" for information on usage and
#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# ======================================================================
#

# If you install Rappture elsewhere, edit the line below:
set exec_prefix=@INSTALL_PREFIX@

set bindir=@bindir@
set libdir=@libdir@
set vtkdir=@VTKDIR@
set python_version=@PYTHON_VERSION@
set tcl_version=@TCL_VERSION@
set octave_version=@OCTAVE_VERSION_MAJOR@

set path = ( $bindir $path )

if ( $?LD_LIBRARY_PATH ) then
  setenv LD_LIBRARY_PATH "${libdir}:${vtkdir}:$LD_LIBRARY_PATH"
else
  setenv LD_LIBRARY_PATH "${libdir}:${vtkdir}:${libdir}/vtk"
endif

if ( $?DYLD_LIBRARY_PATH ) then
  setenv DYLD_LIBRARY_PATH "${libdir}:${vtkdir}:$DYLD_LIBRARY_PATH"
else
  setenv DYLD_LIBRARY_PATH "${libdir}:${vtkdir}"
endif

if ( $?MATLABPATH ) then
  setenv MATLABPATH "${libdir}/matlab:$MATLABPATH"
else
  setenv MATLABPATH "${libdir}/matlab"
endif

if ( $?OCTAVE_PATH ) then
  setenv OCTAVE_PATH "${libdir}/octave${octave_version}:$OCTAVE_PATH"
else
  setenv OCTAVE_PATH "${libdir}/octave${octave_version}"
endif

if ( $?OCTAVE_LOADPATH ) then
  setenv OCTAVE_LOADPATH "${libdir}/octave3:$OCTAVE_LOADPATH"
else
  setenv OCTAVE_LOADPATH "${libdir}/octave3"
endif

if ( $?PERL5LIB ) then
  setenv PERL5LIB "${libdir}/perl:$PERL5LIB"
else
  setenv PERL5LIB "${libdir}/perl"
endif

if ( $?PYTHONPATH ) then
  setenv PYTHONPATH  "${libdir}/python${python_version}/site-packages:$PYTHONPATH"
else
  setenv PYTHONPATH  "${libdir}/python${python_version}/site-packages"
endif

if ( $?RUBYLIB ) then
  setenv RUBYLIB "${libdir}/ruby:$RUBYLIB"
else
  setenv RUBYLIB "${libdir}/ruby"
endif

if ( $?TCL_LIBRARY ) then
  setenv TCL_LIBRARY "${libdir}/tcl${tcl_version}:$TCL_LIBRARY"
else
  setenv TCL_LIBRARY "${libdir}/tcl${tcl_version}"
endif

if ( $?TK_LIBRARY ) then
  setenv TK_LIBRARY "${libdir}/tk${tcl_version}:$TK_LIBRARY"
else
  setenv TK_LIBRARY "${libdir}/tk${tcl_version}"
endif

if ( $?TCLLIBPATH ) then
  setenv TCLLIBPATH "${vtkdir} $TCLLIBPATH"
else
  setenv TCLLIBPATH "${vtkdir}"
endif

if ( $?CLASSPATH ) then
  setenv CLASSPATH "${libdir}/java:$CLASSPATH"
else
  setenv CLASSPATH "${libdir}/java"
endif
  

