@GLOBUS_SCRIPT_INITIALIZER@

if [ x$prefix != "x/usr" ]; then
    if [ `uname 2> /dev/null` = Linux -o \
         `uname 2> /dev/null` = SunOS ]; then
        DELIM=
        if [ -n "${LD_LIBRARY_PATH}" ]; then
            DELIM=:
        fi
        LD_LIBRARY_PATH="${libdir}${DELIM}${LD_LIBRARY_PATH}"
        export LD_LIBRARY_PATH 
    fi

    if [ `uname 2> /dev/null` = 'Darwin' ]; then
        DELIM=
        if [ -n "${DYLD_LIBRARY_PATH}" ]; then
            DELIM=:
        fi
        DYLD_LIBRARY_PATH="${libdir}${DELIM}${DYLD_LIBRARY_PATH}"
        export DYLD_LIBRARY_PATH
    fi

    if [ `uname 2> /dev/null` = 'AIX' ]; then
        if [ -z "${LIBPATH}" ]; then
            LIBPATH="/usr/lib:/lib"
        fi
        LIBPATH="${libdir}:${LIBPATH}"
        export LIBPATH
    fi

    if [ `uname 2> /dev/null` = 'HP-UX' ]; then
        DELIM=
        if [ -n "${SHLIB_PATH}" ]; then
            DELIM=:
        fi
        SHLIB_PATH="${libdir}${DELIM}${SHLIB_PATH}"
        export SHLIB_PATH
    fi
fi

globus_source () {

  # Check if file exists and source it
  if [ ! -f "$1" ] ; then
     ${GLOBUS_SH_PRINTF-printf} "$1 not found.\n" >&2
     exit 1
  fi

  . "$1"
}
