if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";
echo "Maybe run 'sage -sh'?"
exit 1
fi
# Let the user set an environment variable CFLAG64 to indicate the flag
# for the C compiler to build 64-bit code. If not set, asssume it is -m64
# as that is what is used by both GCC and SunStudio, but -m64 is not used
# by IBM's compiler on AIX or HP's compiier on HP-UX
if [ -z $CFLAG64 ] ; then
CFLAG64=-m64 # -m64 is used by gcc and SunStudio.
fi
if [ "x$SAGE64" = xyes ] ; then
echo "Building a 64-bit version of GLPK"
CFLAGS="$CFLAGS $CFLAG64" && export CFLAGS
LDFLAGS="$LDFLAGS $CFLAG64" && export LDFLAGS
CPPFLAGS="$CPPFLAGS $CFLAG64" && export CPPFLAGS # Very rare is CPPFLAGS needed, but sometimes it is.
fi
cd src
echo "GLPK will now be tested"
make check
if [ $? -ne 0 ]; then
echo "An error occurred whilst testing GLPK"
exit 1
fi