cd src

more_configure_options=

if [ `uname` = Darwin ]; then
    more_configure_options="$more_configure_options --without-fink"
fi

# We disable SoPlex to avoid linking errors (#24905).
# Since polymake v3.4, it does not find our lrs installation if we do not provide --with-lrs explicitly.
./configure --without-java \
            --without-javaview \
            --without-soplex \
            --with-lrs="$SAGE_LOCAL" \
            --prefix="$SAGE_LOCAL" \
            --exec-prefix="$SAGE_LOCAL" \
            --includedir="$SAGE_LOCAL"/include \
            --bindir="$SAGE_LOCAL"/bin \
            --libdir="$SAGE_LOCAL"/lib \
            $more_configure_options || sdh_die "Error configuring Polymake"
sdh_make
sdh_make_install
