From 183f47c23e5b8a3f1acdf37b9c2c37f8cd337ee5 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 4 Aug 2019 13:40:37 +0300 Subject: [PATCH] check for PARI packages in PARI's spkg-configure --- build/pkgs/pari/spkg-configure.m4 | 11 ++++++++--- build/pkgs/pari_elldata/spkg-configure.m4 | 13 +++++-------- build/pkgs/pari_galdata/spkg-configure.m4 | 13 +++++-------- build/pkgs/pari_galpol/spkg-configure.m4 | 13 +++++-------- build/pkgs/pari_seadata/spkg-configure.m4 | 13 +++++-------- build/pkgs/pari_seadata_small/spkg-configure.m4 | 13 +++++-------- 6 files changed, 33 insertions(+), 43 deletions(-) diff --git a/build/pkgs/pari/spkg-configure.m4 b/build/pkgs/pari/spkg-configure.m4 index 3e5673300d1..4c726a76ad0 100644 --- a/build/pkgs/pari/spkg-configure.m4 +++ b/build/pkgs/pari/spkg-configure.m4 @@ -3,14 +3,20 @@ 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 @@ -18,7 +24,6 @@ SAGE_SPKG_CONFIGURE([pari], [ 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` diff --git a/build/pkgs/pari_elldata/spkg-configure.m4 b/build/pkgs/pari_elldata/spkg-configure.m4 index d4afb167100..fcbaa5c6feb 100644 --- a/build/pkgs/pari_elldata/spkg-configure.m4 +++ b/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 @@ -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 ]) diff --git a/build/pkgs/pari_galdata/spkg-configure.m4 b/build/pkgs/pari_galdata/spkg-configure.m4 index c944054d9e0..5a3288ad304 100644 --- a/build/pkgs/pari_galdata/spkg-configure.m4 +++ b/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 @@ -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 ]) diff --git a/build/pkgs/pari_galpol/spkg-configure.m4 b/build/pkgs/pari_galpol/spkg-configure.m4 index 91141bc45aa..0becab36eae 100644 --- a/build/pkgs/pari_galpol/spkg-configure.m4 +++ b/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 @@ -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 ]) diff --git a/build/pkgs/pari_seadata/spkg-configure.m4 b/build/pkgs/pari_seadata/spkg-configure.m4 index c7765e84a58..97d55a15c88 100644 --- a/build/pkgs/pari_seadata/spkg-configure.m4 +++ b/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 @@ -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 ]) diff --git a/build/pkgs/pari_seadata_small/spkg-configure.m4 b/build/pkgs/pari_seadata_small/spkg-configure.m4 index af274de4ef8..143fa04732b 100644 --- a/build/pkgs/pari_seadata_small/spkg-configure.m4 +++ b/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 @@ -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 ])