#!/bin/sh
#* ----------------------------------------------------------------------
#*               Proprietary and Confidential Information
#*
#* This material contains, and is part of a computer software program
#* which is, proprietary and confidential information owned by COMPUTER
#* ASSOCIATES INTERNATIONAL, INC.  The program, including this material,
#* may not be duplicated, disclosed or reproduced in whole or in part for
#* any purpose without the express written authorization of COMPUTER
#* ASSOCIATES. All authorized reproductions must be marked with this
#* legend.
#*
#*                          Copyright (c) 1992-2006
#*             Computer Associates International, Incorporated
#*                          All rights reserved
#*
#* ----------------------------------------------------------------------
#*  SCCS Module Control Stamp
#* ----------------------------------------------------------------------
#
#
#

echo $- | grep u > /dev/null
if [ $? = 0 ];then
	set +u
	CACSUTILS_setu=1; export CACSUTILS_setu
fi


        # Assuming that if shell options are supported in user's
        # current shell then nolog is also supported
        if [ `uname -s` = "SunOS" ];then
           shell_options_supported=1
        else
           set -o 1> /dev/null 2>&1
           shell_options_supported=$?
        fi

        # Only set nolog flag for shells that support options
        if [ "$shell_options_supported" = "0" ]; then

		if [ -x /usr/bin/nawk ] ; then
		    CAAWK=nawk
		elif [ -x /bin/gawk -o -x /usr/bin/gawk -o -x /usr/local/bin/gawk ] ; then
		    CAAWK=`which gawk`
		else
		    CAAWK=awk
		fi

		[ "$CANOLOG_flag" != "off" ] && {
		  CANOLOG_flag=`set -o 2>&1 |grep "^nolog" |$CAAWK -F' ' '{print $2}' 2>/dev/null`
		  export CANOLOG_flag
		}

		[ "$CANOLOG_flag" != "" ] && set -o nolog 2>/dev/null

		CAAWK=""; BASH=""; KSH=""

	fi # "$shell_options_supported" = "0"

 # add $CABIN and $CASHCOMP/bin to PATH
 if [ -f "${CASHCOMP}/csutils/scripts/addpath" ]; then

	. "$CASHCOMP/csutils/scripts/addpath"

	[ "$CABIN" ] && ca_add_path "$CABIN"

	ca_add_path "${CASHCOMP}/bin"
 fi


 # add $CALIB, $CASHCOMP/lib, and /usr/lib to <platform library>_PATH...
 if [ -f "${CASHCOMP}/csutils/scripts/addlibpath" ];then

	. "$CASHCOMP/csutils/scripts/addlibpath"

	[ "$CALIB" ] && ca_add_libpath "$CALIB"

	ca_add_libpath "$CASHCOMP/lib"
	ca_add_libpath /opt/CA/CAlib
	ca_add_libpath /usr/lib
 fi


# if called by envusrcsh, dump all envs
if [ "${1:-null}" = "csh" ]; then
	env 
fi

