cd src

# The git head of arb now honors LDFLAGS; The following workaround can
# be removed in arb >= 2.8 when it is released
export EXTRA_SHARED_FLAGS=$LDFLAGS

./configure --disable-static --prefix="$SAGE_LOCAL" --with-flint="$SAGE_LOCAL" \
    --with-gmp="$SAGE_LOCAL" --with-mpfr="$SAGE_LOCAL"
if [ $? -ne 0 ]; then
    echo >&2 "Error configuring arb."
    exit 1
fi

$MAKE verbose
if [ $? -ne 0 ]; then
    echo >&2 "Error building arb."
    exit 1
fi

$MAKE install
if [ $? -ne 0 ]; then
    echo >&2 "Error installing arb."
    exit 1
fi
