#!/usr/bin/env bash

if [ "$SAGE_LOCAL" = "" ]; then
   echo "SAGE_LOCAL undefined ... exiting";
   echo "Maybe run 'sage -sh'?"
   exit 1
fi

cd src

python configure.py --no-qsci-api --no-designer-plugin --confirm-license
if [ $? -ne 0 ]; then
   echo "Error configuring PyQt4."
   exit 1
fi

make
if [ $? -ne 0 ]; then
   echo "Error making PyQt4."
   exit 1
fi

make install
if [ $? -ne 0 ]; then
   echo "Error installing PyQt4."
   exit 1
fi

