:

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc:$PATH
export PATH
unset SCOMPAT

XACCELHOME=
XARCH=
XLIB=/usr/lib/X11
XBIN=/usr/bin/X11

implementation="`uname -s`"
release="`uname -r`"

case "$implementation" in
"SunOS" )
	XARCH=SOLARIS
	XLIB=/usr/openwin/lib
	XBIN=/usr/openwin/bin
	;;

"Linux" )
	XARCH=LINUX
	XLIB=/usr/X11R6/lib/X11
	XBIN=/usr/X11R6/bin
	;;

"FreeBSD" )
	XARCH=FreeBSD
	XLIB=/usr/X11R6/lib/X11
	XBIN=/usr/X11R6/bin
	;;

"NetBSD" )
	XARCH=NetBSD
	XLIB=/usr/X11R6/lib/X11
	XBIN=/usr/X11R6/bin
	;;

"BSD/OS" )
	XARCH=BSDI
	XLIB=/usr/X11R6/lib/X11
	XBIN=/usr/X11R6/bin
	;;

"BSD/386" )
	XARCH=BSDI
	XLIB=/usr/X11/lib/X11
	XBIN=/usr/X11/bin
	;;

"LynxOS" )
	XARCH=LynxOS
	;;

"AIX" )
	XARCH=AIX
	;;


*)
	case "$release" in
        "5" )
                XARCH=UnixWare
                XLIB=/usr/X/lib/X11
                XBIN=/usr/X/bin
                ;;


	"4.2" | "4.2MP" )
		XARCH=UnixWare
		XLIB=/usr/X/lib
		XBIN=/usr/X/bin
		;;

	"3.2" )
		if [ -f /etc/perms/rts ]
		then	
		        XARCH=SCO
		else
		        XARCH=ISC
		fi
		;;
	esac
	;;
esac

if [ "x$XARCH" = "x" ]
then
	echo "Unknown Architecture ($implementation $release)"
	exit 1
fi

XACCELHOME=$XLIB/AcceleratedX

export XACCELHOME XARCH XBIN XLIB

## see if XACCELHOME exists.  If so, tell user he/she has to remove any existing
##  accelx packages, specifically the XACCELHOME directory

if [ -d "$XACCELHOME" ] 
then

	cat -<<EOF

Install has detected an existing Accelerated-X installation 
in $XACCELHOME.  Please remove any existing Accelerated-X 
package before attempting to install this package.
If you do not currently have Accelerated-X installed, remove 
or rename the $XACCELHOME directory before 
attempting to install this package.

EOF

	echo "Press RETURN to continue."
	if [ "$XARCH" != "SOLARIS" ]
	then
		read junk
	else
		read junk </dev/tty
	fi

	exit 1
fi

    ## see if there's an Xaccel.ini, if so, move it to Xaccel.ini.OLD

if [ -r /etc/Xaccel.ini ]
then   # save it
	echo "## Moving existing /etc/Xaccel.ini to /etc/Xaccel.ini.OLD"
	mv /etc/Xaccel.ini /etc/Xaccel.ini.OLD
fi

exit 0





