cd src

if [ "$SAGE_DEBUG" = "yes" ]; then
    export CFLAGS="-O0 -g $CFLAGS"
else
    export CFLAGS="-O2 -g $CFLAGS"
fi

if [ "$SAGE64" = "yes" ]; then
    export CFLAGS="-m64 $CFLAGS"
fi

$MAKE check

if [ $? -ne 0 ]; then
   echo "Error testing libatomic_ops."
   exit 1
fi
