#! /bin/sh
# The following two are the ANSI sequences for start and end embolden
case $TERM in
vt*|ansi*|con*|xterm*|linux*|screen*)
S=[1m
E=[m
;;
*)
S=
E=
;;
esac
echo; echo "${S}__ STARTING TEST COMPILE __${E}"; echo;
MAKE=`which gmake`
if test "x$?" = x1 ; then
MAKE="make -s"
else
MAKE=`which gmake | sed -e "s%\([a-z:]\) .*%\1%g"`
if test x$MAKE = x; then
MAKE="make -s"
elif test x$MAKE = xno; then
MAKE="make -s"
else
if test "x$MAKE" = "xwhich:"; then
MAKE="make -s"
else
MAKE="gmake -s"
fi
fi
fi
#echo MAKE is $MAKE
#echo
testmake ()
{
if test x$1 = x0; then
echo "PASS: configure ${TEST}";
$MAKE clean > /dev/null 2>&1 && $MAKE > /dev/null 2>> test_log
if test x$? = x0; then
echo "PASS: $MAKE ${TEST}";
else
echo "FAIL: $MAKE ${TEST} (see ./test_log)";
fi
else
echo "FAIL: configure ${TEST} (see ./test_log)";
fi
}
testcompile ()
{
rm -f ./test_log
TEST="${S}disable gnome${E}"
#
./configure --quiet --disable-gnome > /dev/null 2>> test_log
#
testmake $?
TEST="${S}disable opengl${E}"
#
./configure --quiet --disable-opengl > /dev/null 2>> test_log
#
testmake $?
TEST="${S}with gnuplot${E}"
#
./configure --quiet --with-gnuplot > /dev/null 2>> test_log
#
testmake $?
TEST="${S}disable disk${E}"
#
./configure --quiet --disable-disk > /dev/null 2>> test_log
#
testmake $?
TEST="${S}high precision${E}"
#
./configure --quiet --enable-high-precision > /dev/null 2>> test_log
#
testmake $?
TEST="${S}disable disk, disable opengl${E}"
#
./configure --quiet --disable-disk --disable-opengl > /dev/null 2>> test_log
#
testmake $?
TEST="${S}disable disk, disable gtk2${E}"
#
./configure --quiet --disable-disk --disable-gtk2 > /dev/null 2>> test_log
#
testmake $?
TEST="${S}disable nls${E}"
#
./configure --quiet --disable-nls > /dev/null 2>> test_log
#
testmake $?
$MAKE distclean > /dev/null 2>&1
}
testcompile
echo; echo "${S}__ END TEST COMPILE __${E}"; echo;
exit
syntax highlighted by Code2HTML, v. 0.9.1