#
#
# start - for X11R6.4 env distributions.
#
# $XiGId: start,v 1.4 2000/11/15 05:39:34 jon Exp $
#
######################################################################

# get startdata filename

startdata="$1"	# this should already exist

# figure out if this is a glibc system.  If so, 
#  Flag it as such in the startdata file.

if [ "$SYSTYPE" = "Linux" ]
then
	glibok=0

	# if an override, set it and exit success
	if [ ! -z "$VAROVERRIDE" ]
	then	# 
		Log "$PKGNAME: variant: Override to: $VAROVERRIDE"
		echo "START_LINUX_GLIBC=1" >>$startdata
		glibok=1
		exit $EXITCODE_OK
	fi

	if $LS /lib/libc-2* >/dev/null 2>&1 
	then	# It's a libc 6 system
		echo "START_LINUX_GLIBC=1" >>$startdata
		Log "## Detected a Linux/glibc system"
		glibok=1
	elif $LS /lib/libc.6.so* >/dev/null 2>&1
	then
		echo "START_LINUX_GLIBC=1" >>$startdata
		Log "## Detected a Linux/glibc system"
		glibok=1
	elif $LS /lib/libc.so.6* >/dev/null 2>&1
	then
		echo "START_LINUX_GLIBC=1" >>$startdata
		Log "## Detected a Linux/glibc system"
		glibok=1
	else
		echo "START_LINUX_GLIBC=0" >>$startdata
		glibok=0
	fi	

	if [ $glibok -ne 1 ]
	then
		MessageBox "Cannot Install $PRODUCT_NAME" \
"



$PRODUCT_NAME requires glibc 
version 2.0 or better.
Cannot proceed with Installation.
Please Contact Xi Graphics Technical Support if you
believe you have recieved this message in
error."

		# For completeness, though useless as we will exit
		#  in error afterwards - nothing like anal retentiveness...
		echo "START_LINUX_GLIBC=0" >>$startdata
		exit $EXITCODE_ERROR
	fi

else
	echo "START_LINUX_GLIBC=0" >>$startdata
fi

exit $EXITCODE_OK

