cd src

if [ "$SAGE_DEBUG" = "yes" ]; then
    echo "Building a debug version of IML."
    export CFLAGS="-O0 -g $CFLAGS"
else
    export CFLAGS="-O3 -g $CFLAGS"
fi

sdh_configure --enable-shared \
              --with-default="$SAGE_LOCAL" \
              --with-cblas="$(pkg-config --libs cblas)" \
              --with-cblas-include="$(pkg-config --cflags cblas)" \
              "$IML_CONFIGURE"
sdh_make
sdh_make_install
