. $EMPRESSPATH/config/options

if test "$MSSYS_TESTCCOMPILEROPTIONS" = ""
then
	MSSYS_TESTCCOMPILEROPTIONS=$MSSYS_DEVCCOMPILEROPTIONS
fi

if test -f runscpt
then
	./runscpt
else
	echo "Compiling the C program"

	case $MSSYS_PLATFORM in
	  SYS_OS_UNIX_SOLARIS*)
		# Solaris compiler complains multiple -K options
		# when $MSSYS_DEVCCOMPILEROPTIONS is also specified.
		# We want MSSYS_DEVCCOMPILEROPTIONS to check if there
		# is any bug in the test program.
		empcc script.c -o script
		;;
	  *)
		empcc $MSSYS_TESTCCOMPILEROPTIONS script.c -o script
		;;
	esac
	echo "Running the compiled program"
	./script $MSTESTDB > testout 2>&1
	rm -f script script.o
fi
