#!/bin/sh

#	
#	Attempt to dig out installation directory
#	of the BASE package
#
umask 022

#TOPDIR=`pkgparam HPXT-BASE TOPDIR`
. /usr/bin/X11/700X/admin/env.vars

if [ $? -ne 0 -o ! -d "$TOPDIR" ]
then
  echo "ERROR:   Could not locate installation directory of HPXT-BASE package."
  echo "ERROR:   This package must be installed before other packages"
  exit 1
fi


#---------------------------------------------------------#
# Support for new ASX fonts on SunOS 4.1.x
# Env var HPJAPANESE has been set up in BASE/request
# and indicates if this is a JLE environment
# (as recommended by Seiju)
#
#---------------------------------------------------------#

if [ $OS = "sun4" -o $OS = "sun5" ]
then
  if [ "$HPJAPANESE" = "no" ]
  then
    exit 3		# to "pkgadd" this means "don't install" 
  fi
fi


echo TOPDIR=$TOPDIR 		> $1

exit 0
