#!/usr/bin/env bash
if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";
echo "Maybe run 'sage -sh'?"
exit 1
fi
unset RM
cd src
./configure \
--prefix="$SAGE_LOCAL" \
--libdir="$SAGE_LOCAL/lib"
if [ $? -ne 0 ]; then
echo "Error configuring libogg"
exit 1
fi
$MAKE
if [ $? -ne 0 ]; then
echo "Error building libogg"
exit 1
fi
$MAKE -j1 install
if [ $? -ne 0 ]; then
echo "Error installing libogg"
exit 1
fi