echo Checking libraries ... >&2
g++ util/test02.cc
TEMP=`./a.out`
case $TEMP in
*27.1.4)
	echo OK you have libg++-2.7.1 >&2 ;;
*27.2*)
	echo OK you have libg++-2.7.2 >&2 ;;
2.7.2)
	echo OK you have libg++-2.7.2 >&2 ;;
*)
	echo Sorry, ears won\'t compile with this libg++. >&2
	echo Please upgrade to libg++-2.7.2. >&2 
	exit 1 ;;
esac
rm -f a.out
#

echo Checking gcc version ... >&2
sleep 1
TEMP=`gcc -v 2>&1`
case $TEMP in
*2.7.2*)
	echo OK you have gcc-2.7.2 >&2 ;;
*)
	echo Sorry, ears won\'t compile with this gcc. >&2
	echo Please upgrade to gcc-2.7.2. >&2
	exit 1 ;;
esac

echo Checking libg++ headers ... >&2
TEMP=`gcc util/test01.cc 2>&1`
case $TEMP in
*fail*)
	echo Your libg++-2.7.1.4 headers don\'t seem to be installed properly. >&2 
	echo Please make sure the newest ones are in /usr/include/g++ >&2
	exit 1 ;;
*)
	echo OK your libg++ headers seem to be installed properly. >&2
	rm -f a.out
esac

echo >&2
echo Please specify in Makefile which sound driver you have. >&2
echo The default is the Linux kernel sound driver \(VOXWARE\). >&2
echo Others are Open Sound System \(OSS\), SUN, and AF. >&2
echo >&2
echo After that, type make again. >&2