-
-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #27822: Update configure with checks for mpfr, mpc, and ntl
This ticket bundles together #27258, #27259, and #27265 in such a way that the configure tarball is updated to contain the configure changes from each of those tickets. Once all three have been merged (or at the same time) this ticket can also be merged to bump the configure version. '''Updated configure''': http://users.ox.ac.uk/~coml0531/sage/configure-321.tar.gz URL: https://trac.sagemath.org/27822 Reported by: embray Ticket author(s): Erik Bray Reviewer(s): Dima Pasechnik
- Loading branch information
Showing
18 changed files
with
145 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
tarball=configure-VERSION.tar.gz | ||
sha1=c91befc71803600bcfcfa5637b8330f65dcf594c | ||
md5=eee7fd54b6aa2131981ab46442fe09a0 | ||
cksum=2162906054 | ||
sha1=912a146042cdb1839b33e3bf2262440d60d122b2 | ||
md5=74659209f427e09f86deab7e40c3da8f | ||
cksum=1443936693 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
320 | ||
321 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
SAGE_SPKG_CONFIGURE([mpc], [ | ||
AC_REQUIRE([SAGE_SPKG_CONFIGURE_MPFR]) | ||
AC_MSG_CHECKING([installing mpfr? ]) | ||
if test x$sage_spkg_install_mpfr = xyes; then | ||
AC_MSG_RESULT([yes; install mpc as well]) | ||
sage_spkg_install_mpc=yes | ||
else | ||
AC_MSG_RESULT([no]) | ||
AC_CHECK_HEADER(mpc.h, [], [sage_spkg_install_mpc=yes]) | ||
dnl mpc_cmp_abs appeared in MPC 1.1.0 | ||
AC_SEARCH_LIBS([mpc_cmp_abs], [mpc], [break], [sage_spkg_install_mpc=yes]) | ||
fi | ||
], [], [], [ | ||
if test x$sage_spkg_install_mpc = xyes; then | ||
AC_SUBST(SAGE_MPC_PREFIX, ['$SAGE_LOCAL']) | ||
AC_MSG_RESULT([using Sage's mpc SPKG]) | ||
else | ||
AC_SUBST(SAGE_MPC_PREFIX, ['']) | ||
AC_MSG_RESULT([using mpc library from the system]) | ||
fi | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
SAGE_SPKG_CONFIGURE([mpfr], [ | ||
AC_REQUIRE([SAGE_SPKG_CONFIGURE_GMP]) | ||
AC_MSG_CHECKING([installing gmp/mpir? ]) | ||
if test x$sage_spkg_install_mpir = xyes -o x$sage_spkg_install_gmp = xyes; then | ||
AC_MSG_RESULT([yes; install mpfr as well]) | ||
sage_spkg_install_mpfr=yes | ||
else | ||
AC_MSG_RESULT([no]) | ||
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]) | ||
fi | ||
], [], [], [ | ||
if test x$sage_spkg_install_mpfr = xyes; then | ||
AC_SUBST(SAGE_MPFR_PREFIX, ['$SAGE_LOCAL']) | ||
AC_MSG_RESULT([using Sage's mpfr SPKG]) | ||
else | ||
AC_SUBST(SAGE_MPFR_PREFIX, ['']) | ||
AC_MSG_RESULT([using mpfr library from the system]) | ||
fi | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" \ | ||
--with-mpc="$SAGE_LOCAL" --disable-static --enable-shared | ||
sdh_configure $SAGE_CONFIGURE_GMP $SAGE_CONFIGURE_MPFR \ | ||
$SAGE_CONFIGURE_MPC --disable-static --enable-shared | ||
sdh_make | ||
sdh_make_install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
SAGE_SPKG_CONFIGURE([ntl], [ | ||
AC_REQUIRE([SAGE_SPKG_CONFIGURE_GMP]) | ||
AC_MSG_CHECKING([installing gmp/mpir? ]) | ||
if test x$sage_spkg_install_mpir = xyes -o x$sage_spkg_install_gmp = xyes; then | ||
AC_MSG_RESULT([yes; install ntl as well]) | ||
sage_spkg_install_ntl=yes | ||
else | ||
AC_MSG_RESULT([no]) | ||
fi | ||
m4_pushdef(SAGE_NTL_VERSION_MAJOR, [10]) | ||
m4_pushdef(SAGE_NTL_VERSION_MINOR, [3]) | ||
if test x$sage_spkg_install_ntl != xyes; then | ||
AC_CHECK_HEADER([NTL/ZZ.h], [], [sage_spkg_install_ntl=yes]) | ||
AC_MSG_CHECKING([whether we can link a program using NTL]) | ||
NTL_SAVED_LDFLAGS=$LDFLAGS | ||
LDFLAGS="$LDFLAGS -lntl" | ||
AC_LINK_IFELSE([ | ||
AC_LANG_PROGRAM([[#include <NTL/ZZ.h>]], | ||
[[NTL::ZZ a;]] | ||
)], [LIBS="$LIBS -lntl"] | ||
[AC_MSG_RESULT([yes])], [ | ||
AC_MSG_RESULT([no]); sage_spkg_install_ntl=yes | ||
]) | ||
LDFLAGS=$NTL_SAVED_LDFLAGS | ||
AC_MSG_CHECKING([NTL version >= ]SAGE_NTL_VERSION_MAJOR[.]SAGE_NTL_VERSION_MINOR) | ||
AC_RUN_IFELSE([ | ||
AC_LANG_PROGRAM( | ||
[[#include <NTL/version.h> | ||
#include <stdio.h> | ||
]], [[ | ||
printf("%s\n", NTL_VERSION); | ||
if (NTL_MAJOR_VERSION >]] SAGE_NTL_VERSION_MAJOR[[) return 0; | ||
else if (NTL_MAJOR_VERSION ==]] SAGE_NTL_VERSION_MAJOR[[ && | ||
NTL_MINOR_VERSION >=]] SAGE_NTL_VERSION_MINOR[[) return 0; | ||
else return 1; | ||
]])], [], [sage_spkg_install_ntl=yes]) | ||
fi | ||
m4_popdef([SAGE_NTL_VERSION_MAJOR]) | ||
m4_popdef([SAGE_NTL_VERSION_MINOR]) | ||
], [], [], [ | ||
if test x$sage_spkg_install_ntl = xyes; then | ||
AC_SUBST(SAGE_NTL_PREFIX, ['$SAGE_LOCAL']) | ||
AC_MSG_RESULT([using Sage's ntl SPKG]) | ||
else | ||
AC_SUBST(SAGE_NTL_PREFIX, ['']) | ||
AC_MSG_RESULT([using ntl library from the system]) | ||
fi | ||
]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters