Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
update for Sage 8.7.rc0, a typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase committed Mar 20, 2019
2 parents c9873ae + 50aebab commit 0fc433f
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/arb/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd src
export EXTRA_SHARED_FLAGS=$LDFLAGS

./configure --disable-static --prefix="$SAGE_LOCAL" $SAGE_CONFIGURE_GMP \
--with-flint="$SAGE_LOCAL" --with-mpfr="$SAGE_LOCAL" || \
--with-flint="$SAGE_LOCAL" $SAGE_CONFIGURE_MPFR || \
sdh_die "Error configuring arb."

sdh_make verbose
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/deformation/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cd src
# Note: Not actually an autoconf-generated configure; doesn't support
# all standard flags, so we can't use sdh_configure
./configure --prefix="$SAGE_LOCAL" --disable-static \
$SAGE_CONFIGURE_GMP --with-mpfr="$SAGE_LOCAL" \
$SAGE_CONFIGURE_GMP $SAGE_CONFIGURE_MPFR \
--with-flint="$SAGE_LOCAL" || \
sdh_die "Failed to configure deformation"
sdh_make
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/flint/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo "Configuring FLINT."
--disable-static \
--prefix="$SAGE_LOCAL" \
$SAGE_CONFIGURE_GMP \
--with-mpfr="$SAGE_LOCAL" \
$SAGE_CONFIGURE_MPFR \
--with-ntl="$SAGE_LOCAL" \
$FLINT_CONFIGURE || sdh_die "Error: Failed to configure FLINT."

Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/gdb/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export LDFLAGS="${LDFLAGS} -L${SAGE_LOCAL}/lib -ltinfo"

sdh_configure \
--with-mpc="$SAGE_LOCAL" \
--with-mpfr="$SAGE_LOCAL" \
$SAGE_CONFIGURE_MPFR \
$SAGE_CONFIGURE_GMP
sdh_make
sdh_make_install
2 changes: 1 addition & 1 deletion build/pkgs/mpc/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ $UNAME = "CYGWIN" ]; then
fi

# Building
sdh_configure $SAGE_CONFIGURE_GMP --with-mpfr="$SAGE_LOCAL" $EXTRA
sdh_configure $SAGE_CONFIGURE_GMP $SAGE_CONFIGURE_MPFR $EXTRA
sdh_make

# Cleaning
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/mpfi/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd src
# Use newer version of config.guess and config.sub (see Trac #19716)
cp "$SAGE_ROOT"/config/config.* .

sdh_configure --with-mpfr="$SAGE_LOCAL" $SAGE_CONFIGURE_GMP
sdh_configure $SAGE_CONFIGURE_MPFR $SAGE_CONFIGURE_GMP
sdh_make
sdh_make_install

Expand Down
50 changes: 50 additions & 0 deletions build/pkgs/mpfr/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
SAGE_SPKG_CONFIGURE([mpfr], [
AC_ARG_WITH([mpfr],
[AS_HELP_STRING([--with-mpfr=system],
[use the system MPFR, if possible (default)])]
[AS_HELP_STRING([--with-mpfr=install],
[use the Sage SPKG for MPFR])])
dnl Just part the options here
case "$with_mpfr" in
system) ;;
install) ;;
"") with_mpfr=system;;
*)
AC_MSG_ERROR([allowed values for --with-mpfr are system and install]);;
esac
case "$with_mpfr" in
system)
AC_CHECK_HEADER(mpfr.h, [], [sage_spkg_install_mpfr=yes])
dnl mpfr_free_pool appeared in r11922 (Dec 2017) on MPFR svn
AC_SEARCH_LIBS([mpfr_free_pool], [mpfr], [break], [sage_spkg_install_mpfr=yes])
if test x$sage_spkg_install_mpfr = xyes; then
AC_SUBST(SAGE_MPFR_PREFIX, ['$SAGE_LOCAL'])
dnl AC_SUBST(SAGE_MPFR_INCLUDE, ['$SAGE_LOCAL/include']) --- not used
AC_MSG_RESULT([using Sage's mpfr SPKG])
else
dnl If found, we want to get the absolute path to where we
dnl found it for use with some packages want
dnl this information at configure time
AX_ABSOLUTE_HEADER([mpfr.h])
if test x$gl_cv_absolute_mpfr_h = x; then
AC_MSG_ERROR(m4_normalize([
failed to find absolute path to mpfr.h despite it being reported found
]))
fi
dnl AC_SUBST(SAGE_MPFR_INCLUDE, [`AS_DIRNAME($gl_cv_absolute_mpfr_h)`])
AC_SUBST(SAGE_MPFR_PREFIX, [''])
AC_MSG_RESULT([using mpfr library from the system])
fi
;;
install)
sage_spkg_install_mpfr=yes
AC_SUBST(SAGE_MPFR_PREFIX, ['$SAGE_LOCAL'])
dnl AC_SUBST(SAGE_MPFR_INCLUDE, ['$SAGE_LOCAL/include'])
AC_MSG_RESULT([using Sage's mpfr SPKG])
;;
esac
])
2 changes: 1 addition & 1 deletion build/pkgs/mpfrcx/spkg-install
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cd src

sdh_configure $SAGE_CONFIGURE_GMP --with-mpfr="$SAGE_LOCAL" \
sdh_configure $SAGE_CONFIGURE_GMP $SAGE_CONFIGURE_MPFR \
--with-mpc="$SAGE_LOCAL" --disable-static --enable-shared
sdh_make
sdh_make_install
9 changes: 9 additions & 0 deletions src/bin/sage-env-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@ if [ -n "$SAGE_GMP_PREFIX" ]; then
# --with-gmp without an argument is actually a bug)
export SAGE_CONFIGURE_GMP="--with-gmp=$SAGE_GMP_PREFIX"
fi

# The MPFR case is very close to the GMP case above
# This is usually blank if the system MPFR is used, or $SAGE_LOCAL otherwise
export SAGE_MPFR_PREFIX="@SAGE_MPFR_PREFIX@"
if [ -n "$SAGE_MPFR_PREFIX" ]; then
# Some packages that depend on MPFR accept a --with-mpfr=<prefix> flag to
# their ./configure scripts. Thus we deal with this just as with GMP above.
export SAGE_CONFIGURE_MPFR="--with-mpfr=$SAGE_MPFR_PREFIX"
fi

0 comments on commit 0fc433f

Please sign in to comment.