#!/sbin/sh

########
#  Product: GraphicsPHIGSDK
#  Fileset: PHIGS-MAN
#  configure
#  @(#) $Revision: 206.1 $
########
#
# (c) Copyright Hewlett-Packard Company, 1993
#
########

	UTILS="/usr/lbin/sw/control_utils"

	if [[ ! -f $UTILS ]]
	then
		echo "ERROR: Cannot find $UTILS"
		exit 1
	fi

	. $UTILS

	exitval=$SUCCESS

################################################################################
#set -x # For debugging purposes.  _Never_ ship uncommented!!

	##
	## Set up local environment variables
	##

	SW_INSTALL_DIR="/"
	
	##
	## Test to see if either SW_ROOT_DIRECTORY or SW_LOCATION is
	## set to something other than /.  If so, set up SW_INSTALL_DIR
	## so it will not have spurious /'s in the path name.
	##
	
	if [ $SW_ROOT_DIRECTORY != / -o $SW_LOCATION != / ]
		then
		if [ $SW_ROOT_DIRECTORY != / ]
			then
				if [ $SW_LOCATION != / ]
					then
						SW_INSTALL_DIR="${SW_ROOT_DIRECTORY}${SW_LOCATION}"
					else
						SW_INSTALL_DIR="${SW_ROOT_DIRECTORY}"
				fi
			else
				if [ $SW_LOCATION != / ]
					then
						SW_INSTALL_DIR="${SW_LOCATION}"
				fi
		fi
	fi

	PHIGS_DIR="$SW_LOCATION"

 	##
 	## Place path to top of man page directories into /etc/MANPATH
 	## if not already present.
 	##
 	PHIGS_MAN_PATH="${PHIGS_DIR}share/man"

	mod_pathfile -a MP $PHIGS_MAN_PATH
 
	exit $exitval
################################################################################
