# $Id: mesasdk_init.csh 117 2011-11-22 17:04:16Z townsend $

# Check that MESASDK_ROOT is set

if ( ! ${?MESASDK_ROOT} ) then
    echo "mesasdk_init.csh: you need to set the MESASDK_ROOT environment variable"
endif

# Check architecture

if ( `${MESASDK_ROOT}/bin/mesasdk_arch_check.pl` != 'Y' ) then
    echo "mesasdk_init.csh: unsupported architecture"
endif

# Set paths

setenv PATH "${MESASDK_ROOT}/bin:${PATH}"
setenv PGPLOT_DIR "${MESASDK_ROOT}/pgplot"

if ( ${?MANPATH} ) then
    setenv MANPATH "${MESASDK_ROOT}/share/man:${MANPATH}"
else
    setenv MANPATH "${MESASDK_ROOT}/share/man"
endif

if ( ${?DYLD_LIBRARY_PATH} ) then
    setenv DYLD_LIBRARY_PATH "${MESASDK_ROOT}/lib:${PGPLOT_DIR}:${DYLD_LIBRARY_PATH}"
else
    setenv DYLD_LIBRARY_PATH "${MESASDK_ROOT}/lib:${PGPLOT_DIR}/pgplot"
endif
