#!/bin/csh -f
#
# GaussView 5.0 launch script.
#
#    Copyright (c) 1996-2010 Semichem, Inc.
#    All Rights Reserved
#
  if (! $?GV_DIR) then
    echo gview script failed because GV_DIR was not defined
    exit 1
  endif

  if ($?LD_LIBRARY_PATH) then
    unsetenv LD_LIBRARY_PATH
    endif

  if ( x"$1" == "x-mesagl" || x"$1" == "x-soft" ) then
    setenv USE_MESAGL
    shift
  endif

  if ( -e "${GV_DIR}/bin/gv_ld_env.csh" ) then
    source "${GV_DIR}/bin/gv_ld_env.csh"
  else
    echo gview failed because gv_ld_env.csh was not found
    exit 1
  endif

  "${GV_DIR}/gview.exe" $*
