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

Commit

Permalink
check for PARI packages in PARI's spkg-configure
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase committed Aug 4, 2019
1 parent 2e11aed commit 183f47c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 43 deletions.
11 changes: 8 additions & 3 deletions build/pkgs/pari/spkg-configure.m4
Expand Up @@ -3,22 +3,27 @@ SAGE_SPKG_CONFIGURE([pari], [
m4_pushdef([SAGE_PARI_MINVER],["133889"])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_GMP])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_READLINE])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI_ELLDATA])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI_GALDATA])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI_GALPOL])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI_SEADATA])
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI_SEADATA_SMALL])
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 pari as well])
sage_spkg_install_pari=yes
else
AC_MSG_RESULT([no])
AC_MSG_CHECKING([installing readline? ])
if test x$sage_spkg_install_readline = xyes; then
AC_MSG_CHECKING([installing readline or PARI/GP packages? ])
if test x$sage_spkg_install_readline = xyes -o x$sage_spkg_install_pari_galdata = xyes -o x$sage_spkg_install_pari_galpol = xyes \
-o x$sage_spkg_install_pari_seadata_small = xyes -o x$sage_spkg_install_pari_seadata = xyes -o x$sage_spkg_install_pari_elldata = xyes; then
AC_MSG_RESULT([yes; install pari as well])
sage_spkg_install_pari=yes
else
AC_MSG_RESULT([no])
AC_CHECK_HEADER([pari/pari.h], [], [sage_spkg_install_pari=yes])
dnl matpermanent appears in pari 2.11
AC_SEARCH_LIBS([matpermanent], [pari], [
AC_PATH_PROG([GP], [gp])
if test x$GP != x; then
AC_MSG_CHECKING([getting GP's version ])
gp_version=`echo "v=version(); v[[1]]<<16 + v[[2]]<<8 + v[[3]]" | $GP -qf`
Expand Down
13 changes: 5 additions & 8 deletions build/pkgs/pari_elldata/spkg-configure.m4
@@ -1,11 +1,6 @@
SAGE_SPKG_CONFIGURE([pari_elldata], [
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI])
AC_MSG_CHECKING([installing pari? ])
if test x$sage_spkg_install_pari = xyes; then
AC_MSG_RESULT([yes; install pari_elldata as well])
sage_spkg_install_pari_elldata=yes
else
AC_MSG_RESULT([no])
AC_PATH_PROG([GP], [gp])
if test x$GP != x; then
AC_MSG_CHECKING([is pari_elldata installed? ])
gp_ell_check=`echo "r=ellinit(\"11a1\"); r[[11]]" | $GP -qf`
if test x$gp_ell_check = x20008; then
Expand All @@ -15,7 +10,9 @@ SAGE_SPKG_CONFIGURE([pari_elldata], [
AC_MSG_NOTICE([Install elldata package and reconfigure.])
AC_MSG_NOTICE([Otherwise Sage will build its own pari/GP.])
sage_spkg_install_pari_elldata=yes
sage_spkg_install_pari=yes
fi
else
AC_MSG_NOTICE([gp is not found])
sage_spkg_install_pari_elldata=yes
fi
])
13 changes: 5 additions & 8 deletions build/pkgs/pari_galdata/spkg-configure.m4
@@ -1,11 +1,6 @@
SAGE_SPKG_CONFIGURE([pari_galdata], [
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI])
AC_MSG_CHECKING([installing pari? ])
if test x$sage_spkg_install_pari = xyes; then
AC_MSG_RESULT([yes; install pari_galdata as well])
sage_spkg_install_pari_galdata=yes
else
AC_MSG_RESULT([no])
AC_PATH_PROG([GP], [gp])
if test x$GP != x; then
AC_MSG_CHECKING([is pari_galdata installed? ])
gp_gal_check=`echo "polgalois(x^8-2)[[1]]" | $GP -qf`
if test x$gp_gal_check = x16; then
Expand All @@ -15,7 +10,9 @@ SAGE_SPKG_CONFIGURE([pari_galdata], [
AC_MSG_NOTICE([Install galdata package and reconfigure.])
AC_MSG_NOTICE([Otherwise Sage will build its own pari/GP.])
sage_spkg_install_pari_galdata=yes
sage_spkg_install_pari=yes
fi
else
AC_MSG_NOTICE([gp is not found])
sage_spkg_install_pari_elldata=yes
fi
])
13 changes: 5 additions & 8 deletions build/pkgs/pari_galpol/spkg-configure.m4
@@ -1,11 +1,6 @@
SAGE_SPKG_CONFIGURE([pari_galpol], [
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI])
AC_MSG_CHECKING([installing pari? ])
if test x$sage_spkg_install_pari = xyes; then
AC_MSG_RESULT([yes; install pari_galpol as well])
sage_spkg_install_pari_galpol=yes
else
AC_MSG_RESULT([no])
AC_PATH_PROG([GP], [gp])
if test x$GP != x; then
AC_MSG_CHECKING([is pari_galpol installed? ])
gp_ell_check=`echo "galoisgetname(12,1)" | $GP -qf`
if test "x$gp_ell_check = xC3\ \:\ C4"; then
Expand All @@ -15,7 +10,9 @@ SAGE_SPKG_CONFIGURE([pari_galpol], [
AC_MSG_NOTICE([Install galpol package and reconfigure.])
AC_MSG_NOTICE([Otherwise Sage will build its own pari/GP.])
sage_spkg_install_pari_galpol=yes
sage_spkg_install_pari=yes
fi
else
AC_MSG_NOTICE([gp is not found])
sage_spkg_install_pari_galpol=yes
fi
])
13 changes: 5 additions & 8 deletions build/pkgs/pari_seadata/spkg-configure.m4
@@ -1,11 +1,6 @@
SAGE_SPKG_CONFIGURE([pari_seadata], [
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI])
AC_MSG_CHECKING([installing pari? ])
if test x$sage_spkg_install_pari = xyes; then
AC_MSG_RESULT([yes; install pari_seadata as well])
sage_spkg_install_pari_seadata=yes
else
AC_MSG_RESULT([no])
AC_PATH_PROG([GP], [gp])
if test x$GP != x; then
AC_MSG_CHECKING([is pari_seadata installed? ])
gp_seadat_check=`echo "poldegree(ellmodulareqn(211)[[1]])" | $GP -qf`
if test x$gp_seadat_check = x212; then
Expand All @@ -15,7 +10,9 @@ SAGE_SPKG_CONFIGURE([pari_seadata], [
AC_MSG_NOTICE([Install seadata package and reconfigure.])
AC_MSG_NOTICE([Otherwise Sage will build its own pari/GP.])
sage_spkg_install_pari_seadata=yes
sage_spkg_install_pari=yes
fi
else
AC_MSG_NOTICE([gp is not found])
sage_spkg_install_pari_seadata=yes
fi
])
13 changes: 5 additions & 8 deletions build/pkgs/pari_seadata_small/spkg-configure.m4
@@ -1,11 +1,6 @@
SAGE_SPKG_CONFIGURE([pari_seadata_small], [
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI])
AC_MSG_CHECKING([installing pari? ])
if test x$sage_spkg_install_pari = xyes; then
AC_MSG_RESULT([yes; install pari_seadata_small as well])
sage_spkg_install_pari_seadata_small=yes
else
AC_MSG_RESULT([no])
AC_PATH_PROG([GP], [gp])
if test x$GP != x; then
AC_MSG_CHECKING([is pari_seadata_small installed? ])
gp_seadat_check=`echo "poldegree(ellmodulareqn(11)[[1]])" | $GP -qf`
if test x$gp_seadat_check = x12; then
Expand All @@ -15,7 +10,9 @@ SAGE_SPKG_CONFIGURE([pari_seadata_small], [
AC_MSG_NOTICE([Install seadata package and reconfigure.])
AC_MSG_NOTICE([Otherwise Sage will build its own pari/GP.])
sage_spkg_install_pari_seadata_small=yes
sage_spkg_install_pari=yes
fi
else
AC_MSG_NOTICE([gp is not found])
sage_spkg_install_pari_seadata_small=yes
fi
])

0 comments on commit 183f47c

Please sign in to comment.