diff -Nru macaulay2-1.22~rc1+ds/debian/changelog macaulay2-1.22+ds/debian/changelog --- macaulay2-1.22~rc1+ds/debian/changelog 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/debian/changelog 2023-06-15 02:11:45.000000000 +0000 @@ -1,27 +1,54 @@ -macaulay2 (1.22~rc1+ds-2~ubuntu23.04.1) lunar; urgency=low +macaulay2 (1.22+ds-1~ubuntu23.04.1) lunar; urgency=low * Auto build. - -- Doug Torrance Fri, 02 Jun 2023 02:24:38 +0000 + -- Doug Torrance Thu, 15 Jun 2023 02:11:45 +0000 -macaulay2 (1.22~rc1+ds-2) jammy; urgency=medium +macaulay2 (1.22+ds-1) unstable; urgency=medium - * debian/examples/AssociativeAlgebras/_opposite__Ring.out - - Add new cached example that was crashing consistently in jammy. - * debian/patches/use-cached-examples.patch - - Use cached examples in AssociativeAlgebras. - * debian/scripts/Debian.m2 - - Add AssociativeAlgebras::oppositeRing to list of examples to generate - using generateExamples(). + * New upstream release. + * debian/control + - Remove libgivaro-dev from Build-Depends; no longer needed. + - Replace node-highlight.js with node-prismjs in Build-Depends; + the JavaScript engine for syntax highlighting the HTML + documentation has changed. + - Remove w3c-markup-validator from Build-Depends; no longer used + now that HTML documentation has switched from XHTML 1.1 to HTML5. + * debian/copyright + - Add vendored Prism JavaScript files to Files-Excluded. + - Bump my copyright years. + - Add license information for new packages: + + BernsteinSato + + CellularResolutions + + HolonomicSystems + + MatchingFields + + PolyominoIdeals + + SagbiGbDetection + - Remove validator-runner.py license information; script was removed. + * debian/examples + - Add new cached examples: + + AssociativeAlgebras::oppositeRing (known to segfault) + + Macaulay2Doc::autoload (build path) + + Macaulay2Doc::listLocalSymbols (build path) + + Macaulay2Doc::locate (build path) + + Macaulay2Doc::the debugger (build path) + * debian/nodejs/extlinks + - Swap highlight.js for prismjs + * debian/patches + - Refresh for new upstream release. + - highlightjs.patch: Remove patch; unnecessary after switch to Prism. + - reproducible-startup-m2.patch: New patch; use install location + instead of build location for startup.m2 file location (for + reproducibility). + * debian/rules + - Update build to use Prism instead of highlight.js. + - Remove HTML validation check during dh_auto_test. After switching to + HTML5, this check now uses the Python tool html5validator, which is + not in Debian yet. + * debian/script/Debian.m2 + - Add new cached examples to list of examples to generate. - -- Doug Torrance Thu, 01 Jun 2023 22:14:44 -0400 - -macaulay2 (1.22~rc1+ds-1) jammy; urgency=medium - - * New upstream release candidate. - * Built especially for Minneapolis Macaulay2 workshop. - - -- Doug Torrance Thu, 01 Jun 2023 10:29:55 -0400 + -- Doug Torrance Wed, 14 Jun 2023 21:42:55 -0400 macaulay2 (1.21+ds-3) unstable; urgency=medium diff -Nru macaulay2-1.22~rc1+ds/debian/control macaulay2-1.22+ds/debian/control --- macaulay2-1.22~rc1+ds/debian/control 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/debian/control 2023-06-15 02:11:41.000000000 +0000 @@ -72,7 +72,6 @@ node-style-loader , npm , pkg-js-tools , - w3c-markup-validator , webpack Standards-Version: 4.6.2 Homepage: http://macaulay2.com diff -Nru macaulay2-1.22~rc1+ds/debian/git-build-recipe.manifest macaulay2-1.22+ds/debian/git-build-recipe.manifest --- macaulay2-1.22~rc1+ds/debian/git-build-recipe.manifest 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/debian/git-build-recipe.manifest 2023-06-15 02:11:45.000000000 +0000 @@ -1,3 +1,3 @@ # git-build-recipe format 0.4 deb-version {debversion} -lp:~profzoom/macaulay2/+git/ppa git-commit:d6defd76d4af6af6e202ab6e03dc1bf55e29aabd +lp:~profzoom/macaulay2/+git/ppa git-commit:86970e3932edda88fb76d7a29220e3f39fb83fd7 nest emacs lp:~profzoom/macaulay2/+git/emacs M2/Macaulay2/editors/emacs git-commit:2bac85883e2edd479f606ef8eedbbf2869770200 diff -Nru macaulay2-1.22~rc1+ds/debian/patches/git-description.patch macaulay2-1.22+ds/debian/patches/git-description.patch --- macaulay2-1.22~rc1+ds/debian/patches/git-description.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/git-description.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,19 @@ +Description: Provide version#"git description". + Since we may not be building the package from a git repository, we + hardcode the git description ahead of time. This patch is + automatically updated by debian/scripts/m2-get-orig-source.sh. +Author: Doug Torrance +Forwarded: not-needed +Last-Update: 2020-12-21 + +--- a/M2/configure.ac ++++ b/M2/configure.ac +@@ -572,7 +572,7 @@ + NEW_COMMITS=`$GIT rev-list $($GIT rev-list -1 HEAD $srcdir/VERSION)..HEAD --count` + GIT_COMMIT=`$GIT describe --dirty --always --match HEAD` + if test "$NEW_COMMITS-$GIT_COMMIT" = "-" +-then GIT_DESCRIPTION=version-$PACKAGE_VERSION-unknown ++then GIT_DESCRIPTION=version-1.21-481-6cba5590c + else GIT_DESCRIPTION=version-$PACKAGE_VERSION-$NEW_COMMITS-$GIT_COMMIT + fi + AC_DEFINE_UNQUOTED(GIT_DESCRIPTION,"$GIT_DESCRIPTION",[summary of git status]) diff -Nru macaulay2-1.22~rc1+ds/debian/patches/reproducible-startup-m2.patch macaulay2-1.22+ds/debian/patches/reproducible-startup-m2.patch --- macaulay2-1.22~rc1+ds/debian/patches/reproducible-startup-m2.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/reproducible-startup-m2.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Use install location instead of build location for startup.m2 + for reproducibility. +Author: Doug Torrance +Bug: https://github.com/Macaulay2/M2/issues/2780 +Forwarded: not-needed +Last-Update: 2023-03-14 + +--- a/M2/Macaulay2/d/Makefile.in ++++ b/M2/Macaulay2/d/Makefile.in +@@ -219,7 +219,7 @@ + @(\ + cat @srcdir@/startup-header.h; \ + echo 'cached_file startupFile = {' ; \ +- echo @abs_top_srcdir@/Macaulay2/m2/startup.m2.in | sed $(BSTRING) ; \ ++ echo @packagesdir@/Core/startup.m2 | sed $(BSTRING) ; \ + echo ',' ; \ + cat ../m2/startup.m2 | sed $(SSTRING) ; \ + echo '};' ; \ +--- a/M2/Macaulay2/m2/code.m2 ++++ b/M2/Macaulay2/m2/code.m2 +@@ -44,7 +44,7 @@ + if filename =!= "stdio" then ( + wp := set characters " \t\r);"; + file := ( +- if match("startup.m2.in$", filename) then startupString ++ if match("startup.m2$", filename) then startupString + else if filename === "currentString" then currentString + else ( + if not fileExists filename then error ("couldn't find file ", filename); diff -Nru macaulay2-1.22~rc1+ds/debian/patches/reproducible-version.patch macaulay2-1.22+ds/debian/patches/reproducible-version.patch --- macaulay2-1.22~rc1+ds/debian/patches/reproducible-version.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/reproducible-version.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,37 @@ +Description: Reproducible version hash table. + - For version#"configure arguments", we replace the build directory + with "/build/path" in all the instances of the -fdebug-prefix-map + flag. + - For version#"compile-node-name" and version#"operating system release", we + use dummy values. +Author: Doug Torrance +Forwarded: not-needed +Last-Update: 2021-09-23 + +--- a/M2/configure.ac ++++ b/M2/configure.ac +@@ -6,7 +6,7 @@ + AC_SUBST(CONFIGURED_FILES,"$ac_config_files") + AC_SUBST(CONFIG_ARGS,"$ac_configure_args") + echo "'$0' $ac_configure_args" > config.args +-C_CONFIG_ARGS=` echo "$ac_configure_args" | sed -e 's=\\\\=\\\\\\\\=g' -e 's=\\"=\\\\"=g' ` ++C_CONFIG_ARGS=`echo "$ac_configure_args" | sed -e 's=\\\\=\\\\\\\\=g' -e 's=\\"=\\\\"=g' -e "s=$CURDIR=/build/path=g"` + AC_DEFINE_UNQUOTED(CONFIG_ARGS,"$C_CONFIG_ARGS",arguments used for configure) + AC_SUBST(CONFIG_CMD,"'$0' $ac_configure_args") + +@@ -73,13 +73,13 @@ + dnl $ eval $A + dnl hi + +-AC_SUBST(NODENAME,"`uname -n`") ++AC_SUBST(NODENAME,"m2-compile-node") + AC_DEFINE_UNQUOTED(NODENAME,"$NODENAME",hostname used for compilation) + + AC_SUBST(ISSUE) # no initial value + AC_ARG_WITH(issue, AS_HELP_STRING([--with-issue=...,specify the OS issue (e.g., Ubuntu-7.10)]),ISSUE=$withval) + AC_SUBST(OS,"` uname -s | sed s=/=-=g `") +-AC_SUBST(REL,"` uname -r | sed -e s=/=-=g -e 's= =+=' -e 's=[()]==g' `") ++AC_SUBST(REL,"m2-os-release") + AC_SUBST(UNAME_INFO_COMMAND," uname -pmso 2>/dev/null || uname -pms ") + AC_SUBST(UNAME_INFO,"` eval $UNAME_INFO_COMMAND `") + diff -Nru macaulay2-1.22~rc1+ds/debian/patches/series macaulay2-1.22+ds/debian/patches/series --- macaulay2-1.22~rc1+ds/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/series 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,9 @@ +git-description.patch +reproducible-version.patch +reproducible-startup-m2.patch +use-cached-examples.patch +skip-failing-core-tests.patch +skip-failing-package-tests.patch +skip-failing-engine-tests.patch +use-dh-elpa.patch +topcom-memopt.patch diff -Nru macaulay2-1.22~rc1+ds/debian/patches/skip-failing-core-tests.patch macaulay2-1.22+ds/debian/patches/skip-failing-core-tests.patch --- macaulay2-1.22~rc1+ds/debian/patches/skip-failing-core-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/skip-failing-core-tests.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,25 @@ +Description: Skip Core tests that have been known to fail on various + architectures. +Bug: https://github.com/Macaulay2/M2/issues/2162 (ComputationsBook/ + constructions) +Bug: https://github.com/Macaulay2/M2/issues/2242 (ComputationsBook/geometry + & ComputationsBook/solving) +Bug: https://github.com/Macaulay2/M2/issues/2533 (timing-quotient) +Author: Doug Torrance +Author: Graham Inggs +Origin: https://github.com/Macaulay2/M2/pull/2535 +Last-Update: 2022-06-28 + +--- a/M2/Macaulay2/tests/ComputationsBook/Makefile.in ++++ b/M2/Macaulay2/tests/ComputationsBook/Makefile.in +@@ -1,8 +1,8 @@ + # @configure_input@ + include ../../../include/config.Makefile + VPATH = @srcdir@ +-CHAPTERS = completeIntersections constructions d-modules exterior-algebra geometry \ +- monomialIdeals preface programming schemes solving toricHilbertScheme varieties ++CHAPTERS = completeIntersections d-modules exterior-algebra \ ++ monomialIdeals preface programming schemes toricHilbertScheme varieties + .PHONY: changes capture + all: + $(CHAPTERS):; $(MKDIR_P) "$@" diff -Nru macaulay2-1.22~rc1+ds/debian/patches/skip-failing-engine-tests.patch macaulay2-1.22+ds/debian/patches/skip-failing-engine-tests.patch --- macaulay2-1.22~rc1+ds/debian/patches/skip-failing-engine-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/skip-failing-engine-tests.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,15 @@ +Description: Skip failing engine tests. +Author: Doug Torrance +Bug: https://github.com/Macaulay2/M2/issues/2349 +Last-Update: 2021-12-09 + +--- a/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp ++++ b/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp +@@ -268,7 +268,6 @@ + if (degreeRing(1) == nullptr or error()) + { + std::cout << "Error: " << error_message() << std::endl; +- EXPECT_TRUE(false); + } + + FreeAlgebra* A = FreeAlgebra::create(globalQQ, diff -Nru macaulay2-1.22~rc1+ds/debian/patches/skip-failing-package-tests.patch macaulay2-1.22+ds/debian/patches/skip-failing-package-tests.patch --- macaulay2-1.22~rc1+ds/debian/patches/skip-failing-package-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/skip-failing-package-tests.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,485 @@ +Description: Skip package tests that have been known to fail on + various architectures. +Author: Doug Torrance +Bug: https://github.com/Macaulay2/M2/issues/1064 +Bug: https://github.com/Macaulay2/M2/issues/1539 +Bug: https://github.com/Macaulay2/M2/issues/1563 +Bug: https://github.com/Macaulay2/M2/issues/1579 +Bug: https://github.com/Macaulay2/M2/issues/1581 +Bug: https://github.com/Macaulay2/M2/issues/1745 +Bug: https://github.com/Macaulay2/M2/issues/1746 +Bug: https://github.com/Macaulay2/M2/issues/1903 +Bug: https://github.com/Macaulay2/M2/issues/1984 +Bug: https://github.com/Macaulay2/M2/issues/2162 +Bug: https://github.com/Macaulay2/M2/issues/2183 +Bug: https://github.com/Macaulay2/M2/issues/2205 +Bug: https://github.com/Macaulay2/M2/issues/2319 +Bug: https://github.com/Macaulay2/M2/issues/2651 +Bug: https://github.com/Macaulay2/M2/issues/2704 +Last-Update: 2022-12-31 + +--- a/M2/Macaulay2/m2/testing.m2 ++++ b/M2/Macaulay2/m2/testing.m2 +@@ -58,6 +58,14 @@ + if match("no-check-flag", teststring) then ( + checkmsg("skipping", desc); + return true); ++ if (m := regex("(?<=no-check-architecture:)[^(\\n]*", teststring)) =!= null ++ then ( ++ badarchs := apply(separate(", ", substring(m#0, teststring)), ++ s -> replace("^\\s*|\\s*$", "", s)); ++ if isMember(version#"architecture", badarchs) then ( ++ checkmsg("skipping", desc); ++ return true)); ++ + -- TODO: remove this when capture uses ArgQ + if usermode === not noinitfile then + -- try capturing in the same process +--- a/M2/Macaulay2/packages/GroebnerWalk.m2 ++++ b/M2/Macaulay2/packages/GroebnerWalk.m2 +@@ -726,6 +726,7 @@ + /// + + TEST /// -- groebnerWalk ++-- no-check-flag #1563 + R1 = QQ[x,y,z, MonomialOrder=>Weights=>{1,1,10}] + I1 = ideal(y^2-x, z^3-x) + R2 = QQ[x,y,z, MonomialOrder=>Weights=>{10,1,1}] +--- a/M2/Macaulay2/packages/SumsOfSquares.m2 ++++ b/M2/Macaulay2/packages/SumsOfSquares.m2 +@@ -1437,6 +1437,7 @@ + + --11 + TEST /// --lowerBound ++-- no-check-flag #1579 + debug needsPackage "SumsOfSquares" + results := checkLowerBound("CSDP") + assert all(results,t->t=!=false); +--- a/M2/Macaulay2/packages/CoincidentRootLoci/tests.m2 ++++ b/M2/Macaulay2/packages/CoincidentRootLoci/tests.m2 +@@ -180,6 +180,7 @@ + /// + + TEST /// -- singularLocus ++-- no-check-flag #1581 + X10 = coincidentRootLocus(toList(10:1),ZZ/101,Variable=>x) + A10 = {{},{{10}},{{10}},{{9,1}},{{10}},{{7,3},{8,2},{9,1}},{{8,1,1}},{{10}},{{6,4},{7,3},{9,1}},{{8,2}},{{6,2,2},{6,3,1},{7,2,1},{8,1,1}},{{7,1,1,1}},{},{{5,5},{6,4},{9,1}},{{5,5},{7,3},{8,2}},{{5,4,1},{6,3,1},{8,1,1}},{{5,3,2},{6,2,2},{7,2,1}},{{5,2,2,1},{5,3,1,1},{6,2,1,1},{7,1,1,1}},{{5,5},{6,1,1,1,1}},{{6,4}},{{5,4,1}},{{7,3}},{{4,3,3},{4,4,2},{5,3,2},{5,4,1},{6,3,1},{7,2,1}},{{4,3,3},{4,4,1,1},{5,3,1,1},{7,1,1,1}},{{4,4,2},{6,2,2}},{{4,2,2,2},{4,3,2,1},{4,4,1,1},{5,2,2,1},{6,2,1,1}},{{4,2,2,1,1},{4,3,1,1,1},{4,4,2},{5,2,1,1,1},{6,1,1,1,1}},{{4,4,1,1},{5,1,1,1,1,1}},{{4,3,3}},{{5,3,2}},{{3,3,2,2},{3,3,3,1},{4,3,2,1},{5,3,1,1}},{{3,3,3,1},{4,3,1,1,1}},{{3,3,2,2},{4,2,2,2},{5,2,2,1}},{{3,2,2,2,1},{3,3,2,1,1},{3,3,2,2},{4,2,2,1,1},{5,2,1,1,1}},{{3,2,2,1,1,1},{3,3,1,1,1,1},{3,3,2,1,1},{4,2,1,1,1,1},{5,1,1,1,1,1}},{{3,3,1,1,1,1},{4,1,1,1,1,1,1}},{},{{2,2,2,2,2},{3,2,2,2,1}},{{2,2,2,2,1,1},{3,2,2,1,1,1},{4,4,2}},{{2,2,2,1,1,1,1},{3,2,1,1,1,1,1},{4,4,1,1}},{{2,2,1,1,1,1,1,1},{3,1,1,1,1,1,1,1}},{}} + assert(sort apply(apply(subsets X10,singularLocus),L -> sort apply(L,partition)) === sort apply(A10,sort)) +--- a/M2/Macaulay2/packages/DeterminantalRepresentations.m2 ++++ b/M2/Macaulay2/packages/DeterminantalRepresentations.m2 +@@ -1305,6 +1305,7 @@ + -- TESTS + + TEST /// -- Quadratic case: over QQ, RR, CC ++-- no-check-flag #1746 + S = QQ[x1,x2,x3] + f = 1 - 8*x1*x2 - 4*x1*x3 - 100*x2^2 - 12*x2*x3 - x3^2 - 5*x1^2 + M = first detRep(f, Tolerance => 1e-10) +@@ -1517,6 +1518,7 @@ + /// + + TEST /// -- cholesky, randomPSD ++-- no-check-flag #1745 + eps = 1e-15 + A = randomPSD 5 + E = eigenvectors(A, Hermitian => true) +--- a/M2/Macaulay2/packages/SuperLinearAlgebra.m2 ++++ b/M2/Macaulay2/packages/SuperLinearAlgebra.m2 +@@ -219,6 +219,7 @@ + ) + + TEST/// ++-- no-check-flag #1984 + R1 = QQ[x_0..x_3]; + R2 = QQ[z_0..z_2]; + R = superRing(R1, R2); +@@ -271,6 +272,7 @@ + ) + + TEST /// ++-- no-check-flag #1984 + R1 = QQ[x_0..x_3]; + R2 = QQ[z_0..z_2]; + R = superRing(R1, R2); +--- a/M2/Macaulay2/packages/MultiprojectiveVarieties.m2 ++++ b/M2/Macaulay2/packages/MultiprojectiveVarieties.m2 +@@ -4279,6 +4279,7 @@ + /// + + TEST /// ++-- no-check-flag #2162 + ringP4 := ZZ/300007[a..e]; + f = rationalMap minors(2,matrix {{a,b,c,d},{b,c,d,e}}); + g = rationalMap(minors(2,matrix{{a,b,c},{b,c,d}}) + ideal e); +@@ -4309,6 +4310,7 @@ + /// + + TEST/// ++-- no-check-flag #2162 + Phi = last graph rationalMap projectiveVariety({1},{4},ZZ/300007); + assert(multidegree(,Phi) == multidegree Phi) + assert(projectiveDegrees Phi == multidegree Phi) +@@ -4521,6 +4523,7 @@ + /// + + TEST /// -- parametrizations 3 ++-- no-check-flag #1539 + needsPackage "SpecialFanoFourfolds"; + debug SpecialFanoFourfolds; + checkInverseParametrization = X -> ( +--- a/M2/Macaulay2/packages/SpecialFanoFourfolds.m2 ++++ b/M2/Macaulay2/packages/SpecialFanoFourfolds.m2 +@@ -3669,6 +3669,7 @@ + ------------------------------------------------------------------------ + + TEST /// -- Test 0 -- cubic fourfolds from strings: describe, discriminant, parameterCount ++-- no-check-flag #2162 + strIn := {"quintic del Pezzo surface", "quartic scroll", "3-nodal septic scroll", "one-nodal septic del Pezzo surface", "general cubic 4-fold of discriminant 38", "general cubic 4-fold of discriminant 42", "cubic 4-fold of discriminant 48"}; + strOut := "Special cubic fourfold of discriminant 14 + containing a (smooth) surface of degree 5 and sectional genus 1 +@@ -3704,6 +3705,7 @@ + /// + + TEST /// -- Test 1 (1/2) -- GM fourfolds from strings: describe, discriminant, parameterCount, toGrass ++-- no-check-flag #1539 + strIn := {"sigma-plane", "rho-plane", "tau-quadric"}; + strOut := "Special Gushel-Mukai fourfold of discriminant 10('') + containing a surface in PP^8 of degree 1 and sectional genus 0 +@@ -3735,6 +3737,7 @@ + /// + + TEST /// -- Test 2 (2/2) -- GM fourfolds from strings: describe, discriminant, parameterCount, toGrass ++-- no-check-flag #1539 + strIn := {"cubic scroll", "quintic del Pezzo surface", "general GM 4-fold of discriminant 20"}; + strOut := "Special Gushel-Mukai fourfold of discriminant 12 + containing a surface in PP^8 of degree 3 and sectional genus 0 +@@ -3767,6 +3770,7 @@ + /// + + TEST /// -- Test 3 -- 21 examples from GMtables ++-- no-check-flag #1539 + X = for i from 1 to 21 list ( + A = GMtables(i,ZZ/65521); + time specialGushelMukaiFourfold((rationalMap(ideal A_0,Dominant=>2)) ideal A_1,InputCheck=>0) +@@ -3779,6 +3783,7 @@ + /// + + TEST /// -- Test 4 -- parametrizations of Fano fourfolds ++-- no-check-flag #1539 + setRandomSeed 0; + for dg in {(2,0),(3,1),(4,1),(5,1),(4,3),(6,4),(8,5),(10,6),(12,7),(14,8),(16,9),(18,10)} do ( + <<"(d,g) = "<true,Singular=>false); + assert(g#"image" =!= null and dim image g == 2 and degree image g == 14 and dim target g == 8) + /// +@@ -3841,6 +3847,7 @@ + /// + + TEST /// -- Test 11 (2/2) -- detectCongruence ++-- no-check-flag #1539 + use Grass(1,4,ZZ/33331); + S31 = ideal(p_(3,4),p_(2,4),p_(1,4),p_(0,4),p_(2,3),p_(1,3),p_(1,2)); + Y = specialGushelMukaiFourfold(S31,InputCheck=>0); +@@ -3851,6 +3858,7 @@ + /// + + TEST /// -- Test 12 (1/2) -- GM fourfolds containing nodal surfaces ++-- no-check-flag #2162 + debug SpecialFanoFourfolds; + K = ZZ/65521; + X = makeGMfromCurveOnSurfaceInP6((surface({2,0,0,0},K,ambient=>6)).cache#"takeCurve" (1,(0,0,0)),InputCheck=>0); +@@ -3862,6 +3870,7 @@ + /// + + TEST /// -- Test 13 (2/2) -- GM fourfolds containing nodal surfaces ++-- no-check-architecture: s390x (#2162) + X = specialGushelMukaiFourfold("nodal surface of degree 11 and genus 3 with class (7,4)",ZZ/33331,InputCheck=>0); + assert(discriminant X == 26 and last cycleClass X == (7,4) and degree surface X == 11 and sectionalGenus surface X == 3); + Y = specialGushelMukaiFourfold("nodal D44",ZZ/33331,InputCheck=>0); +@@ -3893,6 +3902,7 @@ + /// + + TEST /// -- Test 15 ++-- no-check-flag #1539 + debug SpecialFanoFourfolds + L = takeGMsfromSurfaceInP6(surface({3,1,1,0},ambient=>6),InputCheck=>0,"Gluing"=>"cubic scroll",Degrees=>hashTable{1=>(1,1),2=>(19,infinity),3=>(0,0)}); + X = first L; +--- a/M2/Macaulay2/packages/NumericalImplicitization/tests.m2 ++++ b/M2/Macaulay2/packages/NumericalImplicitization/tests.m2 +@@ -137,6 +137,7 @@ + /// + + TEST /// -- Twisted cubic projections ++-- no-check-flag #2183 + R = CC[x_0..x_3] + I = monomialCurveIdeal(R, {1,2,3}) + F1 = random(R^1, R^{3:-1}) +--- a/M2/Macaulay2/packages/EngineTests/Res.f4.m2 ++++ b/M2/Macaulay2/packages/EngineTests/Res.f4.m2 +@@ -553,6 +553,7 @@ + /// + + TEST /// ++-- no-check-flag #2205 + setRandomSeed "10" + needsPackage "BGG" + S = ZZ/101[x_0..x_5] -- P^5 +--- a/M2/Macaulay2/packages/CharacteristicClasses.m2 ++++ b/M2/Macaulay2/packages/CharacteristicClasses.m2 +@@ -2493,6 +2493,7 @@ + + TEST /// + -* ++ no-check-flag #2162 + restart + needsPackage "CharacteristicClasses" + *- +@@ -2506,6 +2507,7 @@ + + TEST /// + -* ++ no-check-flag #2162 + restart + needsPackage "CharacteristicClasses" + *- +@@ -2526,6 +2528,7 @@ + + TEST /// + -* ++ no-check-flag #2162 + restart + needsPackage "CharacteristicClasses" + installPackage "CharacteristicClasses" +--- a/M2/Macaulay2/packages/EngineTests/GB.Test.Mathic.m2 ++++ b/M2/Macaulay2/packages/EngineTests/GB.Test.Mathic.m2 +@@ -159,6 +159,7 @@ + /// + + TEST /// ++-- no-check-flag #2162 + R1 = ZZ/32003[w,x,y,z,MonomialOrder => Lex] + J1 = ideal" + -2w2+9wx+8x2+9wy+9xy+6y2-7wz-3xz-7yz-6z2-4w+8x+4y+8z+2, +--- a/M2/Macaulay2/packages/SegreClasses.m2 ++++ b/M2/Macaulay2/packages/SegreClasses.m2 +@@ -941,6 +941,7 @@ + + + TEST /// ++-- no-check-flag #2162 + -- union of coordinate axes in PP3 (diagonal) + -* + restart +@@ -959,6 +960,7 @@ + + TEST /// + -* ++ no-check-flag #2162 + restart + needsPackage "SegreClasses" + *- +@@ -972,6 +974,7 @@ + /// + + TEST /// ++-- no-check-flag #2162 + -- union of coordinate axes in PP3 (diagonal) + -* + restart +@@ -991,6 +994,7 @@ + + TEST /// + -* ++no-check-flag #2162 + restart + needsPackage "SegreClasses" + *- +@@ -1024,6 +1028,7 @@ + + TEST /// + -* ++no-check-flag #2162 + restart + needsPackage "SegreClasses" + *- +@@ -1060,6 +1065,7 @@ + + TEST /// + -* ++no-check-flag #2162 + restart + needsPackage "SegreClasses" + *- +@@ -1080,6 +1086,7 @@ + + TEST /// + -* ++no-check-flag #2162 + restart + needsPackage "SegreClasses" + *- +@@ -1095,6 +1102,7 @@ + + TEST /// + -* ++no-check-flag #2162 + restart + needsPackage "SegreClasses" + *- +@@ -1111,6 +1119,7 @@ + + TEST /// + -* ++no-check-flag #2162 + restart + needsPackage "SegreClasses" + *- +--- a/M2/Macaulay2/packages/SparseResultants.m2 ++++ b/M2/Macaulay2/packages/SparseResultants.m2 +@@ -1742,6 +1742,7 @@ + /// + + TEST /// -- Corollary 2.2, p. 256 [GKZ] ++-- no-check-flag #2162 + property = (M) -> ( + M = transpose matrix M; + K := ZZ/33331; n := numRows M; +--- a/M2/Macaulay2/packages/IntegralClosure.m2 ++++ b/M2/Macaulay2/packages/IntegralClosure.m2 +@@ -2820,6 +2820,7 @@ + --huneke2 + TEST /// + -* ++ no-check-flag #2162 + restart + loadPackage("IntegralClosure", Reload => true) + *- +--- a/M2/Macaulay2/packages/K3Surfaces.m2 ++++ b/M2/Macaulay2/packages/K3Surfaces.m2 +@@ -1061,6 +1061,7 @@ + /// + + TEST /// ++-- no-check-flag #2319 + for g from 3 to 12 do ( + for d from 3 to 5 do ( + <<"(g,d,n) = "<<(g,d,0)< +Bug: https://github.com/Macaulay2/M2/issues/1707 +Bug: https://github.com/Macaulay2/M2/issues/2712 +Last-Update: 2022-12-15 + +--- a/M2/Macaulay2/packages/Topcom.m2 ++++ b/M2/Macaulay2/packages/Topcom.m2 +@@ -119,7 +119,7 @@ + topcomIsRegularTriangulation = method(Options=>{Homogenize=>true}) + topcomIsRegularTriangulation(Matrix, List) := Boolean => opts -> (A, tri) -> ( + -- now create the output file +- (outfile, errfile) := callTopcom("checkregularity --checktriang -v", {topcomPoints(A, opts), [], tri }); ++ (outfile, errfile) := callTopcom("checkregularity --checktriang --memopt -v", {topcomPoints(A, opts), [], tri }); + match("[Cc]hecked 1 triangulations, 0 non-regular so far", get errfile) + ) + +@@ -317,7 +317,7 @@ + << "Index sets do not correspond to full-dimensional simplices" << endl; + return false; + ); +- (outfile, errfile) := callTopcom("points2nflips --checktriang -v", {topcomPoints(V, Homogenize=>false), [], T }); ++ (outfile, errfile) := callTopcom("points2nflips --checktriang --memopt -v", {topcomPoints(V, Homogenize=>false), [], T }); + not match("not valid", get errfile) + ) + diff -Nru macaulay2-1.22~rc1+ds/debian/patches/use-cached-examples.patch macaulay2-1.22+ds/debian/patches/use-cached-examples.patch --- macaulay2-1.22~rc1+ds/debian/patches/use-cached-examples.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/use-cached-examples.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,49 @@ +Description: Set AuxiliaryFiles and UseCachedExampleOutput options to + true for several packages whose examples are cached because + generating them has been known to cause build failures on various + architectures. See debian/scripts/generate-examples.m2. +Author: Doug Torrance +Forwarded: not-needed +Last-Update: 2021-02-20 + +--- a/M2/Macaulay2/packages/Macaulay2Doc.m2 ++++ b/M2/Macaulay2/packages/Macaulay2Doc.m2 +@@ -6,6 +6,7 @@ + newPackage ("Macaulay2Doc", + InfoDirSection => "Macaulay2 and its packages", + AuxiliaryFiles => true, ++ UseCachedExampleOutput => true, + Headline => "Macaulay2 documentation", + Authors => { + {Name => "Daniel R. Grayson", Email => "dan@math.uiuc.edu", HomePage => "http://www.math.uiuc.edu/~dan/"}, +--- a/M2/Macaulay2/m2/installPackage.m2 ++++ b/M2/Macaulay2/m2/installPackage.m2 +@@ -512,7 +512,7 @@ + cmphash := (cachef, inputhash) -> ( + cachehash := gethash cachef; + samehash := cachehash === inputhash; +- if not samehash then verboseLog("warning: cached example file " | ++ if not samehash then error("cached example file " | + cachef | " does not have expected hash" | newline | + "expected: " | toString inputhash |", actual: " | + toString cachehash); +--- a/M2/Macaulay2/packages/SemidefiniteProgramming.m2 ++++ b/M2/Macaulay2/packages/SemidefiniteProgramming.m2 +@@ -19,6 +19,7 @@ + Headline => "semidefinite programming", + Keywords => {"Real Algebraic Geometry", "Interfaces"}, + Configuration => {"CSDPexec"=>"","MOSEKexec"=>"mosek","SDPAexec"=>"sdpa","DefaultSolver"=>null}, ++ UseCachedExampleOutput => true, + AuxiliaryFiles => true, + PackageExports => {"NumericalAlgebraicGeometry"} + ) +--- a/M2/Macaulay2/packages/AssociativeAlgebras.m2 ++++ b/M2/Macaulay2/packages/AssociativeAlgebras.m2 +@@ -13,6 +13,7 @@ + Keywords => {"Noncommutative Algebra"}, + PackageImports =>{"Complexes"}, + PackageExports =>{"IntegralClosure"}, ++ UseCachedExampleOutput => true, + AuxiliaryFiles => true + ) + diff -Nru macaulay2-1.22~rc1+ds/debian/patches/use-dh-elpa.patch macaulay2-1.22+ds/debian/patches/use-dh-elpa.patch --- macaulay2-1.22~rc1+ds/debian/patches/use-dh-elpa.patch 1970-01-01 00:00:00.000000000 +0000 +++ macaulay2-1.22+ds/debian/patches/use-dh-elpa.patch 2023-06-15 02:11:41.000000000 +0000 @@ -0,0 +1,56 @@ +Description: Modifications to work with dh_elpa. + * Strip down setupEmacs() function. We only set f12 as a global key + to start Macaulay2 inside Emacs. This also strips (load "M2-init") + from a user's existing .emacs-Macaulay2 file, which would cause + errors if they haven't installed elpa-macaulay2. We also warn the + user if elpa-macaulay2 isn't installed. + * Fix path to M2-emacs-help.txt in documentation. +Author: Doug Torrance +Forwarded: not-needed +Last-Update: 2022-02-08 + +--- a/M2/Macaulay2/m2/files.m2 ++++ b/M2/Macaulay2/m2/files.m2 +@@ -387,12 +387,6 @@ + /// + + dotemacsFix0 = /// +-;; this version will give an error if M2-init.el is not found: +-(load "M2-init") +- +-;; this version will not give an error if M2-init.el is not found: +-;(load "M2-init" t) +- + ; You may comment out the following line with an initial semicolon if you + ; want to use your f12 key for something else. However, this action + ; will be undone the next time you run setup() or setupEmacs(). +@@ -474,10 +468,15 @@ + setupEmacs = method() + setup = method() + mungeEmacs = () -> ( +- dotemacsFix = concatenate(emacsHeader, apply(emacsfixes, (var,dir,templ) -> fix(var,dir,"",templ)), dotemacsFix0); ++ dotemacsFix = concatenate(emacsHeader, dotemacsFix0); + supplantStringFile(dotemacsFix,"~/"|M2emacs,false); +- mungeFile("~/"|".emacs", ";; Macaulay 2 start", ";; Macaulay 2 end", M2emacsRead ) +- ) ++ ret := mungeFile("~/"|".emacs", ";; Macaulay 2 start", ";; Macaulay 2 end", M2emacsRead ); ++ if run("dpkg -s elpa-macaulay2 2> /dev/null | " | ++ "grep -q \"^Status:.* installed\"") != 0 then ++ stderr << "--warning: you must run \"apt install elpa-macaulay2\" " ++ << "as root in order to use" << endl ++ << " Macaulay2 with Emacs." << endl; ++ ret) + prelim := () -> ( + promptUser = true; + if prefixDirectory === null then error "can't determine Macaulay 2 prefix (prefixDirectory not set)"; +--- a/M2/Macaulay2/packages/Macaulay2Doc/ov_getting_started.m2 ++++ b/M2/Macaulay2/packages/Macaulay2Doc/ov_getting_started.m2 +@@ -926,7 +926,7 @@ + It also provides for dynamic completion of symbols in the language.", + PARA{}, + "There is an ASCII version of this section of the documentation distributed +- in the file ", TT (Layout#1#"emacs" | "M2-emacs-help.txt"), ". It might be useful for you to visit ++ in the file ", TT "/usr/share/doc/elpa-macaulay2/M2-emacs-help.txt.gz", ". It might be useful for you to visit + that file with emacs now, thereby avoiding having to cut and paste bits of + text into emacs buffers for the demonstrations below.", + PARA{}, diff -Nru macaulay2-1.22~rc1+ds/debian/source/format macaulay2-1.22+ds/debian/source/format --- macaulay2-1.22~rc1+ds/debian/source/format 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/debian/source/format 2023-06-15 02:11:41.000000000 +0000 @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff -Nru macaulay2-1.22~rc1+ds/.gitignore macaulay2-1.22+ds/.gitignore --- macaulay2-1.22~rc1+ds/.gitignore 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/.gitignore 2023-06-14 18:30:58.000000000 +0000 @@ -16,7 +16,3 @@ .#* .*.swp -# Debian only -.pc -M2/BUILD/doug* -debian/files diff -Nru macaulay2-1.22~rc1+ds/M2/configure.ac macaulay2-1.22+ds/M2/configure.ac --- macaulay2-1.22~rc1+ds/M2/configure.ac 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/configure.ac 2023-06-14 18:30:58.000000000 +0000 @@ -6,7 +6,7 @@ AC_SUBST(CONFIGURED_FILES,"$ac_config_files") AC_SUBST(CONFIG_ARGS,"$ac_configure_args") echo "'$0' $ac_configure_args" > config.args -C_CONFIG_ARGS=`echo "$ac_configure_args" | sed -e 's=\\\\=\\\\\\\\=g' -e 's=\\"=\\\\"=g' -e "s=$CURDIR=/build/path=g"` +C_CONFIG_ARGS=` echo "$ac_configure_args" | sed -e 's=\\\\=\\\\\\\\=g' -e 's=\\"=\\\\"=g' ` AC_DEFINE_UNQUOTED(CONFIG_ARGS,"$C_CONFIG_ARGS",arguments used for configure) AC_SUBST(CONFIG_CMD,"'$0' $ac_configure_args") @@ -73,13 +73,13 @@ dnl $ eval $A dnl hi -AC_SUBST(NODENAME,"m2-compile-node") +AC_SUBST(NODENAME,"`uname -n`") AC_DEFINE_UNQUOTED(NODENAME,"$NODENAME",hostname used for compilation) AC_SUBST(ISSUE) # no initial value AC_ARG_WITH(issue, AS_HELP_STRING([--with-issue=...,specify the OS issue (e.g., Ubuntu-7.10)]),ISSUE=$withval) AC_SUBST(OS,"` uname -s | sed s=/=-=g `") -AC_SUBST(REL,"m2-os-release") +AC_SUBST(REL,"` uname -r | sed -e s=/=-=g -e 's= =+=' -e 's=[()]==g' `") AC_SUBST(UNAME_INFO_COMMAND," uname -pmso 2>/dev/null || uname -pms ") AC_SUBST(UNAME_INFO,"` eval $UNAME_INFO_COMMAND `") @@ -572,7 +572,7 @@ NEW_COMMITS=`$GIT rev-list $($GIT rev-list -1 HEAD $srcdir/VERSION)..HEAD --count` GIT_COMMIT=`$GIT describe --dirty --always --match HEAD` if test "$NEW_COMMITS-$GIT_COMMIT" = "-" -then GIT_DESCRIPTION=version-1.21-481-6cba5590c +then GIT_DESCRIPTION=version-$PACKAGE_VERSION-unknown else GIT_DESCRIPTION=version-$PACKAGE_VERSION-$NEW_COMMITS-$GIT_COMMIT fi AC_DEFINE_UNQUOTED(GIT_DESCRIPTION,"$GIT_DESCRIPTION",[summary of git status]) diff -Nru macaulay2-1.22~rc1+ds/M2/distributions/deb/changelog macaulay2-1.22+ds/M2/distributions/deb/changelog --- macaulay2-1.22~rc1+ds/M2/distributions/deb/changelog 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/distributions/deb/changelog 2023-06-14 18:30:58.000000000 +0000 @@ -94,3 +94,9 @@ macaulay2 (1.21.0.1) stable; urgency=low * release version 1.21.0.1 -- Daniel R Grayson Wed, 7 Dec 2022 09:50:25 -0500 +macaulay2 (1.22) stable; urgency=low + * release version 1.22 + -- Daniel R Grayson Wed, 7 Jun 2023 09:50:25 -0500 +macaulay2 (1.22.0.1) stable; urgency=low + * release version 1.22.0.1 + -- Daniel R Grayson Wed, 7 Jun 2023 09:50:25 -0500 diff -Nru macaulay2-1.22~rc1+ds/M2/libraries/gc/Makefile.in macaulay2-1.22+ds/M2/libraries/gc/Makefile.in --- macaulay2-1.22~rc1+ds/M2/libraries/gc/Makefile.in 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/libraries/gc/Makefile.in 2023-06-14 18:30:58.000000000 +0000 @@ -6,6 +6,7 @@ #VERSION = 7.6.2 LICENSEFILES = README.QUICK PATCHFILE = @abs_srcdir@/patch-$(VERSION) +SHARED = yes # the foreign functions package needs this # We can also get the sources from the home page above or from # https://github.com/ivmai/bdwgc/ @@ -57,7 +58,7 @@ ## always build for large memory configurations CPPFLAGS += -DMAX_HEAP_SECTS=81920 -DMAXHINCR=4096 -ifeq (@SHARED@,no) +ifeq (@SHARED@-SHARED,no-no) CONFIGOPTIONS += --disable-shared --enable-static endif diff -Nru macaulay2-1.22~rc1+ds/M2/libraries/readline/Makefile.in macaulay2-1.22+ds/M2/libraries/readline/Makefile.in --- macaulay2-1.22~rc1+ds/M2/libraries/readline/Makefile.in 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/libraries/readline/Makefile.in 2023-06-14 18:30:58.000000000 +0000 @@ -1,7 +1,7 @@ LICENSEFILES = COPYING -VERSION = 6.3 -PATCHES = 001 002 003 004 005 006 007 008 +VERSION = 8.2 +PATCHES = 001 RELAX = yes # URL = ftp://ftp.gnu.org/gnu/readline diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/d/Makefile.in macaulay2-1.22+ds/M2/Macaulay2/d/Makefile.in --- macaulay2-1.22~rc1+ds/M2/Macaulay2/d/Makefile.in 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/d/Makefile.in 2023-06-14 18:30:58.000000000 +0000 @@ -219,7 +219,7 @@ @(\ cat @srcdir@/startup-header.h; \ echo 'cached_file startupFile = {' ; \ - echo @packagesdir@/Core/startup.m2 | sed $(BSTRING) ; \ + echo @abs_top_srcdir@/Macaulay2/m2/startup.m2.in | sed $(BSTRING) ; \ echo ',' ; \ cat ../m2/startup.m2 | sed $(SSTRING) ; \ echo '};' ; \ diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp macaulay2-1.22+ds/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp --- macaulay2-1.22~rc1+ds/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp 2023-06-14 18:30:58.000000000 +0000 @@ -268,6 +268,7 @@ if (degreeRing(1) == nullptr or error()) { std::cout << "Error: " << error_message() << std::endl; + EXPECT_TRUE(false); } FreeAlgebra* A = FreeAlgebra::create(globalQQ, diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/code.m2 macaulay2-1.22+ds/M2/Macaulay2/m2/code.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/code.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/m2/code.m2 2023-06-14 18:30:58.000000000 +0000 @@ -44,7 +44,7 @@ if filename =!= "stdio" then ( wp := set characters " \t\r);"; file := ( - if match("startup.m2$", filename) then startupString + if match("startup.m2.in$", filename) then startupString else if filename === "currentString" then currentString else ( if not fileExists filename then error ("couldn't find file ", filename); diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/files.m2 macaulay2-1.22+ds/M2/Macaulay2/m2/files.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/files.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/m2/files.m2 2023-06-14 18:30:58.000000000 +0000 @@ -387,6 +387,12 @@ /// dotemacsFix0 = /// +;; this version will give an error if M2-init.el is not found: +(load "M2-init") + +;; this version will not give an error if M2-init.el is not found: +;(load "M2-init" t) + ; You may comment out the following line with an initial semicolon if you ; want to use your f12 key for something else. However, this action ; will be undone the next time you run setup() or setupEmacs(). @@ -468,15 +474,10 @@ setupEmacs = method() setup = method() mungeEmacs = () -> ( - dotemacsFix = concatenate(emacsHeader, dotemacsFix0); + dotemacsFix = concatenate(emacsHeader, apply(emacsfixes, (var,dir,templ) -> fix(var,dir,"",templ)), dotemacsFix0); supplantStringFile(dotemacsFix,"~/"|M2emacs,false); - ret := mungeFile("~/"|".emacs", ";; Macaulay 2 start", ";; Macaulay 2 end", M2emacsRead ); - if run("dpkg -s elpa-macaulay2 2> /dev/null | " | - "grep -q \"^Status:.* installed\"") != 0 then - stderr << "--warning: you must run \"apt install elpa-macaulay2\" " - << "as root in order to use" << endl - << " Macaulay2 with Emacs." << endl; - ret) + mungeFile("~/"|".emacs", ";; Macaulay 2 start", ";; Macaulay 2 end", M2emacsRead ) + ) prelim := () -> ( promptUser = true; if prefixDirectory === null then error "can't determine Macaulay 2 prefix (prefixDirectory not set)"; diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/installPackage.m2 macaulay2-1.22+ds/M2/Macaulay2/m2/installPackage.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/installPackage.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/m2/installPackage.m2 2023-06-14 18:30:58.000000000 +0000 @@ -512,7 +512,7 @@ cmphash := (cachef, inputhash) -> ( cachehash := gethash cachef; samehash := cachehash === inputhash; - if not samehash then error("cached example file " | + if not samehash then verboseLog("warning: cached example file " | cachef | " does not have expected hash" | newline | "expected: " | toString inputhash |", actual: " | toString cachehash); diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/testing.m2 macaulay2-1.22+ds/M2/Macaulay2/m2/testing.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/m2/testing.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/m2/testing.m2 2023-06-14 18:30:58.000000000 +0000 @@ -58,14 +58,6 @@ if match("no-check-flag", teststring) then ( checkmsg("skipping", desc); return true); - if (m := regex("(?<=no-check-architecture:)[^(\\n]*", teststring)) =!= null - then ( - badarchs := apply(separate(", ", substring(m#0, teststring)), - s -> replace("^\\s*|\\s*$", "", s)); - if isMember(version#"architecture", badarchs) then ( - checkmsg("skipping", desc); - return true)); - -- TODO: remove this when capture uses ArgQ if usermode === not noinitfile then -- try capturing in the same process diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/AssociativeAlgebras/tests.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/AssociativeAlgebras/tests.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/AssociativeAlgebras/tests.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/AssociativeAlgebras/tests.m2 2023-06-14 18:30:58.000000000 +0000 @@ -810,7 +810,6 @@ /// TEST /// --- no-check-flag #1903 kk = ZZ/32003 R = kk<|x,y,z,w|> I = ideal {x*y-y*x-7*z*w-7*w*z, 3*x*z-4*y*w-3*z*x-4*w*y, 31*x*w+25*y*z+25*z*y-31*w*x, x*y+y*x-z*w+w*z, x*z+y*w+z*x-w*y, x*w-y*z+z*y+w*x} @@ -1168,7 +1167,6 @@ /// TEST /// --- no-check-flag #1903 -- testing kernels -* restart @@ -1362,7 +1360,6 @@ /// TEST /// --- no-check-flag #1903 -- support tests -* restart diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/AssociativeAlgebras.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/AssociativeAlgebras.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/AssociativeAlgebras.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/AssociativeAlgebras.m2 2023-06-14 18:30:58.000000000 +0000 @@ -13,7 +13,6 @@ Keywords => {"Noncommutative Algebra"}, PackageImports =>{"Complexes"}, PackageExports =>{"IntegralClosure"}, - UseCachedExampleOutput => true, AuxiliaryFiles => true ) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/CharacteristicClasses.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/CharacteristicClasses.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/CharacteristicClasses.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/CharacteristicClasses.m2 2023-06-14 18:30:58.000000000 +0000 @@ -2493,7 +2493,6 @@ TEST /// -* - no-check-flag #2162 restart needsPackage "CharacteristicClasses" *- @@ -2507,7 +2506,6 @@ TEST /// -* - no-check-flag #2162 restart needsPackage "CharacteristicClasses" *- @@ -2528,7 +2526,6 @@ TEST /// -* - no-check-flag #2162 restart needsPackage "CharacteristicClasses" installPackage "CharacteristicClasses" diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/CoincidentRootLoci/tests.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/CoincidentRootLoci/tests.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/CoincidentRootLoci/tests.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/CoincidentRootLoci/tests.m2 2023-06-14 18:30:58.000000000 +0000 @@ -180,7 +180,6 @@ /// TEST /// -- singularLocus --- no-check-flag #1581 X10 = coincidentRootLocus(toList(10:1),ZZ/101,Variable=>x) A10 = {{},{{10}},{{10}},{{9,1}},{{10}},{{7,3},{8,2},{9,1}},{{8,1,1}},{{10}},{{6,4},{7,3},{9,1}},{{8,2}},{{6,2,2},{6,3,1},{7,2,1},{8,1,1}},{{7,1,1,1}},{},{{5,5},{6,4},{9,1}},{{5,5},{7,3},{8,2}},{{5,4,1},{6,3,1},{8,1,1}},{{5,3,2},{6,2,2},{7,2,1}},{{5,2,2,1},{5,3,1,1},{6,2,1,1},{7,1,1,1}},{{5,5},{6,1,1,1,1}},{{6,4}},{{5,4,1}},{{7,3}},{{4,3,3},{4,4,2},{5,3,2},{5,4,1},{6,3,1},{7,2,1}},{{4,3,3},{4,4,1,1},{5,3,1,1},{7,1,1,1}},{{4,4,2},{6,2,2}},{{4,2,2,2},{4,3,2,1},{4,4,1,1},{5,2,2,1},{6,2,1,1}},{{4,2,2,1,1},{4,3,1,1,1},{4,4,2},{5,2,1,1,1},{6,1,1,1,1}},{{4,4,1,1},{5,1,1,1,1,1}},{{4,3,3}},{{5,3,2}},{{3,3,2,2},{3,3,3,1},{4,3,2,1},{5,3,1,1}},{{3,3,3,1},{4,3,1,1,1}},{{3,3,2,2},{4,2,2,2},{5,2,2,1}},{{3,2,2,2,1},{3,3,2,1,1},{3,3,2,2},{4,2,2,1,1},{5,2,1,1,1}},{{3,2,2,1,1,1},{3,3,1,1,1,1},{3,3,2,1,1},{4,2,1,1,1,1},{5,1,1,1,1,1}},{{3,3,1,1,1,1},{4,1,1,1,1,1,1}},{},{{2,2,2,2,2},{3,2,2,2,1}},{{2,2,2,2,1,1},{3,2,2,1,1,1},{4,4,2}},{{2,2,2,1,1,1,1},{3,2,1,1,1,1,1},{4,4,1,1}},{{2,2,1,1,1,1,1,1},{3,1,1,1,1,1,1,1}},{}} assert(sort apply(apply(subsets X10,singularLocus),L -> sort apply(L,partition)) === sort apply(A10,sort)) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Complexes/FreeResolutions.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/Complexes/FreeResolutions.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Complexes/FreeResolutions.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/Complexes/FreeResolutions.m2 2023-06-14 18:30:58.000000000 +0000 @@ -603,6 +603,7 @@ else continue ) +-* minimalBetti Module := BettiTally => opts -> M -> ( R := ring M; degreelimit := opts.DegreeLimit; @@ -679,6 +680,6 @@ if I.cache.?quotient then I.cache.quotient else I.cache.quotient = cokernel generators I, opts ) - +*- end-- diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/DecomposableSparseSystems/examples/_solve__Decomposable__System.out macaulay2-1.22+ds/M2/Macaulay2/packages/DecomposableSparseSystems/examples/_solve__Decomposable__System.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/DecomposableSparseSystems/examples/_solve__Decomposable__System.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/DecomposableSparseSystems/examples/_solve__Decomposable__System.out 2023-06-14 18:30:58.000000000 +0000 @@ -102,6 +102,16 @@ is 3 yet we found 2 points Attempting to find all 3 points via monodromy. +Found:2 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy +Found:3 solutions via monodromy Monodromy recovery was successful basicSolver: Computed 3 solutions diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/DeterminantalRepresentations.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/DeterminantalRepresentations.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/DeterminantalRepresentations.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/DeterminantalRepresentations.m2 2023-06-14 18:30:58.000000000 +0000 @@ -1305,7 +1305,6 @@ -- TESTS TEST /// -- Quadratic case: over QQ, RR, CC --- no-check-flag #1746 S = QQ[x1,x2,x3] f = 1 - 8*x1*x2 - 4*x1*x3 - 100*x2^2 - 12*x2*x3 - x3^2 - 5*x1^2 M = first detRep(f, Tolerance => 1e-10) @@ -1518,7 +1517,6 @@ /// TEST /// -- cholesky, randomPSD --- no-check-flag #1745 eps = 1e-15 A = randomPSD 5 E = eigenvectors(A, Hermitian => true) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/=distributed-packages macaulay2-1.22+ds/M2/Macaulay2/packages/=distributed-packages --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/=distributed-packages 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/=distributed-packages 2023-06-14 18:30:58.000000000 +0000 @@ -255,4 +255,4 @@ PolyominoIdeals MatchingFields CellularResolutions -SagbiGbDetection \ No newline at end of file +SagbiGbDetection diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/EngineTests/GB.Test.Mathic.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/EngineTests/GB.Test.Mathic.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/EngineTests/GB.Test.Mathic.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/EngineTests/GB.Test.Mathic.m2 2023-06-14 18:30:58.000000000 +0000 @@ -159,7 +159,6 @@ /// TEST /// --- no-check-flag #2162 R1 = ZZ/32003[w,x,y,z,MonomialOrder => Lex] J1 = ideal" -2w2+9wx+8x2+9wy+9xy+6y2-7wz-3xz-7yz-6z2-4w+8x+4y+8z+2, diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/EngineTests/Res.f4.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/EngineTests/Res.f4.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/EngineTests/Res.f4.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/EngineTests/Res.f4.m2 2023-06-14 18:30:58.000000000 +0000 @@ -553,7 +553,6 @@ /// TEST /// --- no-check-flag #2205 setRandomSeed "10" needsPackage "BGG" S = ZZ/101[x_0..x_5] -- P^5 diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/gfanInterface.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/gfanInterface.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/gfanInterface.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/gfanInterface.m2 2023-06-14 18:30:58.000000000 +0000 @@ -1640,7 +1640,7 @@ ) gfanInitialForms (Ideal, List) := opts -> (I,L) -> ( - gfanInitialForms(flatten entries gens I, List, opts) + gfanInitialForms(flatten entries gens I, L, opts) ) -------------------------------------------------------- diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/GraphicalModelsMLE.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/GraphicalModelsMLE.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/GraphicalModelsMLE.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/GraphicalModelsMLE.m2 2023-06-14 18:30:58.000000000 +0000 @@ -44,7 +44,21 @@ Headline => "maximum likelihood estimates for graphical statistical models", Keywords => {"Algebraic Statistics"}, DebuggingMode => true, - PackageExports => {"GraphicalModels","Graphs","EigenSolver","NumericalAlgebraicGeometry","StatGraphs"} + PackageExports => {"GraphicalModels","Graphs","EigenSolver","NumericalAlgebraicGeometry","StatGraphs"}, + Certification => { + "journal name" => "The Journal of Software for Algebra and Geometry", + "journal URI" => "http://j-sag.org/", + "article title" => "Computing maximum likelihood estimates for Gaussian graphical models with Macaulay2", + "acceptance date" => "14 March 2022", + "published article URI" => "https://msp.org/jsag/2022/12-1/p01.xhtml", + "published article DOI" => "10.2140/jsag.2022.12.1", + "published code URI" => "https://msp.org/jsag/2022/12-1/jsag-v12-n1-x01-GraphicalModelsMLE.zip", + "repository code URI" => "http://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/GraphicalModelsMLE.m2", + "release at publication" => "f0aaf5e74216283f022f7773bc1116f8de6b944b", -- git commit number in hex + "version at publication" => "1.0", + "volume number" => "12", + "volume URI" => "https://msp.org/jsag/2022/12-1/" + } ) export { "checkPD", diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/GroebnerWalk.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/GroebnerWalk.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/GroebnerWalk.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/GroebnerWalk.m2 2023-06-14 18:30:58.000000000 +0000 @@ -726,7 +726,6 @@ /// TEST /// -- groebnerWalk --- no-check-flag #1563 R1 = QQ[x,y,z, MonomialOrder=>Weights=>{1,1,10}] I1 = ideal(y^2-x, z^3-x) R2 = QQ[x,y,z, MonomialOrder=>Weights=>{10,1,1}] diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/IntegralClosure.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/IntegralClosure.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/IntegralClosure.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/IntegralClosure.m2 2023-06-14 18:30:58.000000000 +0000 @@ -2820,7 +2820,6 @@ --huneke2 TEST /// -* - no-check-flag #2162 restart loadPackage("IntegralClosure", Reload => true) *- diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Jets.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/Jets.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Jets.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/Jets.m2 2023-06-14 18:30:58.000000000 +0000 @@ -34,7 +34,21 @@ Headline => "compute jets of various algebraic, geometric and combinatorial objects", PackageImports => {"SimpleDoc","EdgeIdeals"}, PackageExports => {"EdgeIdeals"}, - DebuggingMode => false + DebuggingMode => false, + Certification => { + "journal name" => "The Journal of Software for Algebra and Geometry", + "journal URI" => "http://j-sag.org/", + "article title" => "Computing with jets", + "acceptance date" => "20 October 2022", + "published article URI" => "https://msp.org/jsag/2022/12-1/p06.xhtml", + "published article DOI" => "10.2140/jsag.2022.12.43", + "published code URI" => "https://msp.org/jsag/2022/12-1/jsag-v12-n1-x06-Jets.m2", + "repository code URI" => "http://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/Jets.m2", + "release at publication" => "b0d482205848caeda2616f4ed58be2a6783e88a2", -- git commit number in hex + "version at publication" => "1.1", + "volume number" => "12", + "volume URI" => "https://msp.org/jsag/2022/12-1/" + } ) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/K3Surfaces.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/K3Surfaces.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/K3Surfaces.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/K3Surfaces.m2 2023-06-14 18:30:58.000000000 +0000 @@ -1061,7 +1061,6 @@ /// TEST /// --- no-check-flag #2319 for g from 3 to 12 do ( for d from 3 to 5 do ( <<"(g,d,n) = "<<(g,d,0)< "Navid.Nemati@inria.fr"}}, Headline => "find the multigraded truncations that give linear resolutions", PackageExports => {"Truncations", "TateOnProducts"}, - DebuggingMode => false + DebuggingMode => false, + Certification => { + "journal name" => "The Journal of Software for Algebra and Geometry", + "journal URI" => "http://j-sag.org/", + "article title" => "Linear truncations package for Macaulay2", + "acceptance date" => "18 May 2022", + "published article URI" => "https://msp.org/jsag/2022/12-1/p02.xhtml", + "published article DOI" => "10.2140/jsag.2022.12.11", + "published code URI" => "https://msp.org/jsag/2022/12-1/jsag-v12-n1-x02-LinearTruncations.m2", + "repository code URI" => "http://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/LinearTruncations.m2", + "release at publication" => "c1b72330821054c17b07c574649d98ac577cb3af", -- git commit number in hex + "version at publication" => "1.0", + "volume number" => "12", + "volume URI" => "https://msp.org/jsag/2022/12-1/" + } ) export{ diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Macaulay2Doc/changes.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/Macaulay2Doc/changes.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Macaulay2Doc/changes.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/Macaulay2Doc/changes.m2 2023-06-14 18:30:58.000000000 +0000 @@ -6,6 +6,7 @@ Key => "changes to Macaulay2, by version", Subnodes => { TO "changes made for the next release", + TO "changes, 1.22", TO "changes, 1.21", TO "changes, 1.20", TO "changes, 1.19.1", @@ -44,6 +45,45 @@ document { Key => "changes, 1.22", UL { + LI { "packages that have been published and certified:", + UL { + -- LI { star, " ", TO "::", ", a package by ... for ..., has been published." }, + LI { star, " ", TO "GraphicalModelsMLE::GraphicalModelsMLE", ", a package by + Carlos Amendola, Luis David Garcia Puente, Roser Homs Pons, Olga Kuznetsova, + Harshit J Motwani, Elina Robeva, and David Swinarski, for maximum likelihood + estimates for graphical statistical models, has been published." }, + LI { star, " ", TO "LinearTruncations::LinearTruncations", ", a package by Lauren Cranton Heller, + David Eisenbud, and Navid Nemati for finding multigraded truncations that give linear resolutions, + has been published." + }, + LI { star, " ", TO "RationalMaps::RationalMaps", ", a package by Karl Schwede, + Daniel Smolkin, S. Hamid Hassanzadeh, and C. J. Bott, for working with rational maps, has been published." }, + LI { star, " ", TO "PseudomonomialPrimaryDecomposition::PseudomonomialPrimaryDecomposition", ", a package by Alan + A. Veliz-Cuba for primary decomposition of square free pseudomonomial ideals, has been published."}, + LI { star, " ", TO "NoetherianOperators::NoetherianOperators", ", a package by Robert Krone, Justin Chen, + Marc Harkonen, Yairon Cid-Ruiz, and Anton Leykin, for numerically computing local dual spaces, + Hilbert functions, and Noetherian operators, has been published." }, + LI { star, " ", TO "Jets::Jets", ", a package by Federico Galetto and + Nicholas Iammarino, for computing jets of various algebraic, geometric and combinatorial objects, has been published." } + } + }, + LI { "new packages:", + UL { + -- LI { TO "::", ", a package by ... for ..., has been added." }, + LI { TO "HolonomicSystems::HolonomicSystems", ", a package by Mahrud Sayrafi, Christine Berkesch, Anton Leykin, and + Harrison Tsai for holonomic systems, has been added. The code was originally in the Dmodules package." }, + LI { TO "BernsteinSato::BernsteinSato", ", a package by Anton Leykin and Harrison Tsai for Bernstein-Sato, + has been added. The code was originally in the Dmodules package." }, + LI { TO "PolyominoIdeals::PolyominoIdeals", ", a package by Carmelo Cisto, Francesco Navarra, and Rizwan Jahangir for + binomial ideals of collections of cells, has been added." }, + LI { TO "MatchingFields::MatchingFields", ", a package by Oliver Clarke for matching fields, has been added." }, + LI { TO "CellularResolutions::CellularResolutions", ", a package by Jay Yang and Aleksandra Sobieska for + cellular resolutions of monomial ideals, has been added." }, + LI { TO "SagbiGbDetection::SagbiGbDetection", ", a package by Viktoriia Borovik, Timothy Duff, and Elima Shehu for verifying + whether the given generators of an ideal form the Gr\"obner basis or whether the given generators of a finitely + generated subalgebra of a polynomial ring are the SAGBI basis, has been added." } + } + }, LI { "functionality added:", UL { LI { "A ", TO RingMap, " object may now be raised to the 0th power if its ", TO source, " and ", TO target, " agree." }, diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_getting_started.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_getting_started.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_getting_started.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_getting_started.m2 2023-06-14 18:30:58.000000000 +0000 @@ -926,7 +926,7 @@ It also provides for dynamic completion of symbols in the language.", PARA{}, "There is an ASCII version of this section of the documentation distributed - in the file ", TT "/usr/share/doc/elpa-macaulay2/M2-emacs-help.txt.gz", ". It might be useful for you to visit + in the file ", TT (Layout#1#"emacs" | "M2-emacs-help.txt"), ". It might be useful for you to visit that file with emacs now, thereby avoiding having to cut and paste bits of text into emacs buffers for the demonstrations below.", PARA{}, diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Macaulay2Doc.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/Macaulay2Doc.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Macaulay2Doc.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/Macaulay2Doc.m2 2023-06-14 18:30:58.000000000 +0000 @@ -6,7 +6,6 @@ newPackage ("Macaulay2Doc", InfoDirSection => "Macaulay2 and its packages", AuxiliaryFiles => true, - UseCachedExampleOutput => true, Headline => "Macaulay2 documentation", Authors => { {Name => "Daniel R. Grayson", Email => "dan@math.uiuc.edu", HomePage => "http://www.math.uiuc.edu/~dan/"}, diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/MinimalPrimes/tests.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/MinimalPrimes/tests.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/MinimalPrimes/tests.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/MinimalPrimes/tests.m2 2023-06-14 18:30:58.000000000 +0000 @@ -72,7 +72,6 @@ /// TEST /// --- no-check-flag #1064 R = QQ[x,r,v,u,b, MonomialOrder=>{Lex=>5}] I = ideal(b^3-7*b^2+14*b-7,r^2-u*r+(-2*b^2+9*b-5)*u^2+b^2-4*b,x^2+(b-2)*x*r+r^2+b^2-4*b) elapsedTime C = minprimes(I, Verbosity=>2); @@ -96,7 +95,6 @@ /// TEST /// --- no-check-flag #1064 -- Over a tower of rings R = QQ[b][u][x,r,v, MonomialOrder=>{Lex=>3}] I = ideal(b^3-7*b^2+14*b-7,r^2-u*r+(-2*b^2+9*b-5)*u^2+b^2-4*b,x^2+(b-2)*x*r+r^2+b^2-4*b) @@ -1606,7 +1604,6 @@ /// TEST /// --- no-check-flag #1064 -- this test occurs as a crash in github issue #190. -- seems to work after recent changes to factory. -- it might be too long for a test... diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/MultiprojectiveVarieties.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/MultiprojectiveVarieties.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/MultiprojectiveVarieties.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/MultiprojectiveVarieties.m2 2023-06-14 18:30:58.000000000 +0000 @@ -4279,7 +4279,6 @@ /// TEST /// --- no-check-flag #2162 ringP4 := ZZ/300007[a..e]; f = rationalMap minors(2,matrix {{a,b,c,d},{b,c,d,e}}); g = rationalMap(minors(2,matrix{{a,b,c},{b,c,d}}) + ideal e); @@ -4310,7 +4309,6 @@ /// TEST/// --- no-check-flag #2162 Phi = last graph rationalMap projectiveVariety({1},{4},ZZ/300007); assert(multidegree(,Phi) == multidegree Phi) assert(projectiveDegrees Phi == multidegree Phi) @@ -4523,7 +4521,6 @@ /// TEST /// -- parametrizations 3 --- no-check-flag #1539 needsPackage "SpecialFanoFourfolds"; debug SpecialFanoFourfolds; checkInverseParametrization = X -> ( diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NCAlgebra/examples/___Basic_spoperations_spon_spnoncommutative_spalgebras.out macaulay2-1.22+ds/M2/Macaulay2/packages/NCAlgebra/examples/___Basic_spoperations_spon_spnoncommutative_spalgebras.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NCAlgebra/examples/___Basic_spoperations_spon_spnoncommutative_spalgebras.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NCAlgebra/examples/___Basic_spoperations_spon_spnoncommutative_spalgebras.out 2023-06-14 18:30:58.000000000 +0000 @@ -332,7 +332,7 @@ o45 = E' -o45 : PolynomialRing, 4 skew commutative variables +o45 : PolynomialRing, 4 skew commutative variable(s) i46 : E = toNCRing E' --Calling Bergman for NCGB calculation. @@ -387,7 +387,7 @@ o54 = C'' -o54 : PolynomialRing, 4 skew commutative variables +o54 : PolynomialRing, 4 skew commutative variable(s) i55 : y*x diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NCAlgebra/examples/_matrix_lp__N__C__Ring__Map_rp.out macaulay2-1.22+ds/M2/Macaulay2/packages/NCAlgebra/examples/_matrix_lp__N__C__Ring__Map_rp.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NCAlgebra/examples/_matrix_lp__N__C__Ring__Map_rp.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NCAlgebra/examples/_matrix_lp__N__C__Ring__Map_rp.out 2023-06-14 18:30:58.000000000 +0000 @@ -12,7 +12,7 @@ o2 = B -o2 : PolynomialRing, 3 skew commutative variables +o2 : PolynomialRing, 3 skew commutative variable(s) i3 : f = ncMap(B,A,{a^3,b^2,a+b,a-b}) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NCAlgebra/examples/_to__M2__Ring.out macaulay2-1.22+ds/M2/Macaulay2/packages/NCAlgebra/examples/_to__M2__Ring.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NCAlgebra/examples/_to__M2__Ring.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NCAlgebra/examples/_to__M2__Ring.out 2023-06-14 18:30:58.000000000 +0000 @@ -44,7 +44,7 @@ o7 = C -o7 : PolynomialRing, 4 skew commutative variables +o7 : PolynomialRing, 4 skew commutative variable(s) i8 : x*y-y*x diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NoetherianOperators.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/NoetherianOperators.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NoetherianOperators.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NoetherianOperators.m2 2023-06-14 18:30:58.000000000 +0000 @@ -20,11 +20,25 @@ PackageImports => {"PrimaryDecomposition"}, AuxiliaryFiles => false, DebuggingMode => false, - Keywords => {"Numerical Algebraic Geometry", "Commutative Algebra"} -) + Keywords => {"Numerical Algebraic Geometry", "Commutative Algebra"}, + Certification => { + "journal name" => "The Journal of Software for Algebra and Geometry", + "journal URI" => "http://j-sag.org/", + "article title" => "Noetherian operators in Macaulay2", + "acceptance date" => "26 September 2022", + "published article URI" => "https://msp.org/jsag/2022/12-1/p05.xhtml", + "published article DOI" => "10.2140/jsag.2022.12.33", + "published code URI" => "https://msp.org/jsag/2022/12-1/jsag-v12-n1-x05-NoetherianOperators.m2", + "repository code URI" => "http://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/NoetherianOperators.m2", + "release at publication" => "28faaabb38111c186c23ef6e6a3d487b0823390e", -- git commit number in hex + "version at publication" => "2.2.1", + "volume number" => "12", + "volume URI" => "https://msp.org/jsag/2022/12-1/" + } + ) debug NumericalLinearAlgebra - + export { "truncatedDual", "zeroDimensionalDual", diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalImplicitization/tests.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalImplicitization/tests.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalImplicitization/tests.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalImplicitization/tests.m2 2023-06-14 18:30:58.000000000 +0000 @@ -137,7 +137,6 @@ /// TEST /// -- Twisted cubic projections --- no-check-flag #2183 R = CC[x_0..x_3] I = monomialCurveIdeal(R, {1,2,3}) F1 = random(R^1, R^{3:-1}) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_change__Flags.out macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_change__Flags.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_change__Flags.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_change__Flags.out 2023-06-14 18:30:58.000000000 +0000 @@ -42,7 +42,7 @@ i10 : FlagsG = G/last; i11 : time S' = changeFlags(S,({l1,l2,l3},FlagsF,FlagsG)) - -- used 1.82521 seconds + -- used 1.84162 seconds o11 = {| .124063-.286284ii .167867-.0639299ii .295488-.366109ii |, | | -.25181-.0448108ii -.107521-.190275ii -.0896067-.483543ii | | @@ -63,7 +63,7 @@ i12 : assert all(S', s-> checkIncidenceSolution(s,G)) i13 : time S' = changeFlags(S,({l1,l2,l3},FlagsF,FlagsG), OneHomotopy=>false) - -- used 1.11693 seconds + -- used 1.08499 seconds o13 = {| -.226702-.119043ii -.326452-.119841ii .0929953-.230085ii |, | | -.229738+.0833434ii -.445398+.0639826ii .150646-.436884ii | | diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___L__Rtriple.out macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___L__Rtriple.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___L__Rtriple.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___L__Rtriple.out 2023-06-14 18:30:58.000000000 +0000 @@ -9,12 +9,12 @@ i5 : stdio << "the fixed flags :\n" << result_0; the fixed flags : - -4.08248290463863E-01 0.00000000000000E+00 -4.72085446817433E-02 -4.52979868649730E-01 5.41161724926203E-01 -2.47207907529739E-01 -1.32176911249782E-01 -2.28201970805131E-01 2.36139472149256E-01 -1.87739864365389E-01 3.11759017480660E-01 1.19153245292991E-01 - 5.56878874843095E-02 -4.04432350157850E-01 -3.66114997609468E-01 4.35493465632689E-03 -3.75466323350980E-01 -1.79353949734268E-02 -3.37089456589007E-01 1.09184570046039E-02 6.32916047119544E-01 1.43190422050627E-01 8.50317067363224E-02 1.26144412375443E-01 - -4.08144702499215E-01 -9.19611268385567E-03 4.10229510257585E-01 -6.62199849777962E-02 -5.36673520388478E-01 1.89377380436866E-03 -2.11007715043063E-01 -5.35167787516717E-01 -1.09738691803618E-01 -4.88064910019195E-02 1.81938450320808E-04 -1.65180017628623E-01 - 4.07285703592482E-01 2.80182496927228E-02 3.93751341331076E-01 -6.44629036508820E-02 1.29747517901737E-01 8.16212381454746E-03 -7.55415659355416E-02 3.88600945732782E-02 3.64892907685067E-01 -5.78270817076200E-02 2.25708083950237E-01 -6.80136111500466E-01 - 7.07399797116559E-02 -4.02072781890370E-01 -1.63799171362049E-01 3.60900238276350E-01 3.63851850002974E-01 9.76101469078975E-02 -5.26311952003756E-01 -2.38646826009220E-01 -3.98618871807167E-01 5.41111688686785E-02 4.75305531754421E-02 -1.90519074761423E-01 - 1.95687898368325E-02 -4.07779019974040E-01 4.34733836676498E-02 -4.09491669168698E-01 -2.35872346804551E-01 4.75482230671679E-02 7.19019396782173E-02 3.73406870789826E-01 -4.16896522749570E-01 3.69117815129642E-02 5.34441821546929E-01 -2.16227340369752E-02 + -4.08248290463863E-01 -1.85037170770859E-17 3.97812324059320E-01 9.79174839149694E-02 -3.14031586278321E-01 -1.77692247250931E-01 8.72558320358186E-02 5.55057765241127E-02 3.26603807820814E-01 4.50079520070478E-01 -1.21477444123812E-01 4.47892420160762E-01 + -3.31646271829620E-01 2.38070193531614E-01 -3.33688927682635E-01 -4.41919858253321E-02 1.88919891065188E-01 2.27346320870824E-01 -4.44853393347985E-01 -2.96270804351182E-01 -2.68017149858233E-01 4.17865005709478E-01 2.51229213826536E-01 1.93451859210120E-01 + -3.83273496319134E-01 1.40599052934127E-01 -4.18504865460909E-01 1.82476392974900E-01 -6.40678637658166E-01 2.36261384607933E-02 9.94880240507409E-02 1.58337849859311E-01 -4.72950872095731E-02 -4.27535007632162E-02 2.93899098035654E-03 -4.18114815999641E-01 + 4.01140073193088E-01 7.58505658865559E-02 -2.36582711732953E-01 1.72836943189620E-01 -4.04708999156962E-01 -1.07343253658322E-01 -3.74682062675373E-01 1.15784231762851E-01 -1.14710174394788E-01 -2.49371301578811E-01 -1.03153948113123E-01 5.76541024749319E-01 + 1.35340093932427E-02 4.08023892996979E-01 -2.71251275529851E-01 -6.61593552387677E-02 2.11836190247706E-01 -2.15567268248658E-01 6.36537592748278E-01 2.76418271402020E-01 -2.69424234570330E-01 8.22850649989294E-02 8.55910480493980E-02 3.09454285127493E-01 + -3.67664943735471E-01 1.77451840831984E-01 2.80633567514338E-01 5.17550799722571E-01 1.76260380326836E-01 -2.71443831475986E-01 -6.71993903613725E-02 -1.69618081610741E-01 -1.58819347923215E-01 -5.10216650142325E-01 2.46667136784666E-01 4.79007839571318E-02 THE MOVED FLAG : 1 1 1 1 1 1 @@ -25,18 +25,18 @@ -1 0 0 0 0 0 THE 3-SOLUTION PLANES : - -1.07700499041284E+00 -8.11068437983347E-01 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + -1.11978157975915E+00 1.65613772077393E-01 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 - 0.00000000000000E+00 0.00000000000000E+00 -3.36987250104405E-01 -1.67450845937719E-01 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 -3.75221192076092E-01 -2.48041653266659E-01 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 - 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 -2.30564287152720E-01 5.64924049337573E-03 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 -6.23616597635860E-01 -2.18599169648558E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 - -2.39519267028103E-01 -1.10486524678214E-01 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 + -2.45448902320671E-01 -1.02626547024311E-01 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 - 0.00000000000000E+00 0.00000000000000E+00 9.63898127100209E-01 -3.01351874683110E-01 0.00000000000000E+00 0.00000000000000E+00 + 0.00000000000000E+00 0.00000000000000E+00 -1.36521846024660E+00 5.40175955796651E-01 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 - 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 -1.15368987352860E+00 1.20932611395459E+00 + 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 -1.28868981690887E+00 6.08007127143010E-01 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.00000000000000E+00 0.00000000000000E+00 @@ -44,59 +44,59 @@ polynomial system solved : 6 3 -+( 2.26456764896410E-02 + 2.49844937328485E-01*i)*x11*x32*x53 -+( 3.15777245187067E-01 + 9.66166977235230E-03*i)*x11*x32 -+(-2.18039974912898E-01 + 5.72681877540543E-02*i)*x11*x53 -+( 1.09626716659595E-01 - 2.97017034585406E-01*i)*x32*x53 -+( 1.52355901543258E-01 + 2.09468425437531E-01*i)*x11 -+(-3.11325662430988E-01 - 3.22301515871292E-01*i)*x32 -+(-2.66953639602332E-01 + 1.27177783632620E-02*i)*x53 -+(-1.64152368621853E-01 + 1.07777676474340E-01*i); - -+(-1.35742889778990E-01 + 2.17682459193376E-01*i)*x11*x32*x53 -+( 1.71921548377550E-01 - 8.29071611236532E-02*i)*x11*x32 -+( 2.70820739191635E-01 - 1.07243745128727E-01*i)*x11*x53 -+(-1.02921496859705E-01 + 2.90239027460114E-01*i)*x32*x53 -+( 3.94198672213008E-01 - 3.98958519352494E-01*i)*x11 -+( 3.22090999358762E-02 + 1.39423752602463E-01*i)*x32 -+( 2.41226791120785E-01 - 2.59403039422168E-02*i)*x53 -+( 6.15363963064252E-01 - 1.67078635461445E-01*i); - -+( 3.09510704039293E-01 - 5.95168448036128E-01*i)*x11*x32*x53 -+( 3.36210442667399E-01 + 7.05987643216428E-03*i)*x11*x32 -+(-1.11225261790743E-01 - 2.54560554556378E-01*i)*x11*x53 -+( 2.28103938452441E-01 - 2.08980888394715E-02*i)*x32*x53 -+( 1.41695965472263E-01 + 4.00079612516609E-02*i)*x11 -+( 2.57165526542390E-01 + 2.88186394666915E-01*i)*x32 -+(-1.67148338603389E-01 + 1.76966921330865E-01*i)*x53 -+( 8.97253197565314E-02 + 2.62865341036959E-01*i); - -+( 2.81681822921272E-01 + 8.66231982908467E-01*i)*x11*x32*x53 -+( 2.28809384623938E-01 + 5.32114920885280E-01*i)*x11*x32 -+(-5.86367688889768E-01 + 3.15425474457949E-01*i)*x11*x53 -+( 2.08919157440114E-01 + 3.96158762546460E-01*i)*x32*x53 -+(-2.12864431021167E-01 + 1.96129322290429E-01*i)*x11 -+( 1.69504223981375E-01 + 2.30815036927011E-01*i)*x32 -+(-3.92511753956552E-01 - 2.50775379441183E-02*i)*x53 -+(-1.41619353187752E-01 - 1.92988534627778E-02*i); - -+(-5.55613554896697E-01 + 9.58350943486976E-02*i)*x11*x32*x53 -+(-4.86062825888290E-01 + 2.30140984236890E-01*i)*x11*x32 -+(-3.32649167951689E-01 - 5.22180313407958E-02*i)*x11*x53 -+(-1.46716505023529E-01 + 3.18264494923420E-01*i)*x32*x53 -+(-2.99897684682840E-01 - 2.31528698367347E-01*i)*x11 -+(-1.13823522219086E-01 + 3.90394031670838E-01*i)*x32 -+(-1.87140101166406E-01 - 2.37420886733269E-01*i)*x53 -+(-1.11414879522674E-02 - 2.63936409999584E-01*i); - -+( 3.46124123545673E-01 - 8.16809752626568E-02*i)*x11*x32*x53 -+( 6.68268421197837E-03 - 6.45761479639423E-01*i)*x11*x32 -+(-1.69153698627581E-01 + 2.28277756848134E-01*i)*x11*x53 -+( 1.93501124916598E-01 + 7.71025618738563E-02*i)*x32*x53 -+( 3.15408036580370E-01 - 2.33880697858375E-01*i)*x11 -+(-6.19712747216821E-03 - 1.90642624043654E-01*i)*x32 -+(-1.72863621209133E-01 + 1.14694130775271E-01*i)*x53 -+( 3.24681386619333E-01 + 1.00680402675064E-01*i); ++(-2.22031736978857E-01 + 3.18789771979949E-01*i)*x11*x32*x53 ++(-6.17422879466825E-01 - 9.60784463860935E-02*i)*x11*x32 ++(-1.61810550546247E-01 + 1.08504019387186E-01*i)*x11*x53 ++(-1.57955128990380E-01 + 3.34968485755594E-01*i)*x32*x53 ++(-3.74696526626732E-01 - 9.99730706347352E-03*i)*x11 ++(-1.84709768939814E-01 + 3.62947612331143E-01*i)*x32 ++(-1.44595312861631E-01 + 1.19035248438782E-01*i)*x53 ++(-2.86542298065088E-01 + 2.86096288784835E-01*i); + ++( 8.42059732147426E-01 + 3.39910304104641E-02*i)*x11*x32*x53 ++( 9.05100164926549E-01 + 2.94497407778889E-02*i)*x11*x32 ++( 3.51820718787900E-01 + 6.70277596934115E-02*i)*x11*x53 ++( 1.33744938329095E-01 - 5.82345002438941E-03*i)*x32*x53 ++( 6.05161081977061E-01 + 2.14195097892559E-02*i)*x11 ++( 1.23633363417116E-01 + 1.40843859182061E-02*i)*x32 ++( 1.03549820073609E-01 - 7.79413307564618E-02*i)*x53 ++( 1.74053131549760E-01 - 1.43377559277007E-01*i); + ++( 1.19042617826994E-01 + 3.34483475553423E-02*i)*x11*x32*x53 ++(-3.23842703713701E-01 - 2.55133309039113E-01*i)*x11*x32 ++( 4.85663839563644E-01 + 5.64101617459871E-02*i)*x11*x53 ++( 1.96719924543530E-01 + 2.12527754874998E-01*i)*x32*x53 ++(-3.97899137772641E-01 - 7.96444590159542E-01*i)*x11 ++(-3.06177374356630E-02 - 1.73096159671485E-01*i)*x32 ++( 5.26340292766507E-01 - 8.13707548071123E-02*i)*x53 ++(-1.20517493699459E-01 - 8.06023766456248E-01*i); + ++(-7.26841776132968E-01 - 1.39339586961160E-01*i)*x11*x32*x53 ++(-5.72841803432976E-01 - 3.02898132054218E-01*i)*x11*x32 ++(-6.99419107949223E-01 - 4.43094367516545E-01*i)*x11*x53 ++(-5.36534750824741E-01 - 5.06082109214979E-01*i)*x32*x53 ++(-5.44984576154230E-01 - 6.02383441523054E-01*i)*x11 ++(-3.45200716768154E-01 - 5.47254493845745E-01*i)*x32 ++(-6.81729875269734E-01 - 5.40086737117702E-01*i)*x53 ++(-4.12666744241273E-01 - 7.67335042360796E-01*i); + ++(-3.36003336771691E-01 + 4.39449075450039E-01*i)*x11*x32*x53 ++(-3.11588823087300E-01 + 1.70571569957293E-01*i)*x11*x32 ++(-3.50092653925388E-01 + 9.98991969928704E-02*i)*x11*x53 ++( 8.93111359067309E-02 + 8.83124645506282E-02*i)*x32*x53 ++(-7.44439523933786E-01 - 5.82411185729712E-02*i)*x11 ++( 1.41508162164850E-01 - 4.47870840208402E-02*i)*x32 ++(-1.14269366264579E-01 - 5.61647977516906E-02*i)*x53 ++(-2.68431378789617E-01 - 2.95933339843714E-02*i); + ++(-9.61093933093429E-02 - 8.10505054733194E-01*i)*x11*x32*x53 ++(-4.89316629840530E-01 - 4.33934277072278E-01*i)*x11*x32 ++( 1.29309747019464E-01 - 4.37976591954737E-01*i)*x11*x53 ++(-3.10945872263800E-01 - 5.88323486643750E-01*i)*x32*x53 ++( 1.83522450602465E-01 - 7.32565449651871E-01*i)*x11 ++(-6.48563773259940E-01 - 5.14568173716295E-01*i)*x32 ++( 4.88264433532052E-02 - 3.70066088587247E-01*i)*x53 ++( 5.04752436689806E-02 - 7.00956613197506E-01*i); ROOT REFINING PARAMETERS 1. output during the iterations : no @@ -112,22 +112,22 @@ 2 3 =========================================================================== -solution 1 : start residual : 1.693E-15 #iterations : 1 success +solution 1 : start residual : 6.412E-15 #iterations : 1 success t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : - x11 : -1.07700499041284E+00 -8.11068437983347E-01 - x32 : -3.36987250104405E-01 -1.67450845937719E-01 - x53 : -2.30564287152720E-01 5.64924049337642E-03 -== err : 4.712E-17 = rco : 2.862E-01 = res : 1.249E-16 = complex regular == -solution 2 : start residual : 3.886E-15 #iterations : 1 success + x11 : -1.11978157975915E+00 1.65613772077393E-01 + x32 : -3.75221192076093E-01 -2.48041653266659E-01 + x53 : -6.23616597635846E-01 -2.18599169648558E+00 +== err : 3.894E-15 = rco : 5.719E-02 = res : 5.551E-16 = complex regular == +solution 2 : start residual : 2.040E-15 #iterations : 1 success t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : - x11 : -2.39519267028103E-01 -1.10486524678215E-01 - x32 : 9.63898127100208E-01 -3.01351874683111E-01 - x53 : -1.15368987352860E+00 1.20932611395459E+00 -== err : 2.362E-16 = rco : 2.105E-01 = res : 3.331E-16 = complex regular == + x11 : -2.45448902320671E-01 -1.02626547024311E-01 + x32 : -1.36521846024660E+00 5.40175955796650E-01 + x53 : -1.28868981690887E+00 6.08007127143011E-01 +== err : 4.767E-16 = rco : 2.379E-01 = res : 2.498E-16 = complex regular == =========================================================================== A list of 2 solutions has been refined : Number of regular solutions : 2. @@ -141,7 +141,7 @@ Frequency tables for correction, residual, and condition numbers : FreqCorr : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 : 2 FreqResi : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 : 2 -FreqCond : 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 2 +FreqCond : 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 2 Small correction terms and residuals counted to the right. Well conditioned and distinct roots counted to the left. @@ -152,40 +152,40 @@ t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : - x11 : -1.07700499041284E+00 -8.11068437983347E-01 - x32 : -3.36987250104405E-01 -1.67450845937719E-01 - x53 : -2.30564287152720E-01 5.64924049337642E-03 -== err : 4.712E-17 = rco : 2.862E-01 = res : 1.249E-16 == + x11 : -1.11978157975915E+00 1.65613772077393E-01 + x32 : -3.75221192076093E-01 -2.48041653266659E-01 + x53 : -6.23616597635846E-01 -2.18599169648558E+00 +== err : 3.894E-15 = rco : 5.719E-02 = res : 5.551E-16 == solution 2 : t : 1.00000000000000E+00 0.00000000000000E+00 m : 1 the solution for t : - x11 : -2.39519267028103E-01 -1.10486524678215E-01 - x32 : 9.63898127100208E-01 -3.01351874683111E-01 - x53 : -1.15368987352860E+00 1.20932611395459E+00 -== err : 2.362E-16 = rco : 2.105E-01 = res : 3.331E-16 == + x11 : -2.45448902320671E-01 -1.02626547024311E-01 + x32 : -1.36521846024660E+00 5.40175955796650E-01 + x53 : -1.28868981690887E+00 6.08007127143011E-01 +== err : 4.767E-16 = rco : 2.379E-01 = res : 2.498E-16 == TIMING INFORMATION for Root refining -The elapsed time in seconds was 0.000470000 = 0h 0m 0s 0ms -User time in seconds was 0.000411000 = 0h 0m 0s 0ms -System CPU time in seconds was 0.000059000 = 0h 0m 0s 0ms -Non-I/O page faults was 28 +The elapsed time in seconds was 0.000425000 = 0h 0m 0s 0ms +User time in seconds was 0.000382000 = 0h 0m 0s 0ms +System CPU time in seconds was 0.000043000 = 0h 0m 0s 0ms +Non-I/O page faults was 27 I/O page faults was 0 Signals delivered was 0 Swaps was 0 -Total context switches was 1 +Total context switches was 0 TIMING INFORMATION for resolving a Schubert problem -The elapsed time in seconds was 0.008962000 = 0h 0m 0s 9ms -User time in seconds was 0.008770000 = 0h 0m 0s 9ms -System CPU time in seconds was 0.000192000 = 0h 0m 0s 0ms -Non-I/O page faults was 178 +The elapsed time in seconds was 0.008244000 = 0h 0m 0s 8ms +User time in seconds was 0.008046000 = 0h 0m 0s 8ms +System CPU time in seconds was 0.000198000 = 0h 0m 0s 0ms +Non-I/O page faults was 159 I/O page faults was 0 Signals delivered was 0 Swaps was 0 -Total context switches was 3 +Total context switches was 0 -Seed used in random number generators : 82707. +Seed used in random number generators : 24787. PHCv2.4.77 released 2020-06-12 i8 : diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_parse__Triplet.out macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_parse__Triplet.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_parse__Triplet.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_parse__Triplet.out 2023-06-14 18:30:58.000000000 +0000 @@ -4,208 +4,208 @@ i2 : (R, pols, sols, fixedFlags, movedFlag, solutionPlanes) = parseTriplet(f, p, s) -o2 = (R, {(- .0399744 - .0145143*ii)x11*x32*x53 + (.0926769 + - - - - - - ------------------------------------------------------------------------ - .354494*ii)x11*x32 + (- .632386 + .186907*ii)x11*x53 + (.0228595 + - - - - - - ------------------------------------------------------------------------ - .0537889*ii)x32*x53 + (.406348 + .234116*ii)x11 + (- .0652501 - - - - - - - ------------------------------------------------------------------------ - .0138565*ii)x32 + (- .249868 + .134704*ii)x53 + .211821 - .165463*ii, - - - - - - ------------------------------------------------------------------------ - (.0933272 - .373609*ii)x11*x32*x53 + (.264606 - .401113*ii)x11*x32 + (- - - - - - +o2 = (R, {(.208692 + 1.03965*ii)x11*x32*x53 + (.405301 + .197189*ii)x11*x32 + + + + + + ------------------------------------------------------------------------ - .0939123 - .679424*ii)x11*x53 + (.0455688 - .0119688*ii)x32*x53 + + (.566151 + .487787*ii)x11*x53 + (- .209197 + .468217*ii)x32*x53 + ------------------------------------------------------------------------ - (.0451169 - .683975*ii)x11 + (.0388899 + .0672329*ii)x32 + (- .110409 - - - - - - + (.312468 + .303249*ii)x11 + (- .0604092 - .0194041*ii)x32 + (.23684 + + + + + + ------------------------------------------------------------------------ - .0867227*ii)x53 - .341856 - .148787*ii, (- .590604 + + .252038*ii)x53 - .0591918 + .101699*ii, (- .463283 - ------------------------------------------------------------------------ - .0241807*ii)x11*x32*x53 + (- .13432 - .00692575*ii)x11*x32 + (.0566638 - + .240783*ii)x11*x32*x53 + (- .458021 + .0439516*ii)x11*x32 + (- .407911 - ------------------------------------------------------------------------ - .0743429*ii)x11*x53 + (- .497876 - .197278*ii)x32*x53 + (.39268 - + .347409*ii)x11*x53 + (.306426 - .453088*ii)x32*x53 + (- .712326 + ------------------------------------------------------------------------ - .106231*ii)x11 + (- .0559863 - .0344225*ii)x32 + (.207618 + - - - - - + .220682*ii)x11 + (- .202248 - .483313*ii)x32 + (.0203615 - + + + + + ------------------------------------------------------------------------ - .0018821*ii)x53 + .546447 + .0849719*ii, (- .163197 + - - - - - + .380034*ii)x53 - .544592 - .206127*ii, (- .561299 - + + + + + ------------------------------------------------------------------------ - .856396*ii)x11*x32*x53 + (- .12002 + .6028*ii)x11*x32 + (- .0789951 + - - - - - + .376592*ii)x11*x32*x53 + (.0107828 - .36624*ii)x11*x32 + (.166971 - + + + + + ------------------------------------------------------------------------ - .294668*ii)x11*x53 + (.494277 + .293229*ii)x32*x53 + (- .132923 + + .449345*ii)x11*x53 + (- .393243 - .431221*ii)x32*x53 + (.699459 - ------------------------------------------------------------------------ - .073211*ii)x11 + (.0697774 - .0225692*ii)x32 + (.268987 + .156267*ii)x53 + .374566*ii)x11 + (- .05748 - .258966*ii)x32 + (.248463 - .408062*ii)x53 + + + + + + ------------------------------------------------------------------------ + + .518536 - .16739*ii, (- .40362 + .263607*ii)x11*x32*x53 + (- .680842 - ------------------------------------------------------------------------ - - .120066 - .217474*ii, (- .0647381 - .530494*ii)x11*x32*x53 + (.244667 + .459741*ii)x11*x32 + (- .283004 - .21073*ii)x11*x53 + (- .329091 + + + + + + + ------------------------------------------------------------------------ + .191945*ii)x32*x53 + (- .208371 - .65307*ii)x11 + (- .695681 - + + + + + + ------------------------------------------------------------------------ + .421961*ii)x32 + (- .323339 - .169246*ii)x53 - .251152 - .718577*ii, (- ------------------------------------------------------------------------ - + .0388226*ii)x11*x32 + (- .071549 - .251294*ii)x11*x53 + (- .00247907 + - - - - - + .00437712 + .0530547*ii)x11*x32*x53 + (- .761652 + .146076*ii)x11*x32 + + + + + + + ------------------------------------------------------------------------ + (- .106439 + .109494*ii)x11*x53 + (- .36773 - .0415626*ii)x32*x53 + (- + + + + + + ------------------------------------------------------------------------ + .776877 + .551073*ii)x11 + (- .276157 - .298111*ii)x32 + (- .245764 + + + + + + + ------------------------------------------------------------------------ + .0300706*ii)x53 - .453972 + .283598*ii, (.135972 + + + + + + ------------------------------------------------------------------------ - .0248108*ii)x32*x53 + (.21949 - .0809399*ii)x11 + (- .0359926 - + .588926*ii)x11*x32*x53 + (.6076 - .200541*ii)x11*x32 + (- .283696 + + + + + + + ------------------------------------------------------------------------ + .172472*ii)x11*x53 + (.14003 + .618682*ii)x32*x53 + (.622696 - + + + + + + ------------------------------------------------------------------------ + .0521078*ii)x11 + (.487289 - .0181031*ii)x32 + (- .174105 + + + + + + + ------------------------------------------------------------------------ + .19223*ii)x53 + .516146 + .110568*ii}, {{-.821212-.037818*ii, + + + + + + ------------------------------------------------------------------------ + -.569987-.018055*ii, .112781-1.49632*ii}, {-.674526-.501588*ii, ------------------------------------------------------------------------ - .0103534*ii)x32 + (- .363356 + .0515771*ii)x53 + .00303043 - .137416*ii, - - - - - - ------------------------------------------------------------------------ - (.124577 + .254012*ii)x11*x32*x53 + (.430422 + .0947952*ii)x11*x32 + - - - - - - ------------------------------------------------------------------------ - (.432935 - .140885*ii)x11*x53 + (- .153941 - .0356372*ii)x32*x53 + - - - - - - ------------------------------------------------------------------------ - (.6925 - .164863*ii)x11 + (- .0791601 - .0121276*ii)x32 + (.130397 - - - - - - - ------------------------------------------------------------------------ - .488438*ii)x53 + .0622165 - .376375*ii}, {{-.222837+.0578575*ii, - - - - - - ------------------------------------------------------------------------ - -.283529-1.74632*ii, -.170237+.574751*ii}, {.313108+.0647815*ii, - - - - - - ------------------------------------------------------------------------ - 1.55934+3.57986*ii, -.119638-.243962*ii}}, {| -.408248+3.70074e-17ii - | -.254463-.319242ii - | -.379006-.151728ii - | .148242-.380383ii - | -.400969+.0767495ii - | .34486-.218491ii - ------------------------------------------------------------------------ - .295782-.557811ii -.123338-.130106ii -.443403-.43011ii - -.277722-.0337416ii -.15377+.281621ii .287922-.0364758ii - -.310281+.0181191ii -.414435+.0695857ii .155757-.124855ii - -.154992-.218188ii .665036+.134935ii -.224407-.00485309ii - .437341-.302059ii .157632+.2603ii .322701+.575512ii - .0124012-.268702ii -.310116+.197611ii .0692093-.0616366ii - ------------------------------------------------------------------------ - .101776-.0720625ii -.0339506+.0651831ii |}, | 1 1 1 1 1 1 |, {| - .171133-.455241ii -.0427233+.574042ii | | -1 -1 -1 -1 -1 0 | | - -.370187+.597805ii -.149512-.059328ii | | 1 1 1 1 0 0 | | - -.131206+.363686ii -.0506159+.314321ii | | -1 -1 -1 0 0 0 | | - -.0364793+.110345ii .0844233-.0473268ii | | 1 1 0 0 0 0 | | - .209126+.2163ii .724911-.033938ii | | -1 0 0 0 0 0 | | - ------------------------------------------------------------------------ - -.222837+.0578575ii 0 0 |, | - 1 0 0 | | - 0 -.283529-1.74632ii 0 | | - 0 1 0 | | - 0 0 -.170237+.574751ii | | - 0 0 1 | | - ------------------------------------------------------------------------ - .313108+.0647815ii 0 0 |}) - 1 0 0 | - 0 1.55934+3.57986ii 0 | - 0 1 0 | - 0 0 -.119638-.243962ii | - 0 0 1 | + -.461876-.739848*ii, -.224144+.66624*ii}}, {| -.408248+1.85037e-17ii + | .35285+.205337ii + | .180223+.366314ii + | -.112231+.392519ii + | -.386429-.131678ii + | .379266-.151075ii + ------------------------------------------------------------------------ + .0119294+.502626ii -.186934+.620316ii .122167-.151345ii + -.383343-.127677ii .230949+.244268ii .0430535+.174629ii + -.342457+.00934968ii .0827073+.0851401ii -.196086-.478639ii + -.313814+.130817ii -.28829-.368183ii -.150923-.316389ii + -.0511755-.330575ii -.0730288+.0544028ii -.677879+.188118ii + .00236316-.488989ii -.275102+.387978ii .151215-.147044ii + ------------------------------------------------------------------------ + -.207192+.198433ii .0258732+.200046ii |}, | 1 1 1 1 1 1 |, {| + -.232673-.232934ii .278648+.581968ii | | -1 -1 -1 -1 -1 0 | | + -.422701-.037308ii -.261099-.431386ii | | 1 1 1 1 0 0 | | + .382436+.28813ii .28168+.259944ii | | -1 -1 -1 0 0 0 | | + -.293505+.0889841ii .344844-.0724727ii | | 1 1 0 0 0 0 | | + .118466+.540239ii .0999718-.087378ii | | -1 0 0 0 0 0 | | + ------------------------------------------------------------------------ + -.821212-.0378182ii 0 0 |, | + 1 0 0 | | + 0 -.569987-.018055ii 0 | | + 0 1 0 | | + 0 0 .112781-1.49632ii | | + 0 0 1 | | + ------------------------------------------------------------------------ + -.674526-.501588ii 0 0 |}) + 1 0 0 | + 0 -.461876-.739848ii 0 | + 0 1 0 | + 0 0 -.224144+.66624ii | + 0 0 1 | o2 : Sequence @@ -218,32 +218,32 @@ i4 : peek sols -o4 = {Point{cache => CacheTable{...3...} - Coordinates => {-.222837+.0578575*ii, -.283529-1.74632*ii, +o4 = {Point{cache => CacheTable{...3...} + Coordinates => {-.821212-.037818*ii, -.569987-.018055*ii, ------------------------------------------------------------------------ - }, Point{cache => CacheTable{...3...} - -.170237+.574751*ii} Coordinates => {.313108+.0647815*ii, + }, Point{cache => CacheTable{...3...} + .112781-1.49632*ii} Coordinates => {-.674526-.501588*ii, ------------------------------------------------------------------------ }} - 1.55934+3.57986*ii, -.119638-.243962*ii} + -.461876-.739848*ii, -.224144+.66624*ii} i5 : peek solutionPlanes -o5 = {Matrix{cache => CacheTable{} }, Matrix{cache => CacheTable{} }} - RawMatrix => -.222837+.0578575i 0 0 RawMatrix => .313108+.0647815i 0 0 - 1 0 0 1 0 0 - 0 -.283529-1.74632i 0 0 1.55934+3.57986i 0 - 0 1 0 0 1 0 - 0 0 -.170237+.574751i 0 0 -.119638-.243962i - 0 0 1 0 0 1 - - ring => CC ring => CC - 53 53 - 3 3 - source => CC source => CC - 53 53 - 6 6 - target => CC target => CC - 53 53 +o5 = {Matrix{cache => CacheTable{} }, Matrix{cache => CacheTable{} }} + RawMatrix => -.821212-.037818i 0 0 RawMatrix => -.674526-.501588i 0 0 + 1 0 0 1 0 0 + 0 -.569987-.018055i 0 0 -.461876-.739848i 0 + 0 1 0 0 1 0 + 0 0 .112781-1.49632i 0 0 -.224144+.66624i + 0 0 1 0 0 1 + + ring => CC ring => CC + 53 53 + 3 3 + source => CC source => CC + 53 53 + 6 6 + target => CC target => CC + 53 53 i6 : diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___Pieri__Homotopies.out macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___Pieri__Homotopies.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___Pieri__Homotopies.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/___Pieri__Homotopies.out 2023-06-14 18:30:58.000000000 +0000 @@ -3,23 +3,23 @@ i1 : (ipt, otp) := PieriHomotopies(2,2); i2 : print ipt -{| -.5 -.156693-.47535ii |, | -.5 -.393934-.433592ii |, | -.5 .512862+.452276ii |, | -.5 .0279051+.376076ii |} - | .201236-.457716ii -.488637+.0159579ii | | .498614+.0372063ii -.276014+.153901ii | | .144239+.478743ii -.318615-.207177ii | | -.177981-.46725ii -.429875+.0533154ii | - | .462573+.189805ii .146037-.49664ii | | -.46663+.179601ii .280441-.151808ii | | -.0697009+.495118ii -.260024+.275036ii | | -.232842-.442475ii .259034+.251049ii | - | .238586-.439405ii .473754+.134341ii | | .412393-.282723ii -.213211-.640151ii | | .400527-.299296ii .388872-.305781ii | | -.294096-.404361ii .396186-.618923ii | +{| -.5 .361294+.0806396ii |, | -.5 .216008+.134438ii |, | -.5 .284982+.222929ii |, | -.5 .22015-.484395ii |} + | .0560812+.496845ii -.345688-.122686ii | | .425294-.262917ii -.25443-.000255548ii | | -.424034+.264943ii -.612614+.0126839ii | | -.495841+.064355ii -.407594-.169567ii | + | -.312843+.390038ii -.575119+.134847ii | | .378729+.326442ii -.510118+.406777ii | | .356538-.350544ii -.489129+.356105ii | | -.498392-.0400682ii -.307603+.337509ii | + | -.499532+.0216369ii -.0303484+.615261ii | | -.498042+.0442031ii -.517987+.42016ii | | -.487797-.109792ii -.348876-.0765384ii | | -.0473766+.49775ii .384254-.407219ii | i3 : print otp -{| 1 0 |, | 1 0 |} - | -.237282-.112854ii -1.5372-1.19825ii | | -.193856+.191757ii 1.26877+.351218ii | - | -.0761311+.302235ii 1 | | .841397+.00470807ii 1 | - | 0 1.419-3.27969ii | | 0 -.324549-1.86455ii | +{| 1 0 |, | 1 0 |} + | -.0995275-.303491ii .10685+.135117ii | | .122055+2.67619ii .77208+.270864ii | + | -1.00317+1.13845ii 1 | | .855829+3.01373ii 1 | + | 0 1.04563+.64657ii | | 0 -.205684-.309834ii | i4 : in0 = ipt_0 -o4 = | -.5 -.156693-.47535ii | - | .201236-.457716ii -.488637+.0159579ii | - | .462573+.189805ii .146037-.49664ii | - | .238586-.439405ii .473754+.134341ii | +o4 = | -.5 .361294+.0806396ii | + | .0560812+.496845ii -.345688-.122686ii | + | -.312843+.390038ii -.575119+.134847ii | + | -.499532+.0216369ii -.0303484+.615261ii | 4 2 o4 : Matrix CC <--- CC @@ -27,10 +27,10 @@ i5 : out0 = otp_0 -o5 = | 1 0 | - | -.237282-.112854ii -1.5372-1.19825ii | - | -.0761311+.302235ii 1 | - | 0 1.419-3.27969ii | +o5 = | 1 0 | + | -.0995275-.303491ii .10685+.135117ii | + | -1.00317+1.13845ii 1 | + | 0 1.04563+.64657ii | 4 2 o5 : Matrix CC <--- CC @@ -38,15 +38,15 @@ i6 : m = in0|out0 -o6 = | -.5 -.156693-.47535ii 1 - | .201236-.457716ii -.488637+.0159579ii -.237282-.112854ii - | .462573+.189805ii .146037-.49664ii -.0761311+.302235ii - | .238586-.439405ii .473754+.134341ii 0 +o6 = | -.5 .361294+.0806396ii 1 + | .0560812+.496845ii -.345688-.122686ii -.0995275-.303491ii + | -.312843+.390038ii -.575119+.134847ii -1.00317+1.13845ii + | -.499532+.0216369ii -.0303484+.615261ii 0 ------------------------------------------------------------------------ - 0 | - -1.5372-1.19825ii | - 1 | - 1.419-3.27969ii | + 0 | + .10685+.135117ii | + 1 | + 1.04563+.64657ii | 4 4 o6 : Matrix CC <--- CC @@ -54,7 +54,7 @@ i7 : det m -o7 = 2.10795754464218e-15-2.69974970552918e-15*ii +o7 = 1.39373833114133e-15-5.34558582120369e-18*ii o7 : CC (of precision 53) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_print__Statistics.out macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_print__Statistics.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_print__Statistics.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_print__Statistics.out 2023-06-14 18:30:58.000000000 +0000 @@ -42,6 +42,6 @@ # moves of type {2, 0, 0} = 3 # moves of type {2, 1, 0} = 1 # moves of type {2, 2, 0} = 12 -tracking time = .0627298 +tracking time = .0726057 i7 : diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_set__Verbose__Level.out macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_set__Verbose__Level.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_set__Verbose__Level.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_set__Verbose__Level.out 2023-06-14 18:30:58.000000000 +0000 @@ -56,84 +56,84 @@ i6 : S = solveSchubertProblem(SchPblm,2,4) -- playCheckers --- cpu time = .00494953 +-- cpu time = .00601947 -- making a recursive call to resolveNode -- playCheckers --- cpu time = .00228437 +-- cpu time = .00384407 -- making a recursive call to resolveNode -- playCheckers --- cpu time = .000274343 +-- cpu time = .000405587 resolveNode reached node of no remaining conditions --- time to make equations: .00390117 +-- time to make equations: .0113492 Setup time: 0 Computing time:0 - -- trackHomotopy time = .0136096 sec. for [{0, 1, 2, 3}, {0, infinity, 2, infinity}] --- time of performing one checker move: .0196087 --- time of performing one checker move: .0010252 --- time of performing one checker move: .00101623 --- time to make equations: .00493436 + -- trackHomotopy time = .00641883 sec. for [{0, 1, 2, 3}, {0, infinity, 2, infinity}] +-- time of performing one checker move: .0224431 +-- time of performing one checker move: .00136392 +-- time of performing one checker move: .00125758 +-- time to make equations: .00409937 Setup time: 0 Computing time:0 - -- trackHomotopy time = .00615856 sec. for [{1, 2, 3, 0}, {1, infinity, infinity, 2}] --- time of performing one checker move: .0152368 --- time to make equations: .00436537 + -- trackHomotopy time = .00526319 sec. for [{1, 2, 3, 0}, {1, infinity, infinity, 2}] +-- time of performing one checker move: .0136233 +-- time to make equations: .0110752 Setup time: 0 Computing time:0 - -- trackHomotopy time = .00607117 sec. for [{1, 3, 2, 0}, {1, infinity, infinity, 2}] --- time of performing one checker move: .0145254 --- time to make equations: .0044331 + -- trackHomotopy time = .00619821 sec. for [{1, 3, 2, 0}, {1, infinity, infinity, 2}] +-- time of performing one checker move: .0213222 +-- time to make equations: .00419011 Setup time: 0 Computing time:0 - -- trackHomotopy time = .0143777 sec. for [{2, 3, 1, 0}, {2, infinity, infinity, 1}] --- time of performing one checker move: .0221031 --- time to make equations: .0105845 + -- trackHomotopy time = .00526115 sec. for [{2, 3, 1, 0}, {2, infinity, infinity, 1}] +-- time of performing one checker move: .0136673 +-- time to make equations: .0166996 Setup time: 0 Computing time:0 - -- trackHomotopy time = .00788359 sec. for [{0, 1, 2, 3}, {infinity, 1, 2, infinity}] --- time of performing one checker move: .0230352 --- time to make equations: .0101357 + -- trackHomotopy time = .00752237 sec. for [{0, 1, 2, 3}, {infinity, 1, 2, infinity}] +-- time of performing one checker move: .0288234 +-- time to make equations: .00926965 Setup time: 0 Computing time:0 - -- trackHomotopy time = .00744606 sec. for [{0, 1, 3, 2}, {infinity, 1, infinity, 2}] --- time of performing one checker move: .0221374 --- time of performing one checker move: .000947422 --- time of performing one checker move: .000955539 --- time to make equations: .0102118 + -- trackHomotopy time = .00642767 sec. for [{0, 1, 3, 2}, {infinity, 1, infinity, 2}] +-- time of performing one checker move: .0198177 +-- time of performing one checker move: .00678202 +-- time of performing one checker move: .00125066 +-- time to make equations: .0103571 Setup time: 0 Computing time:0 - -- trackHomotopy time = .00708272 sec. for [{1, 3, 2, 0}, {infinity, 3, infinity, 1}] --- time of performing one checker move: .0291536 + -- trackHomotopy time = .00633686 sec. for [{1, 3, 2, 0}, {infinity, 3, infinity, 1}] +-- time of performing one checker move: .0212162 -- making a recursive call to resolveNode -- playCheckers --- cpu time = .00277507 +-- cpu time = .00377576 -- making a recursive call to resolveNode -- playCheckers --- cpu time = .000321946 +-- cpu time = .000418823 resolveNode reached node of no remaining conditions --- time to make equations: .00393774 +-- time to make equations: .00425091 Setup time: 0 Computing time:0 - -- trackHomotopy time = .00502202 sec. for [{0, 1, 2, 3}, {0, infinity, 2, infinity}] --- time of performing one checker move: .0123765 --- time of performing one checker move: .000840275 --- time to make equations: .0113042 -Setup time: 0 -Computing time:0 - -- trackHomotopy time = .00574352 sec. for [{0, 2, 3, 1}, {0, infinity, infinity, 2}] --- time of performing one checker move: .021032 --- time of performing one checker move: .000887347 --- time of performing one checker move: .000689267 --- time of performing one checker move: .000872269 --- time of performing one checker move: .000953705 --- time of performing one checker move: .000664042 --- time of performing one checker move: .000883894 --- time of performing one checker move: .000898403 --- time to make equations: .0085071 -Setup time: 0 -Computing time:0 - -- trackHomotopy time = .00610873 sec. for [{1, 3, 2, 0}, {1, infinity, infinity, 3}] --- time of performing one checker move: .0182445 --- time of performing one checker move: .00130729 + -- trackHomotopy time = .006444 sec. for [{0, 1, 2, 3}, {0, infinity, 2, infinity}] +-- time of performing one checker move: .0219552 +-- time of performing one checker move: .00136799 +-- time to make equations: .00463165 +Setup time: 0 +Computing time:0 + -- trackHomotopy time = .00525894 sec. for [{0, 2, 3, 1}, {0, infinity, infinity, 2}] +-- time of performing one checker move: .0139133 +-- time of performing one checker move: .00107706 +-- time of performing one checker move: .000772814 +-- time of performing one checker move: .00101058 +-- time of performing one checker move: .00113463 +-- time of performing one checker move: .00100553 +-- time of performing one checker move: .00650399 +-- time of performing one checker move: .00132128 +-- time to make equations: .0101487 +Setup time: 0 +Computing time:0 + -- trackHomotopy time = .00655759 sec. for [{1, 3, 2, 0}, {1, infinity, infinity, 3}] +-- time of performing one checker move: .0211642 +-- time of performing one checker move: .00174374 o6 = {| -1.65573-.600637ii .0201935+.0437095ii |, | -.154703+.175591ii | -1.23037-1.66989ii -.0308057-.00120618ii | | -.801221-.0354303ii diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_solutions__To__Affine__Coords.out macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_solutions__To__Affine__Coords.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_solutions__To__Affine__Coords.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/NumericalSchubertCalculus/examples/_solutions__To__Affine__Coords.out 2023-06-14 18:30:58.000000000 +0000 @@ -31,19 +31,19 @@ i2 : S = solveSchubertProblem(Pblm, 3,6) -o2 = {| .362674+1.2327e-16ii 5.87881+2.97425e-14ii .067722-9.01983e-17ii |, - | -.168148+9.29853e-17ii 10.2268+5.44749e-14ii .359604-1.18969e-16ii | - | .287667+4.05941e-17ii 5.41301+2.76829e-14ii .178413-1.05689e-16ii | - | .399967+8.73997e-17ii 10.4365+5.39029e-14ii .172408-1.02452e-16ii | - | .893699+3.57479e-18ii 2.90938+1.5283e-14ii .127632-3.63809e-17ii | - | -.108865+9.87064e-17ii 5.44614+2.94139e-14ii .099289-9.57795e-17ii | +o2 = {| .362674+4.83909e-16ii 5.87881+1.4973e-13ii .067722-3.25474e-16ii |, + | -.168148+3.65025e-16ii 10.2268+2.74238e-13ii .359604-4.29289e-16ii | + | .287667+1.59357e-16ii 5.41301+1.39362e-13ii .178413-3.8137e-16ii | + | .399967+3.43098e-16ii 10.4365+2.71358e-13ii .172408-3.69689e-16ii | + | .893699+1.40332e-17ii 2.90938+7.69377e-14ii .127632-1.31278e-16ii | + | -.108865+3.87484e-16ii 5.44614+1.48076e-13ii .099289-3.45613e-16ii | ------------------------------------------------------------------------ - | .675164+1.2692e-15ii .770431+2.49223e-15ii -.0909566-8.88941e-16ii - | .0675706+9.5739e-16ii .870501+4.56466e-15ii .150312-1.17248e-15ii - | .390574+4.17962e-16ii .658364+2.31966e-15ii -.00751668-1.04161e-15ii - | .621526+8.99879e-16ii 1.17845+4.51673e-15ii -.0078269-1.0097e-15ii - | .902762+3.68065e-17ii .284467+1.28062e-15ii .0636297-3.58549e-16ii - | .141356+1.01629e-15ii .394186+2.46471e-15ii -.0692081-9.43946e-16ii + | .675164+1.12445e-15ii .770431+2.17408e-15ii -.0909566-7.64252e-16ii + | .0675706+8.48201e-16ii .870501+3.98194e-15ii .150312-1.00802e-15ii + | .390574+3.70294e-16ii .658364+2.02353e-15ii -.00751668-8.95503e-16ii + | .621526+7.9725e-16ii 1.17845+3.94013e-15ii -.0078269-8.68074e-16ii + | .902762+3.26088e-17ii .284467+1.11714e-15ii .0636297-3.08256e-16ii + | .141356+9.00388e-16ii .394186+2.15007e-15ii -.0692081-8.11541e-16ii ------------------------------------------------------------------------ |} | diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/PHCpack/examples/_to__Laurent__Polynomial.out macaulay2-1.22+ds/M2/Macaulay2/packages/PHCpack/examples/_to__Laurent__Polynomial.out --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/PHCpack/examples/_to__Laurent__Polynomial.out 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/PHCpack/examples/_to__Laurent__Polynomial.out 2023-06-14 18:30:58.000000000 +0000 @@ -6,9 +6,7 @@ i3 : describe ring ideal sys -o3 = frac/QQ[x..z, Degrees => {3:1}, Heft => {1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 1]\ - | {GRevLex => {3:1} } | - \ {Position => Up } / +o3 = frac(QQ[x..z, Degrees => {3:1}, Heft => {1}]) i4 : convertedSys = toLaurentPolynomial(sys,w); @@ -27,7 +25,7 @@ i8 : describe oo -o8 = QQ {x..z, w , Degrees => {4:1}, MonomialOrder => {Weights => {4:-1} }, DegreeRank => 1, Inverses => true, Global => false} +o8 = QQ {x..z, w , Degrees => {4:1}, MonomialOrder => {Weights => {4:-1} }, Inverses => true, Local => true, Global => false} 0 {MonomialSize => 32} {GroupRevLex => 4 } {Position => Up } diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/PseudomonomialPrimaryDecomposition.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/PseudomonomialPrimaryDecomposition.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/PseudomonomialPrimaryDecomposition.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/PseudomonomialPrimaryDecomposition.m2 2023-06-14 18:30:58.000000000 +0000 @@ -9,7 +9,21 @@ Email => "avelizcuba1@udayton.edu", HomePage => "https://sites.google.com/site/alanvelizcuba/" }}, - DebuggingMode => false + DebuggingMode => false, + Certification => { + "journal name" => "The Journal of Software for Algebra and Geometry", + "journal URI" => "http://j-sag.org/", + "article title" => "Primary decomposition of squarefree pseudomonomial ideals", + "acceptance date" => "18 July 2022", + "published article URI" => "https://msp.org/jsag/2022/12-1/p04.xhtml", + "published article DOI" => "10.2140/jsag.2022.12.27", + "published code URI" => "https://msp.org/jsag/2022/12-1/jsag-v12-n1-x04-PseudomonomialPrimaryDecomposition.m2", + "repository code URI" => "http://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/PseudomonomialPrimaryDecomposition.m2", + "release at publication" => "4c86bb7c1f80a36c5e2ce6786863f5702c13ddda", -- git commit number in hex + "version at publication" => "0.3", + "volume number" => "12", + "volume URI" => "https://msp.org/jsag/2022/12-1/" + } ) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/RandomGenus14Curves.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/RandomGenus14Curves.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/RandomGenus14Curves.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/RandomGenus14Curves.m2 2023-06-14 18:30:58.000000000 +0000 @@ -322,7 +322,6 @@ /// TEST /// --- no-check-architecture: arm (#2651) -- check that there are not to many non-detected problems in the construction. -- This code finds errors in codimension 4 with high probability -- since 3^4 \approx 100 @@ -335,7 +334,6 @@ /// TEST /// --- no-check-architecture: arm (#2651) -- check that the certification sometimes works -- (only errors in codim 1 are detected) setRandomSeed("alpha") diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/RationalMaps.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/RationalMaps.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/RationalMaps.m2 2023-06-02 02:24:33.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/RationalMaps.m2 2023-06-14 18:30:58.000000000 +0000 @@ -18,7 +18,21 @@ }, --this file is in the public domain Keywords => {"Commutative Algebra"}, Headline => "rational maps between varieties", - PackageExports => {"FastMinors"} + PackageExports => {"FastMinors"}, + Certification => { + "journal name" => "The Journal of Software for Algebra and Geometry", + "journal URI" => "http://j-sag.org/", + "article title" => "RationalMaps, a package for Macaulay2", + "acceptance date" => "17 July 2022", + "published article URI" => "https://msp.org/jsag/2022/12-1/p03.xhtml", + "published article DOI" => "10.2140/jsag.2022.12.17", + "published code URI" => "https://msp.org/jsag/2022/12-1/jsag-v12-n1-x03-RationalMaps.m2", + "repository code URI" => "http://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/RationalMaps.m2", + "release at publication" => "0cee3a5ae1e3fbd3dfa8407a4c8d6ad6a13dffd3", -- git commit number in hex + "version at publication" => "1.0", + "volume number" => "12", + "volume URI" => "https://msp.org/jsag/2022/12-1/" + } ) --Hassanzadeh was supported by CNPq-bolsa de Produtividade and by the MathAmSud project ``ALGEO'' --Schwede was supported in part by the NSF FRG Grant DMS \#1265261/1501115, NSF CAREER Grant DMS \#1252860/1501102, NSF Grants DMS \#1840190 and DMS \#2101800. diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SegreClasses.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/SegreClasses.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SegreClasses.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/SegreClasses.m2 2023-06-14 18:30:58.000000000 +0000 @@ -941,7 +941,6 @@ TEST /// --- no-check-flag #2162 -- union of coordinate axes in PP3 (diagonal) -* restart @@ -960,7 +959,6 @@ TEST /// -* - no-check-flag #2162 restart needsPackage "SegreClasses" *- @@ -974,7 +972,6 @@ /// TEST /// --- no-check-flag #2162 -- union of coordinate axes in PP3 (diagonal) -* restart @@ -994,7 +991,6 @@ TEST /// -* -no-check-flag #2162 restart needsPackage "SegreClasses" *- @@ -1028,7 +1024,6 @@ TEST /// -* -no-check-flag #2162 restart needsPackage "SegreClasses" *- @@ -1065,7 +1060,6 @@ TEST /// -* -no-check-flag #2162 restart needsPackage "SegreClasses" *- @@ -1086,7 +1080,6 @@ TEST /// -* -no-check-flag #2162 restart needsPackage "SegreClasses" *- @@ -1102,7 +1095,6 @@ TEST /// -* -no-check-flag #2162 restart needsPackage "SegreClasses" *- @@ -1119,7 +1111,6 @@ TEST /// -* -no-check-flag #2162 restart needsPackage "SegreClasses" *- diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SemidefiniteProgramming.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/SemidefiniteProgramming.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SemidefiniteProgramming.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/SemidefiniteProgramming.m2 2023-06-14 18:30:58.000000000 +0000 @@ -19,7 +19,6 @@ Headline => "semidefinite programming", Keywords => {"Real Algebraic Geometry", "Interfaces"}, Configuration => {"CSDPexec"=>"","MOSEKexec"=>"mosek","SDPAexec"=>"sdpa","DefaultSolver"=>null}, - UseCachedExampleOutput => true, AuxiliaryFiles => true, PackageExports => {"NumericalAlgebraicGeometry"} ) diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SparseResultants.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/SparseResultants.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SparseResultants.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/SparseResultants.m2 2023-06-14 18:30:58.000000000 +0000 @@ -1742,7 +1742,6 @@ /// TEST /// -- Corollary 2.2, p. 256 [GKZ] --- no-check-flag #2162 property = (M) -> ( M = transpose matrix M; K := ZZ/33331; n := numRows M; diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SpecialFanoFourfolds.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/SpecialFanoFourfolds.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SpecialFanoFourfolds.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/SpecialFanoFourfolds.m2 2023-06-14 18:30:58.000000000 +0000 @@ -3669,7 +3669,6 @@ ------------------------------------------------------------------------ TEST /// -- Test 0 -- cubic fourfolds from strings: describe, discriminant, parameterCount --- no-check-flag #2162 strIn := {"quintic del Pezzo surface", "quartic scroll", "3-nodal septic scroll", "one-nodal septic del Pezzo surface", "general cubic 4-fold of discriminant 38", "general cubic 4-fold of discriminant 42", "cubic 4-fold of discriminant 48"}; strOut := "Special cubic fourfold of discriminant 14 containing a (smooth) surface of degree 5 and sectional genus 1 @@ -3705,7 +3704,6 @@ /// TEST /// -- Test 1 (1/2) -- GM fourfolds from strings: describe, discriminant, parameterCount, toGrass --- no-check-flag #1539 strIn := {"sigma-plane", "rho-plane", "tau-quadric"}; strOut := "Special Gushel-Mukai fourfold of discriminant 10('') containing a surface in PP^8 of degree 1 and sectional genus 0 @@ -3737,7 +3735,6 @@ /// TEST /// -- Test 2 (2/2) -- GM fourfolds from strings: describe, discriminant, parameterCount, toGrass --- no-check-flag #1539 strIn := {"cubic scroll", "quintic del Pezzo surface", "general GM 4-fold of discriminant 20"}; strOut := "Special Gushel-Mukai fourfold of discriminant 12 containing a surface in PP^8 of degree 3 and sectional genus 0 @@ -3770,7 +3767,6 @@ /// TEST /// -- Test 3 -- 21 examples from GMtables --- no-check-flag #1539 X = for i from 1 to 21 list ( A = GMtables(i,ZZ/65521); time specialGushelMukaiFourfold((rationalMap(ideal A_0,Dominant=>2)) ideal A_1,InputCheck=>0) @@ -3783,7 +3779,6 @@ /// TEST /// -- Test 4 -- parametrizations of Fano fourfolds --- no-check-flag #1539 setRandomSeed 0; for dg in {(2,0),(3,1),(4,1),(5,1),(4,3),(6,4),(8,5),(10,6),(12,7),(14,8),(16,9),(18,10)} do ( <<"(d,g) = "<true,Singular=>false); assert(g#"image" =!= null and dim image g == 2 and degree image g == 14 and dim target g == 8) /// @@ -3847,7 +3841,6 @@ /// TEST /// -- Test 11 (2/2) -- detectCongruence --- no-check-flag #1539 use Grass(1,4,ZZ/33331); S31 = ideal(p_(3,4),p_(2,4),p_(1,4),p_(0,4),p_(2,3),p_(1,3),p_(1,2)); Y = specialGushelMukaiFourfold(S31,InputCheck=>0); @@ -3858,7 +3851,6 @@ /// TEST /// -- Test 12 (1/2) -- GM fourfolds containing nodal surfaces --- no-check-flag #2162 debug SpecialFanoFourfolds; K = ZZ/65521; X = makeGMfromCurveOnSurfaceInP6((surface({2,0,0,0},K,ambient=>6)).cache#"takeCurve" (1,(0,0,0)),InputCheck=>0); @@ -3870,7 +3862,6 @@ /// TEST /// -- Test 13 (2/2) -- GM fourfolds containing nodal surfaces --- no-check-architecture: s390x (#2162) X = specialGushelMukaiFourfold("nodal surface of degree 11 and genus 3 with class (7,4)",ZZ/33331,InputCheck=>0); assert(discriminant X == 26 and last cycleClass X == (7,4) and degree surface X == 11 and sectionalGenus surface X == 3); Y = specialGushelMukaiFourfold("nodal D44",ZZ/33331,InputCheck=>0); @@ -3902,7 +3893,6 @@ /// TEST /// -- Test 15 --- no-check-flag #1539 debug SpecialFanoFourfolds L = takeGMsfromSurfaceInP6(surface({3,1,1,0},ambient=>6),InputCheck=>0,"Gluing"=>"cubic scroll",Degrees=>hashTable{1=>(1,1),2=>(19,infinity),3=>(0,0)}); X = first L; diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SumsOfSquares.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/SumsOfSquares.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SumsOfSquares.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/SumsOfSquares.m2 2023-06-14 18:30:58.000000000 +0000 @@ -1437,7 +1437,6 @@ --11 TEST /// --lowerBound --- no-check-flag #1579 debug needsPackage "SumsOfSquares" results := checkLowerBound("CSDP") assert all(results,t->t=!=false); diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SuperLinearAlgebra.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/SuperLinearAlgebra.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/SuperLinearAlgebra.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/SuperLinearAlgebra.m2 2023-06-14 18:30:58.000000000 +0000 @@ -219,7 +219,6 @@ ) TEST/// --- no-check-flag #1984 R1 = QQ[x_0..x_3]; R2 = QQ[z_0..z_2]; R = superRing(R1, R2); @@ -272,7 +271,6 @@ ) TEST /// --- no-check-flag #1984 R1 = QQ[x_0..x_3]; R2 = QQ[z_0..z_2]; R = superRing(R1, R2); diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Topcom.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/Topcom.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Topcom.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/Topcom.m2 2023-06-14 18:30:58.000000000 +0000 @@ -119,7 +119,7 @@ topcomIsRegularTriangulation = method(Options=>{Homogenize=>true}) topcomIsRegularTriangulation(Matrix, List) := Boolean => opts -> (A, tri) -> ( -- now create the output file - (outfile, errfile) := callTopcom("checkregularity --checktriang --memopt -v", {topcomPoints(A, opts), [], tri }); + (outfile, errfile) := callTopcom("checkregularity --checktriang -v", {topcomPoints(A, opts), [], tri }); match("[Cc]hecked 1 triangulations, 0 non-regular so far", get errfile) ) @@ -317,7 +317,7 @@ << "Index sets do not correspond to full-dimensional simplices" << endl; return false; ); - (outfile, errfile) := callTopcom("points2nflips --checktriang --memopt -v", {topcomPoints(V, Homogenize=>false), [], T }); + (outfile, errfile) := callTopcom("points2nflips --checktriang -v", {topcomPoints(V, Homogenize=>false), [], T }); not match("not valid", get errfile) ) @@ -1072,7 +1072,6 @@ /// TEST /// --- no-check-flag #2704 needsPackage "Topcom" needsPackage "Polyhedra" diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Triangulations.m2 macaulay2-1.22+ds/M2/Macaulay2/packages/Triangulations.m2 --- macaulay2-1.22~rc1+ds/M2/Macaulay2/packages/Triangulations.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/packages/Triangulations.m2 2023-06-14 18:30:58.000000000 +0000 @@ -948,7 +948,6 @@ /// TEST /// --- no-check-flag #2704 needsPackage "Triangulations" needsPackage "Polyhedra" diff -Nru macaulay2-1.22~rc1+ds/M2/Macaulay2/tests/ComputationsBook/Makefile.in macaulay2-1.22+ds/M2/Macaulay2/tests/ComputationsBook/Makefile.in --- macaulay2-1.22~rc1+ds/M2/Macaulay2/tests/ComputationsBook/Makefile.in 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/Macaulay2/tests/ComputationsBook/Makefile.in 2023-06-14 18:30:58.000000000 +0000 @@ -1,8 +1,8 @@ # @configure_input@ include ../../../include/config.Makefile VPATH = @srcdir@ -CHAPTERS = completeIntersections d-modules exterior-algebra \ - monomialIdeals preface programming schemes toricHilbertScheme varieties +CHAPTERS = completeIntersections constructions d-modules exterior-algebra geometry \ + monomialIdeals preface programming schemes solving toricHilbertScheme varieties .PHONY: changes capture all: $(CHAPTERS):; $(MKDIR_P) "$@" diff -Nru macaulay2-1.22~rc1+ds/M2/VERSION macaulay2-1.22+ds/M2/VERSION --- macaulay2-1.22~rc1+ds/M2/VERSION 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/M2/VERSION 2023-06-14 18:30:58.000000000 +0000 @@ -1 +1 @@ -1.22-rc1 +1.22 diff -Nru macaulay2-1.22~rc1+ds/.pc/applied-patches macaulay2-1.22+ds/.pc/applied-patches --- macaulay2-1.22~rc1+ds/.pc/applied-patches 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/applied-patches 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -git-description.patch -reproducible-version.patch -reproducible-startup-m2.patch -use-cached-examples.patch -skip-failing-core-tests.patch -skip-failing-package-tests.patch -skip-failing-engine-tests.patch -use-dh-elpa.patch -topcom-memopt.patch -release-candidate.patch diff -Nru macaulay2-1.22~rc1+ds/.pc/git-description.patch/M2/configure.ac macaulay2-1.22+ds/.pc/git-description.patch/M2/configure.ac --- macaulay2-1.22~rc1+ds/.pc/git-description.patch/M2/configure.ac 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/git-description.patch/M2/configure.ac 1970-01-01 00:00:00.000000000 +0000 @@ -1,2163 +0,0 @@ -AC_INIT([Macaulay2],[m4_esyscmd_s([cat VERSION])],[Macaulay2@math.uiuc.edu],[Macaulay2],[http://macaulay2.com/]) -AC_MSG_NOTICE([configuring Macaulay2 version $PACKAGE_VERSION]) -AC_CONFIG_SRCDIR(INSTALL) -AC_CONFIG_HEADERS(include/M2/config.h) -AC_CONFIG_FILES(m4_include(config/files)) -AC_SUBST(CONFIGURED_FILES,"$ac_config_files") -AC_SUBST(CONFIG_ARGS,"$ac_configure_args") -echo "'$0' $ac_configure_args" > config.args -C_CONFIG_ARGS=` echo "$ac_configure_args" | sed -e 's=\\\\=\\\\\\\\=g' -e 's=\\"=\\\\"=g' ` -AC_DEFINE_UNQUOTED(CONFIG_ARGS,"$C_CONFIG_ARGS",arguments used for configure) -AC_SUBST(CONFIG_CMD,"'$0' $ac_configure_args") - -AC_CONFIG_MACRO_DIR([config]) dnl can't get this to work -m4_include(config/ax_compare_version.m4) -m4_include(config/ax_prog_cc_for_build.m4) -m4_include(config/ax_func_accept_argtypes.m4) -m4_include(config/relpaths.m4) -m4_include(config/gtest.m4) -m4_include(config/openmp.m4) -m4_include(config/search-libraries.m4) -m4_include(config/ax_boost_base.m4) -m4_include(config/ax_boost_regex.m4) - -dnl define(TO_UPPER,[translit($1, [a-z], [A-Z])]) - -echo "relevant environment variable values, if any:" -for x in CC FC CXX AR CPPFLAGS CFLAGS FCFLAGS CXXFLAGS LDFLAGS LIBS ISSUE DISTRIBUTION PKG_CONFIG_PATH GFTABLESDIR -do eval v=\$$x - test "$v" && echo " $x = $v" -done - -AC_SUBST(DISTRIBUTION) # use this starting number to sequentially number the downstream distributions -test "$DISTRIBUTION" || DISTRIBUTION=1 - -for i in $CFLAGS -do case $i in - -I*) AC_MSG_ERROR(preprocessor flag $i found in CFLAGS instead of in CPPFLAGS) ;; - -L*) AC_MSG_ERROR(link flag $i found in CFLAGS instead of in LDFLAGS);; - esac -done - -for i in $CXXFLAGS -do case $i in - -I*) AC_MSG_ERROR(preprocessor flag $i found in CXXFLAGS instead of in CPPFLAGS);; - -L*) AC_MSG_ERROR(link flag $i found in CXXFLAGS instead of in LDFLAGS);; - esac -done - -for i in $CPPFLAGS -do case $i in - -L*) AC_MSG_ERROR(link flag $i found in CPPFLAGS instead of in LDFLAGS);; - esac -done - -for i in $LDFLAGS -do case $i in - -I*) AC_MSG_ERROR(preprocessor flag $i found in LDFLAGS instead of in CPPFLAGS);; - esac -done - -dnl AC_MSG_CHECKING(whether $FIND is GNU find) -dnl if "$FIND" --version | head -1 | grep "GNU find" >/dev/null 2>&1 -dnl then AC_MSG_RESULT(yes) -dnl else AC_MSG_ERROR($FIND: GNU find is required") -dnl fi - -dnl interesting behavior: $A expansion happens after statement separation! -dnl $ A="echo hi 2>/dev/null " -dnl $ echo "`$A`" -dnl hi 2>/dev/null -dnl $ $A -dnl hi 2>/dev/null -dnl $ eval $A -dnl hi - -AC_SUBST(NODENAME,"`uname -n`") -AC_DEFINE_UNQUOTED(NODENAME,"$NODENAME",hostname used for compilation) - -AC_SUBST(ISSUE) # no initial value -AC_ARG_WITH(issue, AS_HELP_STRING([--with-issue=...,specify the OS issue (e.g., Ubuntu-7.10)]),ISSUE=$withval) -AC_SUBST(OS,"` uname -s | sed s=/=-=g `") -AC_SUBST(REL,"` uname -r | sed -e s=/=-=g -e 's= =+=' -e 's=[()]==g' `") -AC_SUBST(UNAME_INFO_COMMAND," uname -pmso 2>/dev/null || uname -pms ") -AC_SUBST(UNAME_INFO,"` eval $UNAME_INFO_COMMAND `") - -case $OS in - # Here we normalize the name of the OS for windows for startup.m2, which - # needs to know that C:/FOO/BAR is an absolute path. - CYGWIN*) OS=MicrosoftWindows ; ISSUE=${ISSUE:-Cygwin} ;; -esac - -if test ! "$ISSUE" -then if test -f /usr/bin/sw_vers - then ISSUE_FLAVOR=`/usr/bin/sw_vers -productName` - ISSUE_RELEASE=`/usr/bin/sw_vers -productVersion` - elif test -f /usr/bin/lsb_release - then ISSUE_FLAVOR=`lsb_release -s --id` - ISSUE_RELEASE=`lsb_release -s --release` - elif test -f /etc/os-release - then ISSUE_FLAVOR=`. /etc/os-release ; echo $ID` - ISSUE_RELEASE=`. /etc/os-release ; echo $VERSION_ID` - elif test -f /usr/lib/os-release - then ISSUE_FLAVOR=`. /usr/lib/os-release ; echo $ID` - ISSUE_RELEASE=`. /usr/lib/os-release ; echo $VERSION_ID` - elif test -f /bin/freebsd-version - then ISSUE_FLAVOR=FreeBSD - ISSUE_RELEASE=`freebsd-version` - elif test -f /etc/system-release - then ISSUE_FLAVOR=[`&1 | grep remove-section >/dev/null - then val=yes - else val=no - fi - AC_MSG_RESULT($val) - AC_SUBST(STRIP_REMOVE_SECTION,$val) -fi - -AC_MSG_CHECKING(whether $MAKE is GNU make) -if "$MAKE" --version | head -1 | grep GNU >/dev/null 2>&1 -then AC_MSG_RESULT(yes) -else AC_MSG_RESULT(no) - AC_MSG_ERROR($MAKE: GNU make is required) -fi - -AC_MSG_CHECKING(whether GNU make is recent enough) -dnl Note: run our makefiles with GNU make, version 4 or larger. -dnl Version 3.81, provided on Mac OS X, has a bug, but you can -dnl use "homebrew" to install a modern version under the name "gmake" -if "$MAKE" --version | head -1 | grep "GNU Make 3.81" >/dev/null 2>&1 -then AC_MSG_RESULT(no) - AC_MSG_ERROR([$MAKE: GNU make 3.81 found, too old; install a more recent version]) -else AC_MSG_RESULT(yes) -fi - -AC_MSG_CHECKING(whether $TAR is GNU tar) -if "$TAR" --version | head -1 | grep "GNU tar" >/dev/null 2>&1 -then AC_MSG_RESULT(yes) -else AC_MSG_ERROR($TAR: GNU tar is required) -fi - -AC_ARG_ENABLE([documentation], - [AS_HELP_STRING([--enable-documentation=...], - [space-delimited list of types of documentation to build; available - options are "html", "info", and "pdf"; default value is "html info"])], - [DOCUMENTATION=$enableval], - [DOCUMENTATION="html info"]) - -if test "$DOCUMENTATION" = no -then DOCUMENTATION="" -elif test "$DOCUMENTATION" = yes -then DOCUMENTATION="html info" -else for DOCTYPE in $DOCUMENTATION - do case $DOCTYPE in - html|info|pdf) - ;; - *) - AC_MSG_ERROR([unknown documentation type ($DOCTYPE); expected html, info, or pdf]) - ;; - esac - done -fi - -AC_SUBST(DOCUMENTATION) - -dnl deprecated in 1.22 -dnl TODO: remove this completely after 1.22 is released -AC_ARG_ENABLE([syntax-highlighting], - [AS_HELP_STRING([--enable-syntax-highlighting], - [this option is deprecated; syntax highlight is always enabled.])], - [AC_MSG_WARN([the --enable-syntax-highlighting option is deprecated; syntax highlighting is always enabled.])]) - -AC_CANONICAL_HOST() -AC_SUBST(ARCH,$build_cpu) -AC_DEFINE_UNQUOTED(ARCH,"$ARCH",[machine hardware type]) - - -dnl AC_ARG_VAR(CC,C compiler to use) -dnl AC_ARG_VAR(CXX,C++ compiler to use) - -AC_SUBST(OPTIMIZE,yes) AC_ARG_ENABLE(optimize, AS_HELP_STRING(--disable-optimize,disable optimization), OPTIMIZE=$enableval) - -AC_SUBST(NTL_WIZARD,no) AC_ARG_ENABLE(ntl-wizard, AS_HELP_STRING(--enable-ntl-wizard,enable running the NTL wizard), NTL_WIZARD=$enableval) - -AC_SUBST(M2_CPPFLAGS) -AC_SUBST(M2_CFLAGS) -AC_SUBST(M2_CXXFLAGS) - -dnl Fix standards, apply everywhere -CXXFLAGS="-std=gnu++14 $CXXFLAGS" -CFLAGS="-std=gnu11 $CFLAGS" - -AC_PROG_CC() # set CFLAGS before this -AC_SUBST(GCC) # gets set to yes or no by AC_PROG_CC - -AC_PROG_CXX() # set CXXFLAGS before this -AC_SUBST(GXX) # gets set to yes or no by AC_PROG_CXX - -AC_PROG_YACC() -if test "$YACC" = byacc -then AC_MSG_ERROR([byacc found, but leads to a crash in scc1: install bison instead]) -fi - -AC_PROG_RANLIB() -AC_PROG_INSTALL() -AC_PROG_AWK() - -dnl always compile with "-g", so we can debug even optimized versions -if test "$GCC" = yes -then CFLAGS="$CFLAGS -g3" - CXXFLAGS="$CXXFLAGS -g3" - LDFLAGS="$LDFLAGS -g3" -else CFLAGS="$CFLAGS -g" - CXXFLAGS="$CXXFLAGS -g" - LDFLAGS="$LDFLAGS -g" -fi - -AC_SUBST(DEBUG,no) AC_ARG_ENABLE(debug, AS_HELP_STRING(--enable-debug,enable debugging (and disable stripping)), DEBUG=$enableval) -if test "$DEBUG" = yes -then # It is a mistake to add "-DDEBUG" to CPPFLAGS, because it is nonstandard and may confusing libraries, such as "flint". - # Instead, NDEBUG being *not* defined as a C macro is what indicates debug mode. This is standard practice. - # gc.h obeys the GC_DEBUG flag: - M2_CPPFLAGS="$M2_CPPFLAGS -DGC_DEBUG" - CPPFLAGS="$CPPFLAGS -DGC_DEBUG" -else M2_CPPFLAGS="$M2_CPPFLAGS -DNDEBUG" - CPPFLAGS="$CPPFLAGS -DNDEBUG" -fi - -[ - CFLAGS=` echo $CFLAGS | sed -e 's/-O[0-9]//g' -e 's/ */ /g' -e 's/^ *//' -e 's/ * $//' ` - CXXFLAGS=` echo $CXXFLAGS | sed -e 's/-O[0-9]//g' -e 's/ */ /g' -e 's/^ *//' -e 's/ * $//' ` - FCFLAGS=` echo $FCFLAGS | sed -e 's/-O[0-9]//g' -e 's/ */ /g' -e 's/^ *//' -e 's/ * $//' ` -] - -if test "$OPTIMIZE" = yes -then CFLAGS="$CFLAGS -O2" - CXXFLAGS="$CXXFLAGS -O2" - FCFLAGS="$FCFLAGS -O2" -else CFLAGS="$CFLAGS -O0" - CXXFLAGS="$CXXFLAGS -O0" - FCFLAGS="$FCFLAGS -O0" -fi - -AC_SUBST(GCCVERSION) -if test $GCC = yes -then AC_MSG_CHECKING(for $CC version) - GCCVERSION=`$CC -dumpversion 2>&1 | sed 's/.*-\(.*\):.*/\1/'` - AC_MSG_RESULT($GCCVERSION) -fi - -dnl this macro is available only in autoconf 2.60, but most systems have 2.59 as the default: -dnl AC_PROG_MKDIR_P() - -AC_MSG_CHECKING(whether exceptions are caught) - AC_LANG(C++) - AC_RUN_IFELSE([AC_LANG_SOURCE([ - #include - #include - int main () { - const std::string s("caught"); - try { throw(std::runtime_error(s)); } - catch (std::runtime_error e) { } - return 0; - }])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT([no, use a different C++ compiler])]; exit 1 - ) - -AC_CHECK_SIZEOF([int *]) -AC_SUBST(SIZEOF_INT_P,$ac_cv_sizeof_int_p) -AC_CHECK_SIZEOF([long]) -AC_SUBST(SIZEOF_LONG,$ac_cv_sizeof_long) - -dnl Now we make the 32 bit / 64 bit choice explicit, because config.guess may guess it's a 32 bit system even though gcc compiles -dnl 64 bit object code by default, and then mpir's configure script (versions 1.2.1 and 1.3.0-rc1) gets confused. -dnl if test "$GCC" = yes -dnl then if test "$SIZEOF_INT_P" = 4 -dnl then case " $CC $CFLAGS " in -dnl *" -m32 "*) ;; -dnl *) CC="$CC -m32" ;; -dnl esac -dnl fi -dnl if test "$SIZEOF_INT_P" = 8 -dnl then case " $CC $CFLAGS " in -dnl *" -m64 "*) ;; -dnl *) CC="$CC -m64" ;; -dnl esac -dnl fi -dnl fi -dnl if test "$GXX" = yes -dnl then if test "$SIZEOF_INT_P" = 4 -dnl then case " $CXX $CFLAGS " in -dnl *" -m32 "*) ;; -dnl *) CXX="$CXX -m32" ;; -dnl esac -dnl fi -dnl if test "$SIZEOF_INT_P" = 8 -dnl then case " $CXX $CFLAGS " in -dnl *" -m64 "*) ;; -dnl *) CXX="$CXX -m64" ;; -dnl esac -dnl fi -dnl fi - -AC_CHECK_HEADERS_ONCE([sys/time.h]) -AC_CHECK_HEADERS(sys/ioctl.h termios.h sys/mman.h sys/socket.h netdb.h netinet/in.h arpa/inet.h sys/time.h time.h sys/wait.h sys/resource.h io.h linux/personality.h stddef.h stdint.h inttypes.h elf.h execinfo.h stdlib.h syscall.h sys/types.h sys/stat.h unistd.h math.h pthread.h assert.h alloca.h malloc.h dlfcn.h) -AC_CHECK_HEADERS(winsock2.h) dnl used with ws2_32.dll under mingw64 -dnl winsock2.h should be included before including windows.h -dnl pthread.h includes windows.h -dnl therefore winsock2.h should be included before pthread -AC_SEARCH_LIBS(clock_gettime,rt) -dnl winsock2.h should be used with ws2_32.lib; it defines: -dnl accept bind closesocket connect freeaddrinfo getaddrinfo gethostbyaddr -dnl gethostbyname gethostname getnameinfo getpeername getprotobyname -dnl getprotobynumber getservbyname getservbyport getsockname getsockopt htonl htons -dnl inet_addr inet_ntoa inet_ntop inet_pton ioctlsocket listen ntohl ntohs recv -dnl recvfrom select send sendto setsockopt shutdown socket -AC_SEARCH_LIBS(socket,socket ws2_32) dnl ws2_32 is used under mingw64 -AC_SEARCH_LIBS(hstrerror,resolv) -AC_SEARCH_LIBS(dlopen,dl) -AC_SEARCH_LIBS(gethostbyname,nsl) - -AC_SUBST(ENABLE_TBB,yes) AC_ARG_ENABLE(tbb, AS_HELP_STRING(--disable-tbb,disable use of the tbb (threaded building blocks) library), ENABLE_TBB=$enableval) -if test $ENABLE_TBB = yes -then AC_DEFINE(WITH_TBB,1,[whether the tbb library has been enabled by the builder]) - AC_SUBST(LIBTBB) dnl LIBTBB is usually set to -ltbb - AC_LANG(C++) - AC_CHECK_HEADER(tbb/tbb.h, - [AC_SEARCH_LIBS(TBB_runtime_interface_version,"tbb", - LIBTBB=$ac_cv_search_TBB_runtime_interface_version, - [AC_MSG_ERROR([tbb library not found])])], - [AC_MSG_ERROR([tbb include file (tbb.h) not found])]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 - #include - int main () { - printf("tbb version %d.%d found\n", TBB_VERSION_MAJOR, TBB_VERSION_MINOR); - return 0; - } - ]])]) -fi - -AC_CHECK_FUNCS([herror error clock_gettime getaddrinfo hstrerror sync getpgrp setpgid fchmod pipe waitpid setrlimit alarm fork sigprocmask kill longjmp siglongjmp sigaction wait4 readlink lstat realpath mkdir link symlink socket accept fcntl personality ioctl]) - -AC_SUBST(HAVE_PERSONALITY,$ac_cv_func_personality) - -AC_DEFINE_UNQUOTED(SOCKLEN_T,[`echo "$ac_cv_func_accept_arg3" | sed 's/ \*$//'`],[socket length type used by accept()]) - -if test $host_os = mingw32 -then CPPFLAGS="$CPPFLAGS -D_POSIX" # arrange for SIGPIPE to get defined - CPPFLAGS="$CPPFLAGS -D__USE_MINGW_ALARM" # for SIGALRM to get defined -fi - -AC_SUBST(__INTEL_COMPILER,no) -AC_CHECK_DECL(__INTEL_COMPILER,__INTEL_COMPILER=yes) - -dnl this macro is available only in autoconf 2.60, but most systems have 2.59 as the default: -dnl AC_TYPE_INT64_T() - -AC_FUNC_ALLOCA() - -dnl AC_SUBST(PTHREADS,yes) AC_ARG_ENABLE(pthreads, AS_HELP_STRING(--disable-pthreads,[disable pthreads (for gc)]), PTHREADS=$enableval) - -AC_SUBST(ENABLE_STRIP,no) AC_ARG_ENABLE(strip, AS_HELP_STRING(--enable-strip,strip the symbol table from the Macaulay2 binary), ENABLE_STRIP=$enableval) -test "$DEBUG" = "yes" && ENABLE_STRIP=no -# note: we build many programs for inclusion in the distribution -- stripping them saves 9MB of 70 - -AC_SUBST(MEMDEBUG,no) AC_ARG_ENABLE(memdebug, AS_HELP_STRING(--enable-memdebug,enable memory allocation debugging), MEMDEBUG=$enableval) -AC_SUBST(ENCAP,no) AC_ARG_ENABLE(encap, AS_HELP_STRING(--enable-encap,encapsulate all files in a subdirectory at installation time), ENCAP=$enableval) -AC_SUBST(XCODE,no) AC_ARG_ENABLE(xcode, AS_HELP_STRING(--enable-xcode,create Macaulay2/d/interpret.a for use with xcode), XCODE=$enableval) - -AC_SUBST(CC_THREAD_SUPPORT) -AC_MSG_CHECKING(whether the C compiler accepts the __thread storage attribute) -AC_LANG(C) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([__thread int x;])], - CC_THREAD_SUPPORT=yes; [AC_MSG_RESULT(yes)], - CC_THREAD_SUPPORT=no ; [AC_MSG_RESULT(no)]) - -AC_SUBST(XML,yes) -AC_ARG_ENABLE(xml, AS_HELP_STRING(--disable-xml,[do not link with xml library]), XML=$enableval) -if test "$XML" = yes -then AC_DEFINE(WITH_XML,1,[whether we are linking with the xml library]) -fi - -AC_SUBST(MYSQL,no) -AC_ARG_WITH(mysql, AS_HELP_STRING(--with-mysql,[link with mysql]), MYSQL=$withval) -if test "$MYSQL" = yes -then AC_DEFINE(WITH_MYSQL,1,[whether we are linking with the mysql library]) -fi - -AC_ARG_ENABLE(altivec, AS_HELP_STRING(--enable-altivec,compile with "-faltivec" option)) -if test "$enable_altivec" = yes -then LDFLAGS="$LDFLAGS -faltivec" - CFLAGS="CFLAGS -faltivec" - CXXFLAGS="$CXXFLAGS -faltivec" -fi - -AC_PROG_FC() dnl check for Fortran compiler presence -USE_FCLIBS=unspecified -AC_ARG_ENABLE(fc-lib-ldflags, - AS_HELP_STRING(--disable-fc-lib-ldflags,[do not use extra libraries for linking with Fortran (the default under Cygwin)]), - USE_FCLIBS=$enableval) - -if test "$USE_FCLIBS" = unspecified -then if test "$ISSUE" = Cygwin - then USE_FCLIBS=no - AC_MSG_NOTICE([by default under Cygwin, not adding linker flags to link with Fortran libraries]) - else USE_FCLIBS=yes - AC_MSG_NOTICE([by default, adding linker flags to link with Fortran libraries]) - fi -fi - -if test "$FC" -then AC_FC_DUMMY_MAIN() - AC_FC_WRAPPERS() - AC_FC_LIBRARY_LDFLAGS() -fi - -dnl if test "$PTHREADS" = yes -dnl then - AC_SEARCH_LIBS(pthread_mutex_trylock,pthread) -dnl fi - -AC_SUBST(PROFILING,no) -AC_ARG_ENABLE(profile, AS_HELP_STRING(--enable-profile,enable profiling (and disable stripping)), PROFILING=$enableval) -test "$PROFILING" = no; val=$?; AC_DEFINE_UNQUOTED(PROFILING, $val,whether profiling has been enabled) - -AC_SUBST(COMPRESS,gz) AC_ARG_ENABLE(compress, AS_HELP_STRING([--enable-compress=[gz|bz2]],compression method for tarball), COMPRESS=$enableval) - -AC_SUBST(EXPERIMENT,no) -AC_ARG_ENABLE(experimental-code, AS_HELP_STRING(--enable-experimental-code,enable experimental code), EXPERIMENT=$enableval) -test "$EXPERIMENT" = no; val=$?; AC_DEFINE_UNQUOTED(EXPERIMENT,$val,whether experimental code has been enabled) - -AC_SUBST(M2TARFILE,no) AC_ARG_ENABLE(tarfile, AS_HELP_STRING(--enable-tarfile,prepare binary and source packages as compressed tar files), M2TARFILE=$enableval) -AC_SUBST(TARLIBS,no) AC_ARG_ENABLE(tarlibs, AS_HELP_STRING(--enable-tarlibs,include symbolic links to needed shared libraries for tar), TARLIBS=$enableval) -AC_SUBST(SHARED,yes) AC_ARG_ENABLE(shared, AS_HELP_STRING(--disable-shared,disable building of shared libraries), SHARED=$enableval) - -dnl Under Mac OS X 10.15 the Gatekeeper makes it impossible for us to distribute shared libraries with our program to end users in disk image (*.dmg) format: -dnl ... but we've given up on trying to satisfy the gatekeeper. There is a strange error message when we try to link with libgmp.a: -dnl ld: illegal text-relocation to '___gmp_binvert_limb_table' in /Users/runner/runners/2.263.0/work/M2/M2/M2/BUILD/cicd/usr-host/lib/libgmp.a(mp_minv_tab.o) from '___gmpn_divexact_1' in /Users/runner/runners/2.263.0/work/M2/M2/M2/BUILD/cicd/usr-host/lib/libgmp.a(dive_1.o) for architecture x86_64 -dnl if test "$ISSUE_FLAVOR" = "MacOS" -dnl then SHARED=no -dnl AC_MSG_NOTICE([disabling the building of shared libraries under Mac OS X]) -dnl fi - -test "$MEMDEBUG" = "yes" && DEBUG=yes -test "$PROFILING" = "yes" && CFLAGS="$CFLAGS -pg" CXXFLAGS="$CXXFLAGS -pg" LDFLAGS="$LDFLAGS -pg" ENABLE_STRIP=no - -if <$srcdir/Macaulay2/packages/=distributed-packages sort|uniq -c|grep -v -q ' 1 ' -then echo "error: some packages are listed more than once in Macaulay2/packages/=distributed-packages:" - <$srcdir/Macaulay2/packages/=distributed-packages sort|uniq -c|grep -v ' 1 ' - exit 1 -fi -AC_SUBST(PACKAGES,`cat $srcdir/Macaulay2/packages/=distributed-packages`) -[if [ $? != 0 ] ; then exit 1 ; fi] -# convert the newlines to spaces -PACKAGES=`echo $PACKAGES` -AC_DEFINE_UNQUOTED(PACKAGES,"$PACKAGES",the list of packages included with the release of Macaulay2) - -AC_DEFINE_UNQUOTED(buildsystemtype,"$build",the type of system on which the package was built) -AC_DEFINE_UNQUOTED(hostsystemtype,"$host",the type of system on which the package runs) - -case $host in - i586-*|i686-*) - newhost=`echo $host | sed s/i.86-/i486-/` - AC_MSG_NOTICE([warning: building for host $host might not be compatible enough, consider using option "--build=$newhost"]) ;; -esac - -AC_SUBST(AUTOINST,no) -AC_ARG_ENABLE( - auto-instantiation, - AS_HELP_STRING([--enable-auto-instantiation,enable automatic instantiation of C++ templates (it uses -frepo option to g++)]), - AUTOINST=$enableval) -test "$AUTOINST" = no; val=$?; AC_DEFINE_UNQUOTED(AUTOINST,$val,whether to instantiate templates automatically) - -AC_SUBST(IMPLINST,yes) -AC_ARG_ENABLE( - implicit-templates, - AS_HELP_STRING([--disable-implicit-templates,disable implicit instantiation of C++ templates (it uses -fno-implicit-templates option to g++)]), - IMPLINST=$enableval) -test "$IMPLINST" = no; val=$?; AC_DEFINE_UNQUOTED(IMPLINST,$val,whether to instantiate templates implicitly) - -AC_SUBST(DEVELOPMENT,no) -AC_ARG_ENABLE(development, AS_HELP_STRING(--enable-development,build a development version), DEVELOPMENT=$enableval) -if test "$DEVELOPMENT" = yes -then AC_DEFINE_UNQUOTED(DEVELOPMENT,1,whether to build a development version) -fi - -AC_SUBST(DEVELOPER) -AC_ARG_WITH(developer, AS_HELP_STRING(--with-developer=...,specify the name of the developer ($USER)),DEVELOPER=$withval) - -AC_SUBST(TAR_COMPRESS_OPTION,) -case $COMPRESS in - gz) TAR_COMPRESS_OPTION=--gzip ;; - bz2) TAR_COMPRESS_OPTION=--bzip ;; - *) AC_MSG_ERROR(unrecognized option for enable-compress) ;; -esac - -AC_SUBST(GIT_DESCRIPTION) -# TODO: currently finds the last commit that changed the VERSION file -# but ideally it should get the last release commit instead -NEW_COMMITS=`$GIT rev-list $($GIT rev-list -1 HEAD $srcdir/VERSION)..HEAD --count` -GIT_COMMIT=`$GIT describe --dirty --always --match HEAD` -if test "$NEW_COMMITS-$GIT_COMMIT" = "-" -then GIT_DESCRIPTION=version-$PACKAGE_VERSION-unknown -else GIT_DESCRIPTION=version-$PACKAGE_VERSION-$NEW_COMMITS-$GIT_COMMIT -fi -AC_DEFINE_UNQUOTED(GIT_DESCRIPTION,"$GIT_DESCRIPTION",[summary of git status]) - -AC_SUBST(DEB,no) -AC_ARG_ENABLE(deb, AS_HELP_STRING(--enable-deb,prepare a *.deb package (for debian, ubuntu, ...)), DEB=$enableval) -if test "$DEB" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-deb both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-deb both specified]) - fi -fi - -AC_SUBST(FREEBSD,no) -AC_ARG_ENABLE(freebsd, AS_HELP_STRING(--enable-freebsd,prepare a package file for freebsd), FREEBSD=$enableval) -if test "$FREEBSD" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-freebsd both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-freebsd both specified]) - fi -fi - -AC_SUBST(RPM,no) -AC_ARG_ENABLE(rpm, AS_HELP_STRING(--enable-rpm,prepare a *.rpm package (for red hat based systems)), RPM=$enableval) -if test "$RPM" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-rpm both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-rpm both specified]) - fi -fi - -AC_SUBST(DMG,no) -AC_ARG_ENABLE(dmg, AS_HELP_STRING(--enable-dmg,prepare a *.dmg package (for Mac OS)), DMG=$enableval) -if test "$DMG" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-dmg both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-dmg both specified]) - fi - if test $SHARED = yes - then SHARED=no - AC_MSG_WARN([--enable-dmg specified, so disabling the building of shared libraries]) - fi -fi - -AC_SUBST(M2SUFFIX) -test "$program_suffix" != NONE && M2SUFFIX=$program_suffix -AC_ARG_ENABLE(dummy, AS_HELP_STRING(--program-suffix=...,suffix to append to executable name M2)) - -AC_DEFINE(M2_CONFIG_H,1,a macro definition to ensure our config.h was the one loaded) - -AC_DEFINE_UNQUOTED(M2SUFFIX,"$M2SUFFIX",[suffix to append to executable name M2]) - -WITH_NEWLINE_CR=0 -WITH_NEWLINE_CRLF=0 -AC_ARG_WITH(newline, AS_HELP_STRING([--with-newline=...], [crlf, cr, or lf (the default)]), - [ case $withval in - crlf) WITH_NEWLINE_CRLF=1 WITH_NEWLINE_CR=0 ;; - cr) WITH_NEWLINE_CR=1 WITH_NEWLINE_CRLF=0 ;; - lf) WITH_NEWLINE_CR=0 WITH_NEWLINE_CRLF=0 ;; - *) AC_MSG_ERROR([--with-newline expected crlf, cr, or lf]) ;; - esac ]) -AC_DEFINE_UNQUOTED(WITH_NEWLINE_CRLF,$WITH_NEWLINE_CRLF,[whether newline is cr lf]) -AC_DEFINE_UNQUOTED(WITH_NEWLINE_CR, $WITH_NEWLINE_CR, [whether newline is cr]) - -AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[suffix the compiler appends to executable filenames]) - -AC_SUBST(ISYSTEM,no) -AC_MSG_CHECKING(whether g++ gets confused about C linkage in system library files) -AC_LANG(C++) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - # 1 "foo" 1 3 4 - template struct A { };])],AC_MSG_RESULT(no);ISYSTEM=yes,AC_MSG_RESULT(yes)) - -dnl Check for openmp and fail if it cannot be found. -dnl This is required for building the library csdp and good for building the library normaliz -AC_LANG(C++) -AC_OPENMP -if test "$ac_cv_prog_cxx_openmp" = unsupported - then AC_MSG_ERROR([OpenMP does not work, use a compiler that supports OpenMP]) -fi -TMP=$OPENMP_CXXFLAGS -OPENMP_CXXFLAGS= -for i in $TMP -do case $i in - -l*) OPENMP_LIBS="$OPENMP_LIBS $i" ;; - *) OPENMP_CXXFLAGS="$OPENMP_CXXFLAGS $i" ;; - esac -done -AC_SUBST(OPENMP_CXXFLAGS,"$OPENMP_CXXFLAGS") -AC_SUBST(OPENMP_LIBS,"$OPENMP_LIBS") - -############################################################################# -AC_SUBST(BUILTLIBS) -# The list BUILTLIBS is the list of link options for the libraries we have decided to build, -# of the form "-lFOO", which will be used to link Macaulay2 later on. These libraries are not -# available at the time this configure script is run, which is why we can't add "-lFOO" to LIBS. -# (Programs linked by this configure script are linked with the options in LIBS. This allows libraries -# dependent on previously detected libraries to be detected by tests that involve linking. - -AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") -# The list LIBLIST is the list of libraries that might be used and linked into M2. - -AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") -# The list PROGLIST is the list of programs and libraries for them that are distributed with M2. -# Initially, we offer no option for not compiling some of them. - -AC_SUBST(SUBLIST, " memtailor mathic mathicgb fflas_ffpack givaro ") - -# The list SUBLIST is the list of submodules that might be used and linked into M2. - -# These three lists reflect dependencies, with prerequisites listed first, including the following dependencies: -# mathicgb needs mathic and memtailor -# mathic needs memtailor -# gc needs atomic_ops (and sometimes includes it) -# factory needs flint, ntl and gmp; it includes and installs gftables, so doesn't need it separately -# libfac has been replaced by code in factory -# lapack includes blas, makes both libblas and liblapack -# mpir is a plug-in replacement for gmp and can provide libgmp and libgmpxx, too. -# mpfr needs gmp (or mpir -# mpfr puts pointers to gmp numbers in thread local variables, unless -# specially configured, so we shouldn't tell gmp to use libgc (we used to do that) -# ntl needs gmp (or mpir) -# 4ti2 needs glpk -# glpk needs gmp (or mpir) -# topcom depends on cddlib -# gfan needs cddlib -# cddlib uses gmp -# polymake cannot be included in Macaulay2 because its compile/build/install procedure is flawed: -# it uses a dynamic readline library that can only be provided by fink and probably will not be copied into the install location -# it offers no way to provide a directory tree containing a readline library we've compiled -# it writes a file into the user's home directory called ".polymake" -# it asks questions -# normaliz needs libgmp, libgmpxx, boost -# Greg Smith requested cddplus and lrslib for future use -# nauty is used by the package Nauty -# normaliz is used by the package Normaliz -# gfan is used by the packages gfanInterface and StatePolytope -# 4ti2 is used by the package FourTiTwo -# linbox is provided as an option for experimentation -# linbox needs fflas_ffpack and givaro -# givaro uses gmp -# fflas_ffpack needs givaro and lapack, but fflas_ffpack is just source code, so we don't *have* to build it -# mpir is used by givaro -# mpir and mpfr are used by fplll -# flint depends on gmp (or mpir) and mpfr -# frobby depends on gmp -# mpfi needs mpfr - -AC_SUBST(FILE_PREREQS) -# This is the list of files found in the system that we need to be there for the user who -# installs a binary distribution. - -# a library is listed in BUILD_ALWAYS if and only if we *always* build it, -# even if the option "--disable-building" is specified: -BUILD_ALWAYS="" - -for i in $LIBLIST $SUBLIST $PROGLIST -do eval BUILD_$i=no -done - -# Convert package identifiers used here to package names as known by the package. -# The point is that BUILD_fflas_ffpack is a valid shell identifier, but -# the name of the package is fflas-ffpack and BUILD_fflas-ffpack is not valid as -# a shell identifier. We may need the name of the package, for example, as an -# argument to pkg-config. -for i in $LIBLIST -do eval PKGNAME_$i=$i -done -PKGNAME_fflas_ffpack=fflas-ffpack - -############################################################################# - -LIBLIST=" $LIBLIST " -AC_ARG_ENABLE(build-libraries, AS_HELP_STRING(--enable-build-libraries=...,[list of libraries, submodules, and programs to build from downloaded source code (e.g., gc gdbm mpir mpfr mpfi readline ntl gftables factory lapack mpsolve frobby glpk cddlib givaro fflas_ffpack linbox 4ti2 gfan normaliz csdp nauty cddplus lrslib)]), - [for i in $enableval - do case " $LIBLIST $SUBLIST $PROGLIST " in - *" $i "*) - eval BUILD_$i=yes - BUILD_ALWAYS="$BUILD_ALWAYS $i" - ;; - *) AC_MSG_ERROR(--enable-build-libraries option: unrecognized library name: $i) ;; - esac - done]) - -############################################################################# - -dnl We disable something temporarily that didn't work out, because if we put a static library, such -dnl as libflint.a, into LIBS, then mathicgb, mathic, and memtailor get confused and include a copy -dnl of the file in their *.a file. -TRY_STATIC=no - -AC_SUBST(LIBS_GDBM) -AC_LANG(C) -AC_CHECK_HEADER(gdbm.h, - test $BUILD_gdbm = yes && AC_MSG_WARN([[library gdbm exists, but we are asked to build it]]), - BUILD_gdbm=yes) -if test $BUILD_gdbm = yes -then LIBS_GDBM="-lgdbm" - BUILTLIBS="$LIBS_GDBM $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(gdbm_close,"/usr/lib/libgdbm.a" "/usr/local/lib/libgdbm.a",,[AC_MSG_ERROR([libgdbm.a not found])]) - else AC_SEARCH_LIBS(gdbm_close,"gdbm",,[AC_MSG_ERROR([libgdbm not found])]) - fi - if test "none required" != "$ac_cv_search_gdbm_close" - then LIBS_GDBM=$ac_cv_search_gdbm_close - fi -fi - -## we build gc by default so we can configure it for large memory spaces -## see issue #2445 -AC_ARG_WITH([system-gc], - [AS_HELP_STRING([--with-system-gc], - [use system gc instead of building it])], - [], - [with_system_gc=no]) - -AS_IF([test "x$with_system_gc" = xyes], - [AC_MSG_CHECKING(whether package bdw-gc is provided) -dnl Note: we don't include -lgccpp below, because linking with that library is what replaces ::new and friends with GC_MALLOC_UNCOLLECTABLE and friends: - if [ pkg-config --exists bdw-gc ] - then AC_MSG_RESULT(yes) - CPPFLAGS="`pkg-config --cflags-only-I bdw-gc | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - dnl should probably use `pkg-config --libs bdw-gc` here instead - FOUND_gc=yes - else AC_MSG_RESULT(no) - BUILD_gc=yes - fi], - [BUILD_gc=yes]) - -if test $BUILD_gc = yes -then BUILTLIBS="-lgc -lpthread $BUILTLIBS" - BUILD_ALWAYS="$BUILD_ALWAYS gc" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(GC_malloc,"/usr/lib/libgc.a" "/usr/local/lib/libgc.a",, - [AC_MSG_ERROR([libgc.a not found])]) - else AC_SEARCH_LIBS(GC_malloc,"gc",,[AC_MSG_ERROR([libgc not found])]) - fi -fi - -# mpir and gmp serve the same purpose -AC_SUBST(LIBS_GMP) -AC_LANG(C) -AC_CHECK_HEADER(gmp.h, FOUND_gmp=yes ,FOUND_gmp=no ) -AC_CHECK_HEADER(mpir.h,FOUND_mpir=yes,FOUND_mpir=no) -dnl Remark: both gmp.h and mpir.h are surrounded by -dnl #ifndef __GMP_H__ -dnl #endif -dnl , so only one can be loaded. Similarly for gmpxx.h and mpirxx.h. However, the contents of -dnl the files differ. For example, mpf_cmp_z is defined only in gmp.h. -AC_SUBST(PREFERRED_INTEGER_PACKAGE,gmp) -AC_ARG_WITH(integer-package, - AS_HELP_STRING(--with-integer-package=[mpir|gmp],specify the big integer package to use (mpir or gmp)), - if ! test $withval = mpir -o $withval = gmp - then AC_MSG_ERROR([big integer package option: invalid value: $withval]) - fi - PREFERRED_INTEGER_PACKAGE=$withval) -if test $BUILD_gmp = yes -a $BUILD_mpir = yes -then AC_MSG_ERROR([refusing to build both mpir and gmp, since the are interchangeable]) -fi -AC_MSG_CHECKING([whether to use gmp or mpir]) -if test "$PREFERRED_INTEGER_PACKAGE" = mpir -then USING_MPIR=1 - AC_MSG_RESULT([using mpir]) - AC_DEFINE(USING_MPIR,1,[Whether we use MPIR (instead of GMP)]) - if test "$FOUND_mpir" = no - then BUILD_mpir=yes - LIBS_GMP="-lmpirxx -lmpir" - BUILTLIBS="$LIBS_GMP $BUILTLIBS" - else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(__gmpz_init,"/usr/lib/libmpirxx.a /usr/lib/libmpir.a" "/usr/local/lib/libmpirxx.a /usr/local/lib/libmpir.a",, - [AC_MSG_ERROR([libmpir.a not found])]) - else SEARCH_LIBRARIES(__gmpz_init,"-lmpirxx -lmpir",,[AC_MSG_ERROR([libmpir not found])]) - fi - if test "none required" != "$ac_cv_search___gmpz_init" - then LIBS_GMP=$ac_cv_search___gmpz_init - fi - fi -else USING_MPIR=0 # i.e., using gmp - AC_MSG_RESULT([using gmp]) - AC_DEFINE(USING_MPIR,0,[Whether we use MPIR (instead of GMP)]) - if test "$FOUND_gmp" = no - then BUILD_gmp=yes - LIBS_GMP="-lgmpxx -lgmp" - BUILTLIBS="$LIBS_GMP $BUILTLIBS" - else AC_LANG(C) - if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(__gmpz_init,"/usr/lib/libgmpxx.a /usr/lib/libgmp.a" "/usr/local/lib/libgmpxx.a /usr/local/lib/libgmp.a",, - [AC_MSG_ERROR([libgmp.a not found])]) - else SEARCH_LIBRARIES(__gmpz_init,"-lgmpxx -lgmp",,[AC_MSG_ERROR([libgmp not found])]) - fi - if test "none required" != "$ac_cv_search___gmpz_init" - then LIBS_GMP=$ac_cv_search___gmpz_init - fi - dnl By the way: with Hombebrew on the Mac gmp comes with package configuration: - dnl $ pkg-config gmp --cflags - dnl -I/usr/local/Cellar/gmp/6.2.0/include - dnl $ pkg-config gmp --libs - dnl -L/usr/local/Cellar/gmp/6.2.0/lib -lgmp - fi -fi -AC_SUBST(USING_MPIR) - -AC_LANG(C) -AC_CHECK_HEADER(mpfr.h,,BUILD_mpfr=yes) -if test $BUILD_mpfr = yes -then BUILTLIBS="-lmpfr $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(mpfr_digamma,"/usr/lib/libmpfr.a" "/usr/local/lib/libmpfr.a",, - [AC_MSG_ERROR([libmpfr.a not found])]) - else AC_SEARCH_LIBS(mpfr_digamma,"mpfr",,[AC_MSG_ERROR([libmpfr not found])]) - fi -fi - -AC_LANG(C) -AC_CHECK_HEADER(mpfi.h,,BUILD_mpfi=yes) -if test $BUILD_mpfi = yes -then BUILTLIBS="-lmpfi $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(mpfi_set_prec,"/usr/lib/libmpfi.a" "/usr/local/lib/libmpfi.a",, - [AC_MSG_ERROR([libmpfi.a not found])]) - else AC_SEARCH_LIBS(mpfi_set_prec,"mpfi",,[AC_MSG_ERROR([libmpfi not found])]) - fi -fi - -# including mpsolve (requires gmp or mpir) -AC_LANG(C) -AC_CHECK_HEADER(mps/mps.h,LIBS="-lmps $LIBS",BUILD_mpsolve=yes) -if test $BUILD_mpsolve = yes -then BUILTLIBS="-lmps $BUILTLIBS" -fi - -AC_SUBST(LIBS_GLPK) -AC_LANG(C) -AC_CHECK_HEADER(glpk.h,,BUILD_glpk=yes) -if test $BUILD_glpk = yes -then BUILTLIBS="-lglpk $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(glp_free,"/usr/lib/libglpk.a" "/usr/local/lib/libglpk.a",,[AC_MSG_ERROR([libglpk.a not found])]) - else AC_SEARCH_LIBS(glp_free,"glpk",,[AC_MSG_ERROR([libglpk not found])]) - fi - if test "none required" != "$ac_cv_search_glp_free" - then LIBS_GLPK=$ac_cv_search_glp_free - fi -fi - -AC_MSG_CHECKING([whether givaro library is installed]) -AC_SUBST(BUILD_givaro) -if $PKG_CONFIG --exists givaro -then AC_MSG_RESULT(yes) - LIBS="`$PKG_CONFIG --libs givaro` $LIBS" - CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags-only-I givaro`" - AC_MSG_CHECKING([whether givaro has isUnit or isunit]) - AC_LANG([C++]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( [ #include - ], - [ class Givaro::GFqDom foo; foo.isunit(0) ])], - [AC_MSG_RESULT([isunit]); AC_DEFINE([HAVE_GIVARO_isunit], [1],[whether givaro has isunit])], - [AC_MSG_RESULT([isUnit]); AC_DEFINE([HAVE_GIVARO_isunit], [0],[whether givaro has isunit])]) -else AC_MSG_RESULT(no) - AC_DEFINE([HAVE_GIVARO_isunit], [0],[whether givaro has isunit]) - BUILD_givaro=yes -fi -if test $BUILD_givaro = yes -then BUILTLIBS="-lgivaro $BUILTLIBS" -fi - -# We add these directories to the end, so the user can override this by setting CPPFLAGS. -# /cddlib/ is more modern than /cdd/ -if test -d /usr/local/include/cddlib -then CPPFLAGS="$CPPFLAGS -I/usr/local/include/cddlib" -fi -if test -d /usr/local/include/cdd -then CPPFLAGS="$CPPFLAGS -I/usr/local/include/cdd" -fi -if test -d /usr/include/cddlib -then CPPFLAGS="$CPPFLAGS -I/usr/include/cddlib" -fi -if test -d /usr/include/cdd -then CPPFLAGS="$CPPFLAGS -I/usr/include/cdd" -fi -AC_LANG(C) -AC_CHECK_HEADER(cdd.h,,[ AC_MSG_RESULT([[cddlib not found, will build]]) - BUILD_cddlib=yes], - [ - #include - ]) -if test $BUILD_cddlib = yes -then BUILTLIBS="-lcdd $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(dd_Equal,"/usr/lib/libcdd.a" "/usr/local/lib/libcdd.a",, - [AC_MSG_ERROR([cdd.h found but libcdd.a not found])]) - else AC_SEARCH_LIBS(dd_Equal,"cdd",,[AC_MSG_ERROR([cdd.h found but libcdd not found])]) - fi -fi - -dnl factory needs to know: -AC_SUBST(BUILD_flint) -if test $BUILD_flint = no -then AC_LANG(C) - AC_MSG_CHECKING([for flint >= 2.6.3]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include - ], - [ - /* version == __FLINT_VERSION . __FLINT_VERSION_MINOR . __FLINT_VERSION_PATCHLEVEL */ - #if (__FLINT_VERSION < 2) \ - || (__FLINT_VERSION == 2 && __FLINT_VERSION_MINOR < 6) \ - || (__FLINT_VERSION == 2 && __FLINT_VERSION_MINOR == 6 && __FLINT_VERSION_PATCHLEVEL < 3) - #error old flint - #endif - ])], - AC_MSG_RESULT([yes]) - if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(_fmpz_mod_mul1,/usr/lib/libflint.a /usr/local/lib/libflint.a,, - [AC_MSG_ERROR([libflint.a not found])]) - else AC_SEARCH_LIBS(_fmpz_mod_mul1,"flint",,[AC_MSG_ERROR([libflint not found])]) - fi, - AC_MSG_RESULT([no]) - BUILD_flint=yes) -fi -if test $BUILD_flint = yes -then BUILTLIBS="-lflint $BUILTLIBS -lm" -fi - -dnl debian: 4ti2- -dnl suse: 4ti2_ -dnl fedora: /usr/lib/4ti2/bin or /usr/lib64/4ti2/bin -AC_MSG_CHECKING(whether the package 4ti2 is installed) -SAVE=$PATH -PATH="/usr/lib/4ti2/bin:/usr/lib64/4ti2/bin:$PATH" -FOUND_4ti2=no -for fourti2_prefix in "" "4ti2-" "4ti2_" -do - if command -v ${fourti2_prefix}circuits - then AC_MSG_RESULT([yes, using prefix "$fourti2_prefix"]) - FILE_PREREQS="$FILE_PREREQS `command -v ${fourti2_prefix}circuits`" - FOUND_4ti2=yes - break - fi -done -if test $FOUND_4ti2 = no -then AC_MSG_RESULT([no, will build]) - BUILD_4ti2=yes -fi -PATH=$SAVE - -AC_MSG_CHECKING(whether the package cohomcalg is installed) -if command -v cohomcalg -then if test "$OS" = Darwin -a "$DMG" = yes - then # On the Mac, we have no way (yet) to install prerequisite homebrew packages: - # the user just copies a directory tree to /Applications. Change this when - # porting to homebrew. - # Also, the package CohomCalg looks only in the directory where Macaulay2's binaries are - AC_MSG_RESULT([yes, will build anyway]) - BUILD_cohomcalg=yes - else AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v cohomcalg`" - fi -else AC_MSG_RESULT([no, will build]) - BUILD_cohomcalg=yes -fi - -AC_MSG_CHECKING(whether the package gfan is installed) -if command -v gfan -then gfan_version=`gfan _version | head -2 | tail -1 | sed 's/gfan//'` - AX_COMPARE_VERSION([$gfan_version], [ge], [0.6], - [AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v gfan`"], - [AC_MSG_RESULT([yes, but < 0.6, will build]) - BUILD_gfan=yes]) -else AC_MSG_RESULT([no, will build]) - BUILD_gfan=yes - dnl we'll also build cddlib until gfan can find its files in /usr/include instead of in /usr/include/cdd - BUILD_cddlib=yes -fi - -AC_MSG_CHECKING(whether the package lrs is installed) -if command -v lrs -then if test "$OS" = Darwin -a "$DMG" = yes - then # On the Mac, we have no way (yet) to install prerequisite homebrew packages: - # the user just copies a directory tree to /Applications. Change this when - # porting to homebrew. - AC_MSG_RESULT([yes, will build anyway]) - BUILD_lrslib=yes - else AC_MSG_RESULT(yes) - FILE_PREREQS="$FILE_PREREQS `command -v lrs`" - fi -else AC_MSG_RESULT([no, will build]) - BUILD_lrslib=yes -fi - -AC_MSG_CHECKING(whether the package csdp is installed) -if command -v csdp -then AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v csdp`" -else AC_MSG_RESULT([no, will build]) - BUILD_csdp=yes -fi - -AC_MSG_CHECKING(whether the package normaliz is installed) -if command -v normaliz -then normaliz_version=`normaliz --version | head -1 | cut -d " " -f 2` - AX_COMPARE_VERSION([$normaliz_version], [ge], [2.11], - [AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v normaliz`"], - [AC_MSG_RESULT([yes, but < 2.11, will build]) - BUILD_normaliz=yes]) -else AC_MSG_RESULT([no, will build]) - BUILD_normaliz=yes -fi - -if test "$BUILD_nauty" = no -then dnl debian/fedora: nauty- - AC_MSG_CHECKING(whether the package nauty is installed) - FOUND_nauty=no - for nauty_prefix in "" "nauty-" - do - if command -v ${nauty_prefix}complg - then - dnl check if #1408 is a problem - if ${nauty_prefix}biplabg < /dev/null 2>/dev/null - then - AC_MSG_RESULT([yes, using prefix "$nauty_prefix"]) - FILE_PREREQS="$FILE_PREREQS `command -v ${nauty_prefix}complg`" - FOUND_nauty=yes - break - else - FOUND_nauty=bad - fi - fi - done - if test $FOUND_nauty != yes - then - if test $FOUND_nauty = bad - then AC_MSG_RESULT([yes, but ${nauty_prefix}biplabg raises an error, will build]) - else AC_MSG_RESULT([no, will build]) - fi - BUILD_nauty=yes - fi -fi - -dnl debian: topcom- -dnl fedora: TOPCOM- (only for cube) -dnl gentoo: topcom_ (only for cube, 4 others) -dnl we save ourselves some trouble and check one of the programs that -dnl only debian gives a prefix -AC_MSG_CHECKING(whether the package topcom is installed) -FOUND_topcom=no -for topcom_prefix in "" "topcom-" -do - if command -v ${topcom_prefix}points2finetriangs - then AC_MSG_RESULT([yes, using prefix "$topcom_prefix"]) - FILE_PREREQS="$FILE_PREREQS `command -v ${topcom_prefix}points2finetriangs`" - FOUND_topcom=yes - break - fi -done -if test $FOUND_topcom = no -then AC_MSG_RESULT([no, will build]) - BUILD_topcom=yes -fi - -AC_MSG_CHECKING([whether eigen3 library is installed]) -if $PKG_CONFIG --exists eigen3 -then CFO=`$PKG_CONFIG --cflags-only-other eigen3` - CFI=`$PKG_CONFIG --cflags-only-I eigen3` - CXXFLAGS="$CXXFLAGS $CFO" - CPPFLAGS="$CPPFLAGS $CFI" - AC_MSG_RESULT([yes, with flags $CFI $CFO]) -else AC_MSG_ERROR(eigen library not found) -fi - -AC_LANG(C++) -AC_CHECK_HEADER(NTL/version.h,,BUILD_ntl=yes) -if test $BUILD_ntl = yes -then BUILTLIBS="-lntl $BUILTLIBS" -else AC_MSG_CHECKING([whether libntl is present and usable]) - if test $SHARED = no -a $TRY_STATIC = yes - then dnl It would be better to use SEARCH_LIBRARIES here, but all the symbols in libntl.a are mangled by the C++ compiler, - dnl so I don't know how to do it. - if test -f /usr/lib/libntl.a - then LIBS="/usr/lib/libntl.a $LIBS" - elif test -f /usr/local/lib/libntl.a - then LIBS="/usr/local/lib/libntl.a $LIBS" - else AC_MSG_ERROR([libntl.a not found]) - fi - else LIBS="-lntl $LIBS" - fi - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [ - #include - ], - [_ntl_GetTime()])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no, even though include files are present]) - AC_MSG_ERROR(quitting) - ]) -fi -dnl factory needs to know: -AC_SUBST(BUILD_ntl) - -AC_LANG(C++) -AC_CHECK_HEADER(frobby.h,LIBS="-lfrobby $LIBS",BUILD_frobby=yes) -if test $BUILD_frobby = yes -then BUILTLIBS="-lfrobby $BUILTLIBS" - dnl uncomment this to [1] when frobby is built from a submodule (?) - dnl AC_DEFINE([HAVE_FROBBY_VERSION], [0], [whether frobby has frobby_version]) -else - AC_MSG_CHECKING([whether frobby has frobby_version]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#include ], [frobby_version])], - [AC_MSG_RESULT([yes]) && AC_DEFINE([HAVE_FROBBY_VERSION], [1], [whether frobby has frobby_version])], - [AC_MSG_RESULT([no])]) -fi - -############################################################################# - -PROGLIST=" $PROGLIST " -AC_ARG_WITH(unbuilt-programs, - [AS_HELP_STRING(--with-unbuilt-programs=...,list of programs not to build from downloaded source code (e.g., $PROGLIST))], - [for i in $withval - do case $PROGLIST in - *" $i "*) eval BUILD_$i=no ;; - *) AC_MSG_ERROR(unrecognized program name: $i) ;; - esac - done]) - -AC_SUBST(DOWNLOAD,no) -AC_ARG_ENABLE(download, AS_HELP_STRING(--enable-download,enable automatic downloading of needed third-party libraries), DOWNLOAD=$enableval) -AC_CHECK_PROGS(WGET,wget,false) -AC_CHECK_PROGS(CURL,curl,false) -if test $DOWNLOAD = yes -then if test "$WGET" = false -a "$CURL" = false; then AC_MSG_ERROR(wget or curl is required); fi -fi - -# the order of these segments also reflects dependencies -AC_LANG(C) -AC_SEARCH_LIBS(tgoto,curses tinfo ncurses,,AC_MSG_ERROR([[not found: library containing symbol tgoto; tried libcurses, libncurses, and libtinfo)]])) -if test $BUILD_readline = no -then AC_CHECK_HEADER(readline/readline.h,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(rl_set_prompt,readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(rl_completion_matches,readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(readline,readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(add_history,history readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then # readline on Mac OS X is stuck at version 4.2, which has this bug: - # CTRL-A doesn't go all the way to the beginning of the - # line after typing r e s o TAB C-a - # So we build it ourselves. - AC_LANG(C) - AC_MSG_CHECKING([whether readline library is new enough (version at least 6)]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main () { return ! ( RL_READLINE_VERSION >= 6 * 0x100 ) ; }]])], - [ AC_MSG_RESULT([yes]) ], - [ AC_MSG_RESULT([no, will build it]) ; BUILD_readline=yes ], - [ AC_MSG_RESULT([cross-compiling, test not possible]) ]) -fi -if test $BUILD_readline = no -then AC_CHECK_DECL(rl_catch_signals,,BUILD_readline=yes,[ - #include - #include - ]) -fi -if test $BUILD_readline = yes -then AC_MSG_NOTICE(readline library will be compiled) - BUILTLIBS="-lreadline -lhistory $BUILTLIBS" -fi - -AC_ARG_WITH([system-memtailor], - [AS_HELP_STRING([--with-system-memtailor], - [use system memtailor instead of building git submodule])],, - [with_system_memtailor=no]) -if test $with_system_memtailor = no -then - BUILD_memtailor=yes - BUILTLIBS="-lmemtailor $BUILTLIBS" -else AC_LANG(C++) - AC_SEARCH_LIBS(MEMTAILOR_VERSION_STRING,memtailor,,BUILD_memtailor=yes) - AC_CHECK_HEADER(memtailor.h,,BUILD_memtailor=yes) -fi - -AC_ARG_WITH([system-mathic], - [AS_HELP_STRING([--with-system-mathic], - [use system mathic instead of building git submodule])],, - [with_system_mathic=no]) -if test $with_system_mathic = no -then - BUILD_mathic=yes - BUILTLIBS="-lmathic $BUILTLIBS" -else AC_LANG(C++) - AC_SEARCH_LIBS(MATHIC_VERSION_STRING,mathic,,BUILD_mathic=yes) - AC_CHECK_HEADER(mathic.h,,BUILD_mathic=yes) -fi - -AC_ARG_WITH([system-mathicgb], - [AS_HELP_STRING([--with-system-mathicgb], - [use system mathicgb instead of building git submodule])],, - [with_system_mathicgb=no]) -if test $with_system_mathicgb = no -then - BUILD_mathicgb=yes - BUILTLIBS="-lmathicgb $BUILTLIBS" -else AC_LANG(C++) - AC_SEARCH_LIBS(MATHICGB_VERSION_STRING,mathicgb,,BUILD_mathicgb=yes) - AC_CHECK_HEADER(mathicgb.h,,BUILD_mathicgb=yes) -fi - -if test $BUILD_gtest = no -then - CHECK_GTEST - if test $have_gtest = yes - then - CPPFLAGS="$GTEST_CPPFLAGS $CPPFLAGS" - GTEST_PATH=$GTEST_SOURCE - AC_MSG_NOTICE(we have found gtest) - else - BUILD_gtest=yes - GTEST_PATH="\$(BUILTLIBPATH)/include/gtest" - AC_MSG_NOTICE(we will build gtest) - fi -else - GTEST_PATH="\$(BUILTLIBPATH)/include/gtest" -fi -AC_SUBST(GTEST_PATH) - -AC_SUBST(PYTHON,no) -AC_ARG_WITH(python, AS_HELP_STRING(--with-python@<:@=3.x@:>@., - [link with libpython. If the version number is not specified, then the - system's default version will be detected.]), PYTHON=$withval) -if test $PYTHON != no -then AC_DEFINE(WITH_PYTHON,1,[whether we are linking with the python library]) - if test $PYTHON = yes - then - AC_CHECK_PROGS(PYTHON_BIN, python3, false) - else - AC_CHECK_PROGS(PYTHON_BIN, python$PYTHON, false) - PYTHON=yes - fi - if test $PYTHON_BIN = false - then - AC_MSG_ERROR([could not find python]) - else - PYTHON_VERSION=`$PYTHON_BIN -c \ - "from sys import version_info; \ - print('%d.%d' % (version_info.major, version_info.minor))"` - fi - PYTHON_INCLUDE_DIR=`$PYTHON_BIN -c \ - "from sysconfig import get_config_var; \ - print(get_config_var('CONFINCLUDEPY'))"` - CPPFLAGS="$CPPFLAGS -I$PYTHON_INCLUDE_DIR" - AC_CHECK_HEADER(Python.h,,AC_MSG_ERROR(Python.h not found)) - AC_SEARCH_LIBS(Py_Initialize, - python${PYTHON_VERSION} python${PYTHON_VERSION}m,, - AC_MSG_ERROR(libpython not found)) -fi - -dnl boost 1.65 was the first release containing the stacktrace library -AX_BOOST_BASE([1.65],, - [AC_MSG_ERROR([boost library >= 1.65 not installed, but required])]) -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - -AC_MSG_CHECKING([whether the Boost::Stacktrace library is available]) -AC_LANG(C++) -SAVECPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS -DBOOST_STACKTRACE_LINK" -SAVELIBS=$LIBS -FOUND_stacktrace_library=no -for stacktrace_library in backtrace addr2line -do - LIBS="$SAVELIBS -lboost_stacktrace_${stacktrace_library}" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([#include - ], [boost::stacktrace::stacktrace();])], - [AC_MSG_RESULT([yes, boost_stacktrace_${stacktrace_library}]) - FOUND_stacktrace_library=yes - break],) -done -if test $FOUND_stacktrace_library = no -then - AC_MSG_RESULT([no, will use header-only library]) - CPPFLAGS=$SAVECPPFLAGS - LIBS=$SAVELIBS -fi - -AX_BOOST_REGEX -LIBS="$LIBS $BOOST_REGEX_LIB" - -AC_CHECK_HEADERS([boost/math/special_functions.hpp], [], - [AC_MSG_ERROR([Boost Math Toolkit not available])]) -AC_SEARCH_LIBS([ldexpq], [quadmath]) - -AC_SUBST(ULIMIT_T,yes) -AC_SUBST(ULIMIT_M,yes) -AC_SUBST(ULIMIT_V,yes) -AC_SUBST(ULIMIT_S,yes) -( ulimit -t 2000 2>/dev/null) || ULIMIT_T=no -( ulimit -m 2000 2>/dev/null) || ULIMIT_M=no -( ulimit -v 2000 2>/dev/null) || ULIMIT_V=no -( ulimit -s 2000 2>/dev/null) || ULIMIT_S=no - -if test $BUILD_atomic_ops = no -then AC_MSG_CHECKING(whether package atomic_ops is provided) - if [ pkg-config --exists atomic_ops ] - then AC_MSG_RESULT(yes) - CPPFLAGS="`pkg-config --cflags-only-I atomic_ops | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - else AC_MSG_RESULT([no, will be built from downloaded sources]) - BUILD_atomic_ops=yes - fi -fi - -# test for fflas_ffpack -if test $BUILD_fflas_ffpack = no -then AC_MSG_CHECKING([for fflas_ffpack library, version at least 2]) - if command -v fflas-ffpack-config && test "`fflas-ffpack-config --decimal-version`" -gt 20000 - then AC_MSG_RESULT(found) - FFLAS_FFPACK_CXXFLAGS=$(for x in $(fflas-ffpack-config --cflags 2>&1) ; do case $x in (-I*) /bin/echo -n "$x " ;; esac done) - AC_MSG_NOTICE([adding fflas_ffpack flags $FFLAS_FFPACK_CXXFLAGS]) - M2_CXXFLAGS="$M2_CXXFLAGS $FFLAS_FFPACK_CXXFLAGS" - LIBS="$LIBS `fflas-ffpack-config --libs`" dnl note: this might add "-Xpreprocessor -fopenmp" to LIBS, and that will confuse libtool - LIBS=`echo $LIBS | sed 's/-Xpreprocessor -fopenmp//'` - else AC_MSG_RESULT(not found, will build) - BUILD_fflas_ffpack=yes - fi -fi - -AC_SUBST(ENABLE_LINBOX,no) -AC_ARG_ENABLE(linbox, - [AS_HELP_STRING(--enable-linbox,enable building the linbox library and linking with it)], - AC_DEFINE(HAVE_LINBOX,1,[whether we are linking with the linbox library]) - BUILD_linbox=yes - ENABLE_LINBOX=yes - ) - -AC_SUBST(ENABLE_FPLLL,no) -AC_ARG_ENABLE(fplll, - [AS_HELP_STRING(--enable-fplll,[enable building the fplll library and linking with it])], - AC_DEFINE(HAVE_FPLLL,1,[whether we are linking with the fplll library]) - BUILD_fplll=yes - ENABLE_FPLLL=yes - ) - -test $BUILD_linbox = yes && BUILTLIBS="-llinbox $BUILTLIBS" -test $BUILD_fplll = yes && BUILTLIBS="-lfplll $BUILTLIBS" - -SINGULARLIBS="-lfactory " -if test $BUILD_factory = no -then - AC_MSG_CHECKING([whether factory library is installed]) - FACTORY_MINVERSION=4.2.0 - if $PKG_CONFIG --exists "factory >= $FACTORY_MINVERSION" - then - FACTORY_NAME=factory - AC_MSG_RESULT([yes ($FACTORY_NAME)]) - elif $PKG_CONFIG --exists "singular-factory >= $FACTORY_MINVERSION" - then - FACTORY_NAME=singular-factory - AC_MSG_RESULT([yes ($FACTORY_NAME)]) - elif $PKG_CONFIG --exists factory || $PKG_CONFIG --exists singular-factory - then - BUILD_factory=yes - FACVER=`pkg-config --modversion factory` - AC_MSG_RESULT([yes, version $FACVER is installed, but version $FACTORY_MINVERSION is required: will build]) - else - BUILD_factory=yes - AC_MSG_RESULT([no; will build]) - fi -fi -if test $BUILD_factory = no -then - LIBS="`$PKG_CONFIG --libs $FACTORY_NAME` $LIBS" - CPPFLAGS="`$PKG_CONFIG --cflags $FACTORY_NAME` $CPPFLAGS" -else - BUILTLIBS="$SINGULARLIBS $BUILTLIBS" -fi - -AC_ARG_VAR([GFTABLESDIR], - [path to gftables directory if factory is already installed]) -if test $BUILD_factory = yes -then - BUILD_gftables=yes - GFTABLESDIR="${datadir}/Macaulay2/Core/factory/" -else - BUILD_gftables=no - if test x$GFTABLESDIR = x - then - if test $FACTORY_NAME = factory - then - GFTABLESDIR="`$PKG_CONFIG --variable=prefix $FACTORY_NAME`/share/factory/" - else - GFTABLESDIR="`$PKG_CONFIG --variable=prefix $FACTORY_NAME`/share/singular/factory/" - fi - fi - adl_RECURSIVE_EVAL([$GFTABLESDIR], [GFTABLESDIR]) - AC_CHECK_FILE([${GFTABLESDIR}gftables/961],, - [AC_MSG_ERROR([could not find gftables but we are not building factory; try specifying the directory with GFTABLESDIR])]) - FILE_PREREQS="$FILE_PREREQS ${GFTABLESDIR}gftables/961" -fi - -if test $BUILD_factory = no -then - AC_MSG_CHECKING([whether factory was built with --enable-streamio]) - AC_LANG([C++]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [ - #include - #include - ], - [Variable x; x = Variable(); std::cout << x])], - [AC_MSG_RESULT([yes]) - AC_DEFINE([FACTORY_STREAMIO], [1]) - ], - [AC_MSG_RESULT([no]) - AC_DEFINE([FACTORY_STREAMIO], [0])]) -else AC_DEFINE([FACTORY_STREAMIO], [1], [whether factory was built with --enable-streamio]) -fi - -AC_SUBST(LINALGLIBS) - -# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds -# one of them to $LIBS, making it impossible to check for the presence of C or -# C++ libraries. (I'm not sure why putting -llapack on the gcc command line -# needlessly causes the library to be linked against.) -FORTRANUSED=no -if test $BUILD_lapack = yes -then if test $USE_FCLIBS != no - then LIBS="$FCLIBS $LIBS" - fi -else lapack_found=no - blas_found=no - AC_MSG_CHECKING([whether the Accelerate framework for lapack is available]) - LINALGLIBS="-framework Accelerate" - SAVELIBS=$LIBS LIBS="$LINALGLIBS $LIBS" - AC_LANG(C) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])], - [USE_FCLIBS=no; blas_found=yes; lapack_found=yes; AC_MSG_RESULT(yes)], - [LINALGLIBS= LIBS=$SAVELIBS; AC_MSG_RESULT(no)]) - if test $blas_found = no - then AC_MSG_CHECKING([whether package blas is provided (by pkg-config)]) - if pkg-config --exists blas - then AC_MSG_RESULT(yes) - blas_found=yes - BLASLIBS=`pkg-config --libs blas` - LIBS="$BLASLIBS $LIBS" - CPPFLAGS="`pkg-config --cflags-only-I blas | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - AC_SEARCH_LIBS(sgemv_,,,AC_MSG_ERROR(blas function sgemv_ not found with $BLASLIBS)) - else AC_MSG_RESULT(no) - fi - fi - if test $lapack_found = no - then AC_MSG_CHECKING([whether package lapack is provided (by pkg-config)]) - if pkg-config --exists lapack - then AC_MSG_RESULT(yes) - lapack_found=yes - LAPACKLIBS="`pkg-config --libs lapack`" - LIBS="$LAPACKLIBS $LIBS" - CPPFLAGS="`pkg-config --cflags-only-I lapack | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - AC_SEARCH_LIBS(dgetrf_,,,AC_MSG_ERROR(lapack function dgetrf_ not found with $LAPACKLIBS)) - else AC_MSG_RESULT(no) - fi - fi - if test $USE_FCLIBS != no - then LIBS="$FCLIBS $LIBS"; added_fclibs=yes - fi - if test $blas_found = no - then AC_SEARCH_LIBS(sgemv_,refblas blas f77blas atlcblas, - blas_found=yes - if test "none required" != "$ac_cv_search_sgemv_" - then BLASLIBS=$ac_cv_search_sgemv_ - fi - ) - # we've been told that both f77blas and atlcblas are needed. If so, fix this somehow. - fi - if test $lapack_found = no - then AC_SEARCH_LIBS(dgetrf_,lapack atllapack, - lapack_found=yes - if test "none required" != "$ac_cv_search_dgetrf_" - then LAPACKLIBS=$ac_cv_search_dgetrf_ - fi - ) - fi - if test $blas_found = no -o $lapack_found = no - then BUILD_lapack=yes - LINALGLIBS="$LINALGLIBS -llapack -lrefblas" - else LINALGLIBS="$LINALGLIBS $LAPACKLIBS $BLASLIBS" - fi -fi - -if test $BUILD_lapack = yes -then if test $added_fclibs != yes - then LIBS="$FCLIBS $LIBS" - fi - LINALGLIBS="$LINALGLIBS -llapack -lrefblas" - dnl we'll need the fortran compiler to be present to compile lapack - FORTRANUSED=yes - if test "$FC" = "" - then AC_MSG_ERROR([no fortran compiler found (FC not set)]) - else AC_MSG_NOTICE(using fortran compiler $FC) - fi -fi - -dnl This code doesn't seem to be needed, and it wasn't ever working, anyway: -dnl if test $BUILD_lapack = yes -dnl then # test whether the fortran compiler can handle lapack, which, starting with -dnl # version 3.2, requires fortran 90, not fortran 77 -dnl AC_LANG(Fortran) -dnl AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack]) -dnl AC_COMPILE_IFELSE([intrinsic maxloc], dnl this is said to be a Fortran 90 feature -dnl AC_MSG_RESULT(yes), -dnl AC_MSG_RESULT(no)) -dnl fi - -test "$USE_FCLIBS" = no && FCLIBS= -test "$FORTRANUSED" = no && FCLIBS= - -AC_LANG(C) - -dnl The installation of libxml2 under Mac OS X is problematic: -dnl (1) Starting with Mac OS X 10.15, /usr/include is not present. The compilers look in -dnl /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include instead. It's a good idea -dnl not to depend on that. -dnl (2) The libraries own include files have lines like this: -dnl #include -dnl but the files is found at this path -dnl /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2/libxml/xmlexports.h -dnl Combine (1) and (2) and we conclude that somehow we have to get this option on the compiler command line: -dnl -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2 -dnl Ubuntu doesn't have this problem, because the configuration is done correctly: -dnl $ pkg-config --cflags libxml-2.0 -dnl -I/usr/include/libxml2 -dnl , and we can just use that. Homebrew tries to emulate that by providing pkg-config files that provide the -dnl same value, but as we said above, /usr/include is not present, so that doesn't work! -dnl -dnl The solution seems to be to use the C preprocessor to obtain the path to the file libxml include files, and -dnl to use that to automatically add the correct option to CPPFLAGS. This assumes the system allows -dnl #include -dnl to work, but not -dnl #include -dnl , so we test those two lines early. -dnl -if pkg-config --exists libxml-2.0 -then XML_INCLUDE=`pkg-config --cflags-only-I libxml-2.0 | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` - if test "$XML_INCLUDE" - then AC_MSG_NOTICE([pkg-config: will search for include files also in $XML_INCLUDE]) - CPPFLAGS="$XML_INCLUDE $CPPFLAGS" - fi -fi - -AC_CHECK_HEADER(libxml/xmlexports.h,, - dnl if it's not found, it might be here: - AC_CHECK_HEADERS(libxml2/libxml/xmlexports.h) - AC_LANG(C) - AC_PREPROC_IFELSE( - [AC_LANG_SOURCE([[ - #include - ]])], - [ LIBXML_LOCATION=` grep libxml2/libxml/xmlexports.h conftest.i | sed 's=.* "\(.*\)/libxml/xmlexports.h.*=\1=' ` - if test -z "$LIBXML_LOCATION" - then AC_MSG_WARN([failed to extract path to libxml from preprocessor output:]) - dnl perhaps this happens when libxml2 is a symbolic link and the preprocessor unpacks it - sed 's/^/| /' &1 | grep demangle >/dev/null - then NM_DEMANGLES=yes; AC_MSG_RESULT(yes) - else NM_DEMANGLES=no ; AC_MSG_RESULT(no) -fi - -AC_LANG(C) -AC_MSG_CHECKING([whether getaddrinfo can handle numeric service (port) numbers]) -AC_RUN_IFELSE([AC_LANG_SOURCE([ - #include - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_WINSOCK2_H - #include - #endif - #ifdef HAVE_NETDB_H - #include - #endif - int main(void) { - struct addrinfo *addr; - return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ; - } - ])], - [AC_DEFINE_UNQUOTED(GETADDRINFO_WORKS,1,[whether getaddrinfo can handle numeric service (port) numbers])] [AC_MSG_RESULT(yes)], - [if test $? = 99 ; then AC_MSG_RESULT(no) ; else AC_MSG_ERROR([test file failed to compile]) ; fi], - [AC_DEFINE_UNQUOTED(GETADDRINFO_WORKS,1,[whether getaddrinfo can handle numeric service (port) numbers])] [AC_MSG_RESULT([probably (cross-compiling, not tested)])]) - -AC_SUBST(BUILDLIST) -for i in $LIBLIST $PROGLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDLIST="$BUILDLIST $i" -done - -AC_SUBST(BUILDLIBLIST) -for i in $LIBLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDLIBLIST="$BUILDLIBLIST $i" -done - -AC_SUBST(BUILDSUBLIST) -for i in $SUBLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDSUBLIST="$BUILDSUBLIST $i" -done - -AC_SUBST(BUILDPROGLIST) -for i in $PROGLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDPROGLIST="$BUILDPROGLIST $i" -done - -TESTFLAG=-Wframe-address -AC_MSG_CHECKING(whether $CC accepts $TESTFLAG) -AC_SUBST(HAVE_WFRAME_ADDRESS) -SAVE=$CFLAGS -CFLAGS="-Werror $TESTFLAG $CFLAGS" -AC_LANG(C) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], M2_CFLAGS="$M2_CFLAGS $TESTFLAG" HAVE_WFRAME_ADDRESS=yes, HAVE_WFRAME_ADDRESS=no) -CFLAGS=$SAVE -AC_MSG_RESULT($HAVE_WFRAME_ADDRESS) - -TESTFLAG=-Wstrict-aliasing -AC_MSG_CHECKING(whether $CC accepts $TESTFLAG) -AC_SUBST(HAVE_WSTRICT_ALIASING) -SAVE=$CFLAGS -CFLAGS="$TESTFLAG -Werror $CFLAGS" -AC_LANG(C) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], M2_CFLAGS="$M2_CFLAGS $TESTFLAG" HAVE_WSTRICT_ALIASING=yes, HAVE_WSTRICT_ALIASING=no) -CFLAGS=$SAVE -AC_MSG_RESULT($HAVE_WSTRICT_ALIASING) - -TESTFLAG=-Wincompatible-pointer-types-discards-qualifiers -AC_MSG_CHECKING(whether $CC accepts $TESTFLAG) -AC_SUBST(HAVE_WDISCARDS_QUALIFIERS) -SAVE=$CFLAGS -CFLAGS="$TESTFLAG -Werror $CFLAGS" -AC_LANG(C) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], M2_CFLAGS="$M2_CFLAGS $TESTFLAG" HAVE_WDISCARDS_QUALIFIERS=yes, HAVE_WDISCARDS_QUALIFIERS=no) -CFLAGS=$SAVE -AC_MSG_RESULT($HAVE_WDISCARDS_QUALIFIERS) - -AC_MSG_CHECKING(whether $CC accepts -Wfatal-errors) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wfatal-errors -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - M2_CFLAGS="$M2_CFLAGS -Wfatal-errors" - AC_MSG_RESULT(yes, adding -Wfatal-errors to flags), - AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -dnl Always check for the option that turns the warning on, because gcc doesn't complain -dnl about invalid options that turn off warnings, if there are no warnings to be issued anyway. -dnl It's a feature, not a bug! -dnl On the other hand, clang does complain! - -AC_MSG_CHECKING(whether $CXX accepts -Wmismatched-tags) -AC_LANG(C++) -SAVE=$CXXFLAGS -CXXFLAGS="$CXXFLAGS -Wmismatched-tags -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - CXXFLAGS=$SAVE - CXXFLAGS="$CXXFLAGS -Wno-mismatched-tags" - dnl We don't like seeing this warning, especially from the "clang++" compiler, because - dnl we like using "struct" and "class" interchangeably. - AC_MSG_RESULT([[yes, adding -Wno-mismatched-tags to flags]]), - CXXFLAGS=$SAVE - AC_MSG_RESULT(no)) - -dnl we should make a macro for this test -AC_MSG_CHECKING(whether $CC accepts -Wunused-but-set-variable) -AC_SUBST(HAVE_WUNUSED_BUT_SET_VARIABLE) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WUNUSED_BUT_SET_VARIABLE=yes; AC_MSG_RESULT(yes), - HAVE_WUNUSED_BUT_SET_VARIABLE=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING(whether $CC accepts -Wsometimes-uninitialized) -AC_SUBST(HAVE_WSOMETIMES_UNINITIALIZED) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wsometimes-uninitialized -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WSOMETIMES_UNINITIALIZED=yes; AC_MSG_RESULT(yes), - HAVE_WSOMETIMES_UNINITIALIZED=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING(whether $CC accepts -Wmaybe-uninitialized) -AC_SUBST(HAVE_WMAYBE_UNINITIALIZED) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wmaybe-uninitialized -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WMAYBE_UNINITIALIZED=yes; AC_MSG_RESULT(yes), - HAVE_WMAYBE_UNINITIALIZED=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING(whether $CC accepts -Wparentheses-equality) -AC_SUBST(HAVE_WPARENTHESES_EQUALITY) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wparentheses-equality -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WPARENTHESES_EQUALITY=yes; AC_MSG_RESULT(yes), - HAVE_WPARENTHESES_EQUALITY=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING([whether $CC accepts -Wl,-z,noexecstack]) -AC_SUBST(HAVE_WL_X_NOEXECSTACK) -AC_LANG(C) -SAVE=$LDFLAGS -LDFLAGS="$LDFLAGS -Wl,-z,noexecstack -Werror" -AC_LINK_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WL_X_NOEXECSTACK=yes; AC_MSG_RESULT(yes), - HAVE_WL_X_NOEXECSTACK=no ; AC_MSG_RESULT(no)) -LDFLAGS=$SAVE - -AC_MSG_CHECKING([whether $CC accepts -Wl,--enable-auto-import]) -AC_SUBST(HAVE_WL_ENABLE_AUTO_IMPORT) -AC_LANG(C) -SAVE=$LDFLAGS -LDFLAGS="$LDFLAGS -Wl,--enable-auto-import -Werror" -AC_LINK_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WL_ENABLE_AUTO_IMPORT=yes; AC_MSG_RESULT(yes), - HAVE_WL_ENABLE_AUTO_IMPORT=no ; AC_MSG_RESULT(no)) -LDFLAGS=$SAVE - -AC_MSG_CHECKING([whether $CC accepts -Wl,-Map,conftest.mapfile]) -AC_SUBST(HAVE_WL_MAP) -AC_LANG(C) -SAVE=$LDFLAGS -LDFLAGS="$LDFLAGS -Wl,-Map,conftest.mapfile -Werror" -AC_LINK_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WL_MAP=yes; AC_MSG_RESULT(yes), - HAVE_WL_MAP=no ; AC_MSG_RESULT(no)) -rm -f conftest.mapfile -LDFLAGS=$SAVE - -AC_SUBST(DUMPDATAFILE,Macaulay2-$ARCH-data) - -test "$MEMDEBUG" = yes && M2_CPPFLAGS="$M2_CPPFLAGS -DMEMDEBUG" - -if test "$OS" = MacOS -then - # we don't know what this does, but some apple documentation writers seem to like it: - LDFLAGS="$LDFLAGS -bind_at_load" - - # this one makes it find and use our readline.a first, even if there is a file readline.dylib in /usr/lib - # the point is that the system's readline.dylib might be much older and conflict with our newer one - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" -fi - -AC_SUBST(package,Macaulay2-$PACKAGE_VERSION) - -# The suffix "-binary" distinguishes the binary program M2-binary from the shell script M2. -# The purpose of the shell script M2 is to set LD_LIBRARY_PATH appropriately. -AC_SUBST(EXE,-binary$M2SUFFIX$EXEEXT) - -AC_SUBST(DESC,$PACKAGE_VERSION-$host_cpu-$OS-$REL) -# we used to use @ ARCH @ instead of @ host_cpu @ here, but for DEC alphas, -# and perhaps other machines, it gives more information. The script -# config.guess assembles host_cpu from /proc/cpuinfo, and can be something -# like "alphaev6" or "alphaev56", but ARCH, which is determined from 'uname' -# by the 'configure' script, will be simply "alpha". - -AC_MSG_NOTICE([using BUILDLIBLIST = $BUILDLIBLIST]) -AC_MSG_NOTICE([using BUILDSUBLIST = $BUILDSUBLIST]) -AC_MSG_NOTICE([using BUILDPROGLIST = $BUILDPROGLIST]) -AC_MSG_NOTICE([using BUILDLIST = $BUILDLIST]) -AC_MSG_NOTICE([using BUILD_ALWAYS = $BUILD_ALWAYS]) -AC_MSG_NOTICE([using FILE_PREREQS = $FILE_PREREQS]) -AC_MSG_NOTICE([link using:]) -dnl the order of this list should agree with that in Macaulay2/bin/Makefile.in -AC_MSG_NOTICE([ BUILTLIBS = $BUILTLIBS]) -AC_MSG_NOTICE([ LINALGLIBS = $LINALGLIBS]) -AC_MSG_NOTICE([ LIBS = $LIBS]) -AC_MSG_NOTICE([ FCLIBS = $FCLIBS]) -AC_MSG_NOTICE([using CC = $CC]) -AC_MSG_NOTICE([using CPP = $CPP]) -AC_MSG_NOTICE([using CPPFLAGS = $CPPFLAGS]) -AC_MSG_NOTICE([using CFLAGS = $CFLAGS]) -AC_MSG_NOTICE([using CXX = $CXX]) -AC_MSG_NOTICE([using CXXFLAGS = $CXXFLAGS]) -AC_MSG_NOTICE([using FC = $FC]) -AC_MSG_NOTICE([using AR = $AR]) -AC_MSG_NOTICE([using RANLIB = $RANLIB]) -AC_MSG_NOTICE([using LDFLAGS = $LDFLAGS]) -AC_MSG_NOTICE([using BLASLIBS = $BLASLIBS]) -AC_MSG_NOTICE([using LAPACKLIBS = $LAPACKLIBS]) -AC_MSG_NOTICE([using LIBS_GDBM = $LIBS_GDBM]) -AC_MSG_NOTICE([using LIBS_GLPK = $LIBS_GLPK]) -AC_MSG_NOTICE([using LIBS_GMP = $LIBS_GMP]) -AC_MSG_NOTICE([using CC_FOR_BUILD = $CC_FOR_BUILD]) -AC_MSG_NOTICE([with ISSUE = $ISSUE]) -AC_MSG_NOTICE([with NODENAME = $NODENAME]) -AC_MSG_NOTICE([with OS REL = $OS $REL]) -AC_MSG_NOTICE([with ARCH = $ARCH]) -AC_MSG_NOTICE([with OPTIMIZE = $OPTIMIZE]) -AC_MSG_NOTICE([with DEBUG = $DEBUG]) -AC_MSG_NOTICE([with GIT_DESCRIPTION = $GIT_DESCRIPTION]) -AC_MSG_NOTICE([with USING_MPIR = $USING_MPIR]) -AC_MSG_NOTICE([with DOCUMENTATION = $DOCUMENTATION]) - -subset() { - # whether the words of $1 are among the words of $2 - y=" $2 " - for i in $1 - do case "$y" in - *" $i "*) ;; - *) return 1 ;; - esac - done - return 0 -} - -complement() { - # the words of $1 not among the words of $2 - y=" $2 " - for i in $1 - do case "$y" in - *" $i "*) ;; - *) /bin/echo -n "$i " ;; - esac - done - echo -} - - -BUILDING=yes -AC_ARG_ENABLE(building, AS_HELP_STRING(--disable-building,disable automatic building of libraries), BUILDING=$enableval) -# This option looks useless, but it allows us to test the configure script. After we build the libraries, we -# run the configure script again, and it should detect the ones we've built. -subset "$BUILDLIBLIST" "$BUILD_ALWAYS" -sub=$? -if test "$BUILDING" = no -a $sub = 1 -then c=`complement "$BUILDLIBLIST" "$BUILD_ALWAYS"` - AC_MSG_ERROR([ *** - automatic building of libraries disabled, but some must be built: $c]) -fi - -# Here we insert autoconf's default values so we can compute the relative locations in the directory tree -test "$prefix" || prefix=/usr/local - -# for some distributions, we know what the prefix should be: -test "$DEB" = yes && test "$prefix" != /usr && - AC_MSG_ERROR(--enable-deb specified and --prefix not set to /usr) -test "$RPM" = yes && test "$prefix" != /usr && - AC_MSG_ERROR(--enable-rpm specified and --prefix not set to /usr) - -if test "$prefix" != /usr/local -then test "$FREEBSD" = yes && AC_MSG_ERROR(--enable-freebsd specified and --prefix not set to /usr/local) -fi - -# these are the variables that make their way into autoconf after version 2.59 -test "$datarootdir" || AC_SUBST(datarootdir,'${prefix}/share') -test "$docdir" || AC_SUBST(docdir,'${datarootdir}/doc/${PACKAGE_TARNAME}') -test "$dvidir" || AC_SUBST(dvidir,'${docdir}') -test "$htmldir" || AC_SUBST(htmldir,'${docdir}') -test "$pdfdir" || AC_SUBST(pdfdir,'${docdir}') -test "$psdir" || AC_SUBST(psdir,'${docdir}') -test "$localedir" || AC_SUBST(localedir,'${datarootdir}/locale') - -AC_ARG_WITH([emacsdir], - [AS_HELP_STRING([--with-emacsdir=...], - [set installation directory for installing Emacs Lisp files; - must begin with ${prefix} or ${exec_prefix}])], - [emacsdir=$withval], - [emacsdir=${datarootdir}/emacs/site-lisp/macaulay2]) -AC_SUBST(emacsdir) - -# Here we normalize all the configure variables so each one begins either with ${prefix} or with ${exec_prefix}, -# so they can be handled more simply in Macaulay2, by a single text replacement. -save_prefix=$prefix -save_exec_prefix=$exec_prefix -prefix=NONE -exec_prefix=NOWHERE -# Here we normalize almost everything. -# We put docdir and datarootdir at end, because we are changing the values of the variables, and -# other variables depend on them. -# We don't normalize sysconfdir, sharedstatedir, and localstatedir, because Fedora -# insists in /usr/share/config.site that they be /etc, /var, and /var, respectively. -# We don't use those directories, anyway. To ensure that, we set them to /nowhere. -# (We could avoid config.site with the CONFIG_SITE environment variable.) -sysconfdir=/nowhere -sharedstatedir=/nowhere -localstatedir=/nowhere -for i in bindir datadir includedir infodir libdir libexecdir mandir sbindir \ - psdir pdfdir dvidir htmldir localedir GFTABLESDIR docdir datarootdir \ - emacsdir -do eval w=\$$i ; eval v="$w" ; eval v="$v" ; eval v="$v" ; eval v="$v" ; eval v="$v" - case $v in - "$exec_prefix"|"$exec_prefix"/*) - eval tail_${i}=`echo $v | sed s,"^$exec_prefix/","",` - eval pre_${i}=`echo $v | sed s,"^$exec_prefix","'\\${pre_exec_prefix}'",` - eval ${i}=`echo $v | sed s,"^$exec_prefix","'\\${exec_prefix}'",` - ;; - "$prefix"|"$prefix"/*) - eval tail_${i}=`echo $v | sed s,"^$prefix/","",` - eval pre_${i}=`echo $v | sed s,"^$prefix","'\\${pre_prefix}'",` - eval ${i}=`echo $v | sed s,"^$prefix","'\\${prefix}'",` - ;; - *) if test $i != GFTABLESDIR #only needs normalized if we build factory - then AC_MSG_ERROR([expected "\${$i}" => "$w" to start with "\${prefix}" or with "\${exec_prefix}"]) - fi ;; - esac -done -prefix=$save_prefix -exec_prefix=$save_exec_prefix - -if test $BUILD_gftables = no -then PRE_GFTABLESDIR="$GFTABLESDIR" -else -PRE_GFTABLESDIR="$pre_datadir/Macaulay2/Core/factory/" -fi -AC_SUBST(PRE_GFTABLESDIR) - -AC_SUBST(pre_bindir) dnl In Macaulay2/bin/M2.in we assume that $pre_bindir/.. is $pre_exec_prefix, which follows from pre_bindir=${pre_exec_prefix}/bin. -AC_SUBST(pre_datadir) -AC_SUBST(pre_includedir) -AC_SUBST(pre_infodir) -AC_SUBST(pre_libdir) -AC_SUBST(pre_libexecdir) -AC_SUBST(pre_localstatedir) -AC_SUBST(pre_mandir) -AC_SUBST(pre_sbindir) -AC_SUBST(pre_sharedstatedir) -AC_SUBST(pre_sysconfdir) -AC_SUBST(pre_psdir) -AC_SUBST(pre_pdfdir) -AC_SUBST(pre_dvidir) -AC_SUBST(pre_htmldir) -AC_SUBST(pre_localedir) -AC_SUBST(pre_docdir) -AC_SUBST(pre_datarootdir) -AC_SUBST(pre_emacsdir) - -AC_SUBST(tail_bindir) -AC_SUBST(tail_datadir) -AC_SUBST(tail_includedir) -AC_SUBST(tail_infodir) -AC_SUBST(tail_libdir) -AC_SUBST(tail_libexecdir) -AC_SUBST(tail_localstatedir) -AC_SUBST(tail_mandir) -AC_SUBST(tail_sbindir) -AC_SUBST(tail_sharedstatedir) -AC_SUBST(tail_sysconfdir) -AC_SUBST(tail_psdir) -AC_SUBST(tail_pdfdir) -AC_SUBST(tail_dvidir) -AC_SUBST(tail_htmldir) -AC_SUBST(tail_localedir) -AC_SUBST(tail_docdir) -AC_SUBST(tail_datarootdir) -AC_SUBST(tail_emacsdir) - -AC_SUBST(MACHINE,"$ARCH-$OS-$ISSUE") -AC_DEFINE_UNQUOTED(MACHINE,"$MACHINE",[complete machine description (to appear in name of tar file)]) - -AC_SUBST(COMMONSTAGINGAREA,usr-dist) # staging area for common files -AC_SUBST(LOCALSTAGINGAREA,usr-dist) # staging area for arch. dep. files -AC_ARG_WITH(staging-area, - AS_HELP_STRING(--with-staging-area=...,directory for pre-installation of architecture-independent files (usr-dist)), - COMMONSTAGINGAREA=$withval) -AC_ARG_ENABLE(common-staging-area, - AS_HELP_STRING(--enable-common-staging-area,use the common staging area), - if test "$enableval" = yes - then if test "$COMMONSTAGINGAREA" != usr-dist - then AC_MSG_ERROR(--with-staging-area and --enable-common-staging-area options both provided) - fi - COMMONSTAGINGAREA=\${abs_top_srcdir}/BUILD/CommonStagingArea # this depends on config.Makefile.in setting abs_top_srcdir - fi - ) -[ -case `pwd` in - .) ;; - *) - case "$COMMONSTAGINGAREA" in - [\\/]* | ?:[\\/]* | '${abs'* );; - .) COMMONSTAGINGAREA=`pwd`;; - *) COMMONSTAGINGAREA=`pwd`/"$COMMONSTAGINGAREA";; - esac - case "$LOCALSTAGINGAREA" in - [\\/]* | ?:[\\/]* | '${abs'* );; - .) LOCALSTAGINGAREA=`pwd`;; - *) LOCALSTAGINGAREA=`pwd`/"$LOCALSTAGINGAREA";; - esac;; -esac -] -AC_SUBST(pre_prefix,$COMMONSTAGINGAREA/common) # as in layout.m2.in -AC_SUBST(pre_exec_prefix,$LOCALSTAGINGAREA/$MACHINE) # as in layout.m2.in -AC_MSG_NOTICE([staging area for common files: $pre_prefix]) -AC_MSG_NOTICE([staging area for architecture dependent files: $pre_exec_prefix]) - -# Here we define the Macaulay2 layout, once and for all. -# There is a hidden dependency: see M2/distributions/dmg/Makefile.in and adjust the number "../"s if the basic layout here is changed. - -AC_SUBST(packagesdir,$datadir/Macaulay2) -AC_SUBST(libm2dir,$libdir/Macaulay2) -AC_SUBST(librariesdir,$libm2dir/lib) -AC_SUBST(programsdir,$libexecdir/Macaulay2/bin) -AC_SUBST(licensesdir,$libexecdir/Macaulay2/program-licenses) -AC_SUBST(packagecachecoredir,$libm2dir/cache) - -AC_SUBST(tail_packagesdir,$tail_datadir/Macaulay2) -AC_SUBST(tail_libm2dir,$tail_libdir/Macaulay2) -AC_SUBST(tail_librariesdir,$tail_libm2dir/lib) -AC_SUBST(tail_programsdir,$tail_libexecdir/Macaulay2/bin) -AC_SUBST(tail_licensesdir,$tail_libexecdir/Macaulay2/program-licenses) -AC_SUBST(tail_packagecachecoredir,$tail_libm2dir/cache) - -AC_SUBST(pre_packagesdir,$pre_datadir/Macaulay2) -AC_SUBST(pre_libm2dir,$pre_libdir/Macaulay2) -AC_SUBST(pre_librariesdir,$pre_libm2dir/lib) -AC_SUBST(pre_programsdir,$pre_libexecdir/Macaulay2/bin) -AC_SUBST(pre_licensesdir,$pre_libexecdir/Macaulay2/program-licenses) -AC_SUBST(pre_packagecachecoredir,$pre_libm2dir/cache) - -AC_OUTPUT - -dnl Local Variables: -dnl mode: autoconf -dnl compile-command: "make -f Makefile " -dnl End: diff -Nru macaulay2-1.22~rc1+ds/.pc/.quilt_patches macaulay2-1.22+ds/.pc/.quilt_patches --- macaulay2-1.22~rc1+ds/.pc/.quilt_patches 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/.quilt_patches 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -/home/buildd/build-RECIPEBRANCHBUILD-3550873/chroot-autobuild/home/buildd/work/tree/recipe/debian/patches diff -Nru macaulay2-1.22~rc1+ds/.pc/.quilt_series macaulay2-1.22+ds/.pc/.quilt_series --- macaulay2-1.22~rc1+ds/.pc/.quilt_series 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/.quilt_series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -/home/buildd/build-RECIPEBRANCHBUILD-3550873/chroot-autobuild/home/buildd/work/tree/recipe/debian/patches/series diff -Nru macaulay2-1.22~rc1+ds/.pc/release-candidate.patch/M2/VERSION macaulay2-1.22+ds/.pc/release-candidate.patch/M2/VERSION --- macaulay2-1.22~rc1+ds/.pc/release-candidate.patch/M2/VERSION 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/release-candidate.patch/M2/VERSION 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -1.21 diff -Nru macaulay2-1.22~rc1+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/d/Makefile.in macaulay2-1.22+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/d/Makefile.in --- macaulay2-1.22~rc1+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/d/Makefile.in 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/d/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,256 +0,0 @@ -# @configure_input@ - -# user variables - -MORE_SCCFLAGS := -SCCFLAGS += $(MORE_SCCFLAGS) - -# get rid of some unused implicit rules to make debugging simpler -%:%,v -%:RCS/%,v -%:RCS/% -%:s.% -%:SCCS/s.% -%:%.o -%:%.p -%:%.S -%:%.web -%:%.c -%:%.cc -%:%.C -%:%.cpp -%:%.f -%:%.F -%:%.mod -%:%.r -%:%.s -%:%.sh -%:RCS/%,v -%:RCS/% -%.c:%.y -%.c:%.l -%.c:%.w - -include ../../include/config.Makefile -include ./Makefile.files -VPATH = @srcdir@ -# these can be overridden on the command line -DEPENDS = yes -############################## main targets -echo = $(shell echo "echo: $1" >&2) $1 - -ifneq (@ETAGS@,false) -all: tags -endif -all: .gdbinit -.gdbinit:; if [ -f @srcdir@/.gdbinit.$(USER) ]; then cp @srcdir@/.gdbinit.$(USER) $@; fi - -choice2 = all: $(patsubst %.d,%$(1),$(patsubst %.dd,%$(2),$(3))) -choice1 = all: $(patsubst %.d,%$(1),$(patsubst %.dd,%$(1),$(2))) - -$(foreach d,$(M2_DFILES), \ - $(eval $(call choice2,-tmp.c,-tmp.cc,$d)) \ - $(eval $(call choice1,-exports.h.tmp,$d)) \ - $(eval $(call choice1,.sig.tmp,$d)) \ - $(eval $(call choice1,.sig,$d)) \ - $(eval $(call choice1,.dep,$d)) \ - $(eval $(call choice1,.o,$d)) \ - ) -all: $(M2_OBJECTS) - - -# eventually, libd.a will allow stand-alone *.d programs to use just what they want to from the code in this directory: -# all: libd.a -# LIBFILES := $(patsubst M2mem.o,,$(patsubst scclib.o,,$(M2_OBJECTS))) $(patsubst %, %.o, $(M2_DNAMES)) -LIBFILES := - -# to get getmem -LIBFILES += M2mem.o -# to get trapchk() -LIBFILES += debug.o -LIBFILES += gmp_aux.o arithmetic.o atomic.o M2.o system.o strings.o varstrin.o errio.o vararray.o ctype.o nets.o varnets.o interrupts.o pthread0.o stdio.o stdiop.o err.o gmp.o -libd.a: $(LIBFILES) ; ar -r $@ $? -rm-libd.a:; rm libd.a - -clean:: ; rm -f $(M2_MADECFILES) -xml-c.o: xml-c.h xml-exports.h -M2lib.o basic.o equality.o actors4.o actors5.o interface.o interface2.o engine.o : CPPFLAGS += -I@srcdir@/../e - -pthread-tmp.c : SCCFLAGS += -noline - -version.o : ../../include/M2/config.h distributed-packages.h -distributed-packages.h: @srcdir@/../packages/?distributed-packages Makefile - echo '#define DISTRIBUTED_PACKAGES "'`cat $<`'"' >$@ -clean::; rm -f distributed-packages.h - -# these files depend on WITH_MYSQL, which is in config.h: -actors4.o actors2.o : ../../include/M2/config.h - -ifeq "$(DEPENDS)" "yes" -# We include all the files twice, once in reverse order. Example: "include a b c d d c b a" -# The reason for this is that some versions of gnu make build the needed files in reverse order, and some build in forward order. -# (Compare version 4.3 to version 4.4) -include $(patsubst %.d, %.dep, $(patsubst %.dd, %.dep, $(M2_DFILES) $(shell ../util/echoout -r $(M2_DFILES)))) -endif - -.SUFFIXES: .d .sig .dep .res .test .m2 -.PHONY : clean all check tags - -ifeq "@HAVE_WPARENTHESES_EQUALITY@" "yes" -DCFLAGS += -Wno-parentheses-equality -DCXXFLAGS += -Wno-parentheses-equality -endif - -ifeq "@DEVELOPMENT@" "yes" -# -- development -- -CFLAGS += -Werror -CXXFLAGS += -Werror -ifeq "@HAVE_WDISCARDS_QUALIFIERS@" "yes" -CFLAGS += -Wincompatible-pointer-types-discards-qualifiers -CXXFLAGS += -Wincompatible-pointer-types-discards-qualifiers -endif -ifeq "@HAVE_WSOMETIMES_UNINITIALIZED@" "yes" -DCFLAGS += -Wsometimes-uninitialized -DCXXFLAGS += -Wsometimes-uninitialized -endif -# -- development end -- -else -# -- non-development -- -ifeq "@HAVE_WSOMETIMES_UNINITIALIZED@" "yes" -DCFLAGS += -Wno-sometimes-uninitialized -DCXXFLAGS += -Wno-sometimes-uninitialized -endif -# -- non-development end -- -endif - -DCFLAGS += -Wno-unused-value -DCXXFLAGS += -Wno-unused-value - -# scc1 produces switch statements without default cases, because it knows what -# all the possibilities are, so the compiler may think some cases are not handled. Hence -# we may hush some warnings - -ifeq "@HAVE_WUNUSED_BUT_SET_VARIABLE@" "yes" -DCFLAGS += -Wno-unused-but-set-variable -DCXXFLAGS += -Wno-unused-but-set-variable -endif - -ifeq "@HAVE_WMAYBE_UNINITIALIZED@" "yes" -DCFLAGS += -Wno-maybe-uninitialized -DCXXFLAGS += -Wno-maybe-uninitialized -endif - -ifeq "@__INTEL_COMPILER@" "no" -CFLAGS += -Wno-unused -endif - -ifeq "@__INTEL_COMPILER@" "yes" -DCFLAGS += -diag-disable 111,411,177,593,1572 -ifeq "@DEBUG@" "yes" -CFLAGS += -diag-disable 1418 -endif -endif - -.SECONDARY: - -M2INCLUDES += -I. -M2INCLUDES += -I@srcdir@ -M2INCLUDES += -I@srcdir@/../e -M2INCLUDES += -I@srcdir@/../system -M2INCLUDES += -I@srcdir@/../../include - -# these are the files that need to find include files built in the current build directory -$(M2_LASTCFILES:.c=.o) : CPPFLAGS += -I. - -# to get scc-core.h: -M2INCLUDES += -I@srcdir@/../c - -# it's important that *our* directories get searched first: -CPPFLAGS := $(M2INCLUDES) $(CPPFLAGS) $(M2_CPPFLAGS) - -CPPFLAGS += -Wno-unknown-pragmas - -CFLAGS += $(M2_CFLAGS) -ifeq "@__INTEL_COMPILER@" "no" -CFLAGS += -Wno-unused-label -endif - -CXXFLAGS += $(M2_CXXFLAGS) - -CFLAGS += -Wreturn-type -CXXFLAGS += -Wreturn-type - -CFLAGS += -Wunused-function -CXXFLAGS += -Wunused-function - -CFLAGS += -Wfatal-errors -CXXFLAGS += -Wfatal-errors - -version.o : CPPFLAGS += -I@srcdir@/../e/memtailor -I@srcdir@/../e/mathic -I@srcdir@/../e/mathicgb -version.o : CXXFLAGS += -Wno-unused-local-typedefs - -# the following is included since g++-8 and gcc-8 give many warnings arising from "pragma omp" -# and apparently it can't be silenced in source code. -CXXFLAGS += -Wno-unknown-pragmas - -# This hushes warnings about "struct" and "class" both being used. -CXXFLAGS += -Wno-mismatched-tags - -python-c.o : | python-exports.h.tmp - -# see https://github.com/Macaulay2/M2/issues/430 -# adding this prevents an error when gcc 6 compiles stack_trace in M2lib.c -ifeq (@HAVE_WFRAME_ADDRESS@,yes) -M2lib.o : M2_CFLAGS += -Wno-frame-address -endif - -M2lib.o scclib.o : | interp-exports.h.tmp -scclib.o : expr-exports.h M2mem.h debug.h types.h ../c/compat.h ../e/engine.h -M2lib.o : types.h ../c/compat.c debug.h M2mem.h ../c/compat.h ../e/engine.h -M2lib.o scclib.o gdbm_interface.o gc_cpp.o debug.o : ../../include/M2/config.h -M2.o : ../../include/M2/config.h @srcdir@/../c/scc-core.h - -clean::; rm -f startup.c -SSTRING := -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' -BSTRING := -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/\(.*\)/"\1"/' -../m2/startup.m2: ../m2/startup.m2.in ; cd ../.. ; ./config.status Macaulay2/m2/startup.m2 -startup.c: startup-header.h ../m2/startup.m2 @srcdir@/../m2/basictests/*.m2 Makefile - : making $@ - @(\ - cat @srcdir@/startup-header.h; \ - echo 'cached_file startupFile = {' ; \ - echo @abs_top_srcdir@/Macaulay2/m2/startup.m2.in | sed $(BSTRING) ; \ - echo ',' ; \ - cat ../m2/startup.m2 | sed $(SSTRING) ; \ - echo '};' ; \ - echo 'cached_file testStrings[] = {' ; \ - for i in @abs_top_srcdir@/Macaulay2/m2/basictests/*.m2 ; \ - do echo '{' ; echo Macaulay2/Core/basictests/`basename $$i` | \ - sed $(BSTRING) ; echo ',' ; cat $$i | sed $(SSTRING) ; \ - echo '},' ; \ - done ; \ - echo '};' ; \ - cat @srcdir@/startup-trailer.h; \ - ) >$@ -clean:: ; rm -f startup.c -clean-startup.c:; rm -f startup.c -cat-startup.c:; cat startup.c -redo-startup:clean-startup.c startup.c cat-startup.c - -all: $(M2_LIBDEPS) -tags: @srcdir@/TAGS -@srcdir@/TAGS: $(M2_SRCFILES); cd @srcdir@ && @ETAGS@ $(M2_SRCFILES) -clean-bin:; rm -f *.o *-tmp.c *-tmp.cc *.sig.tmp *-exports.h.tmp -clean::; rm -f typecode.db *-exports.h *-exports.h.tmp *-tmp.c *-tmp.cc *.log a.out *.o *.sym *.out *.a *.oo *.sig *.sig.tmp *.sg *.dep *.dp *.dep.tmp core gmon.out mapfile restart.tmp TAGS -distclean: clean; rm -f Makefile ../m2/startup.m2 @srcdir@/TAGS -Makefile: Makefile.in; cd ../..; ./config.status Macaulay2/d/Makefile -Makefile.files: Makefile.files.in; cd ../..; ./config.status Macaulay2/d/Makefile.files -clean::; rm -f .gdbinit .gdb-directories - -# for experimenting with stand-alone programs -LOADLIBES = -lgc - -# Local Variables: -# compile-command: "make -C $M2BUILDDIR/Macaulay2/d MORE_SCCFLAGS= " -# End: -.NOTPARALLEL: diff -Nru macaulay2-1.22~rc1+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/m2/code.m2 macaulay2-1.22+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/m2/code.m2 --- macaulay2-1.22~rc1+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/m2/code.m2 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/reproducible-startup-m2.patch/M2/Macaulay2/m2/code.m2 1970-01-01 00:00:00.000000000 +0000 @@ -1,265 +0,0 @@ --- Copyright 1993-1999, 2008 by Daniel R. Grayson - --- TODO: needs "document.m2" for formatDocumentTag, but this causes a loop -needs "debugging.m2" -- for FilePosition -needs "gateway.m2" -needs "lists.m2" -needs "methods.m2" -needs "nets.m2" - ------------------------------------------------------------------------------ --- code ------------------------------------------------------------------------------ - -limit := 4 - -codeFunction := (f,depth) -> ( - if depth <= limit then ( - l := locate f; - if l === null then DIV{"function ", f, ": source code not available"} - else ( - syms := flatten \\ sortByHash \ values \ drop(localDictionaries f,-1); - DIV flatten { - code l, - if #syms > 0 then INDENT listSymbols syms, - if codeHelper#?(functionBody f) - then apply( - codeHelper#(functionBody f) f, - (comment,val) -> INDENT { - comment, BR{}, - if instance(val, Function) then codeFunction(val,depth+1) else hold val -- hold for OptionTable or Option - }) - } - ) - ) - ) - --- stores previously listed methods, hooks, or tests to be used by (code, ZZ) -previousMethodsFound = null - -code = method(Dispatch => Thing) -code Nothing := identity -code FilePosition := x -> ( - filename := x#0; start := x#1; stop := x#3; - if filename =!= "stdio" then ( - wp := set characters " \t\r);"; - file := ( - if match("startup.m2.in$", filename) then startupString - else if filename === "currentString" then currentString - else ( - if not fileExists filename then error ("couldn't find file ", filename); - get filename - ) - ); - file = lines file; - while ( - file#?stop - and ( -- can improve this - l := set characters file#stop; - l #? ")" and isSubset(l, wp) - ) - ) do stop = stop + 1; - if #file < stop then error("line number ",toString stop, " not found in file ", filename); - while stop >= start and file#(stop-1) === "" do stop = stop-1; - DIV { - x, ": --source code:", - PRE M2CODE concatenate between_"\n" toList apply(start-1 .. stop-1, i -> file#i) - } - )) -code Symbol := -code Pseudocode := s -> code locate s -code Sequence := s -> ( - key := select(s, x -> not instance(x, Option)); - -- handle strategies - func := if not #key === #s then ( - opts := new OptionTable from toList select(s, x -> instance(x, Option)); - if opts.?Strategy then ( - strategy := opts.Strategy; - store := getHookStore(key, false); - if store =!= null and store#?key - and store#key.HookAlgorithms#?strategy - then store#key.HookAlgorithms#strategy)); - if func =!= null or (func = lookup key) =!= null - then DIV {"-- code for method: " | formatDocumentTag key, code func } - else "-- no method function found: " | formatDocumentTag key) -code Function := f -> codeFunction(f, 0) -code Command := C -> code C#0 -code List := L -> DIV between_(HR{}) apply(L, code) -code ZZ := i -> code previousMethodsFound#i - ------------------------------------------------------------------------------ --- edit ------------------------------------------------------------------------------ --- TODO: update this - -editMethod = method(Dispatch => Thing) -editMethod String := filename -> ( - editor := getViewer("EDITOR", "emacs"); - chkrun concatenate( - if getenv "DISPLAY" != "" and editor != "emacs" then "xterm -e ", - editor, " ", filename)) -editMethod Nothing := arg -> (stderr << "--warning: source code not available" << endl;) -editMethod FilePosition := x -> ( - filename := x#0; start := x#1; - editor := getViewer("EDITOR", "emacs"); - if 0 != chkrun concatenate( - if getenv "DISPLAY" != "" and editor != "emacs" then "xterm -e ", - editor, - " +",toString start, - " ", - filename - ) then error "command returned error code") -editMethod Command := c -> editMethod c#0 -editMethod Function := args -> editMethod locate args -editMethod Sequence := args -> ( - if args === () then ( - editor := getViewer("EDITOR", "emacs"); - chkrun concatenate( - if getenv "DISPLAY" != "" and editor != "emacs" then "xterm -e ", - editor) - ) - else editMethod locate args - ) -editMethod ZZ := i -> editMethod previousMethodsFound#i -edit = Command editMethod - ------------------------------------------------------------------------------ --- methods ------------------------------------------------------------------------------ --- TODO: https://github.com/Macaulay2/M2/issues/1331 - -searchAllDictionaries := (T, f) -> ( - seen := new MutableHashTable; - scan(flatten \\ pairs \ dictionaryPath, (name, sym) -> ( - if instance(v := value sym, T) and not seen#?v then ( seen#v = true; f(v))))) - -isUnaryAssignmentOperator = key -> (instance(key, Sequence) and #key === 2 - and(false and isUnaryAssignmentOperator key#0 and instance(key#1, Type) or key#1 === symbol=)) -isBinaryAssignmentOperator = key -> (instance(key, Sequence) and #key === 3 - and isUnaryAssignmentOperator key#0 and instance(key#1, Type) and instance(key#2, Type)) - -thingMethods := (T, F) -> nonnull apply(pairs T, (key, func) -> if instance(func, Function) then - -- TODO: unary methods are installed as T#f, change it to T#(f, T), then simplify this - if key === F then (key, T) else -- unary method, e.g quotient - -- TODO: unary assignments operators are installed as T#(s, symbol=), change it to T#((s, symbol=), T), then simplify this - if isUnaryAssignmentOperator key and isMember(F, key) then (key, T) else -- unary assignment method, e.g symbol= - if instance(key, Sequence) and isMember(F, splice key) then key) - -sequenceMethods := (T, F, tallyF) -> nonnull apply(pairs T, (key, func) -> if instance(func, Function) then - if isBinaryAssignmentOperator key and tallyF <= tally splice key then key else -- e.g T#((symbol SPACE, symbol=), T, T) - if isUnaryAssignmentOperator key and tallyF <= tally splice (key, T) then (key, T) else -- e.g T#(symbol+, symbol=) - if instance(key, Keyword) and tallyF <= tally splice (key, T) then (key, T) else -- e.g T#(symbol #) - if instance(key, Function) and tallyF <= tally splice (key, T) then (key, T) else -- e.g T#resolution - if instance(key, Sequence) and tallyF <= tally key then key) - -methods = method(Dispatch => Thing, TypicalValue => NumberedVerticalList) -methods Manipulator := M -> methods class M -methods Command := c -> methods c#0 -methods Type := F -> methods sequence F -methods Sequence := F -> ( - found := new MutableHashTable; - tallyF := tally splice F; - searchAllDictionaries(Type, T -> scan(sequenceMethods(T, F, tallyF), key -> found#key = true)); - scan(select(F, e -> instance(e, Type)), T -> scan(sequenceMethods(T, F, tallyF), key -> found#key = true)); - previousMethodsFound = new NumberedVerticalList from sortByName keys found) - -methods ScriptedFunctor := -- TODO: OO and other scripted functors aren't supported -methods Symbol := -methods Thing := F -> ( - if F === HH then return join(methods homology, methods cohomology); - found := new MutableHashTable; - -- TODO: either finish or remove nullaryMethods - if nullaryMethods#?(1:F) then found#(1:F) = true; - searchAllDictionaries(Type, T -> scan(thingMethods(T, F), key -> found#key = true)); - previousMethodsFound = new NumberedVerticalList from sortByName keys found) - --- this one is here because it needs previousMethodsFound -options ZZ := i -> options previousMethodsFound#i -locate ZZ := i -> locate previousMethodsFound#i - ------------------------------------------------------------------------------ --- hooks ------------------------------------------------------------------------------ - -listHooks := (key, opts) -> ( - -- list global hooks - if key === () then return hooks(GlobalHookStore, opts); - if instance(key#0, MutableHashTable) - -- get the store from the first argument - then (store := key#0; key = if key#?1 then key#1 else null) - -- get the store from the key - else store = getHookStore(key, false); - new NumberedVerticalList from ( - alg := if opts.?Strategy then opts.Strategy; - type := class alg; - store = if store#?key then store#key; - -- if no hooks have been installed, return empty list - if store === null then {} else - -- if Strategy is not given, list all available hooks - if alg === null then apply(store.HookPriority, alg -> splice(key, Strategy => alg)) else - -- if Strategy is given, and it is among the known strategies, list only that hook - if store.HookAlgorithms#?alg then { splice(key, Strategy => alg) } else - -- otherwise, if the class of alg is a known strategy, list only that hook - if store.HookAlgorithms#?type then { splice(key, Strategy => type) } else {})) - -hooks = method(Dispatch => Thing, Options => {Strategy => null}) -hooks ZZ := opts -> i -> hooks previousMethodsFound#i -hooks List := opts -> L -> previousMethodsFound = join apply(toSequence L, key -> listHooks(key, opts)) -hooks Thing := opts -> key -> previousMethodsFound = hooks(methods key, opts) -hooks Symbol := opts -> sym -> previousMethodsFound = hooks(1:sym, opts) -hooks Sequence := opts -> key -> previousMethodsFound = listHooks(key, opts) -hooks HashTable := opts -> store -> previousMethodsFound = join( - if store.?cache then store = store.cache; - if store.?Hooks then store = store.Hooks; - apply(toSequence keys store, key -> listHooks((store, key), opts))) - ------------------------------------------------------------------------------ --- debugger ------------------------------------------------------------------------------ --- TODO: move to debugging? - -debuggerUsageMessage = ///--debugger activation depth control: - errorDepth=3 -- activate at positions in user code (default) - errorDepth=2 -- activate also at positions in packages - errorDepth=1 -- activate also at positions in Core - errorDepth=0 -- activate also at positions in the loader ---debugging control: - return -- bypass current expression, return null, stop - return x -- bypass current expression, return x, stop - step -- step 1 line - step n -- step n lines - step (-n) -- trace n microsteps - end (or eof char) -- enter debugger one level up - continue -- leave the debugger, continuing execution - -- with current expression - break -- leave the debugger, returning to top level ---debugging information: - listLocalSymbols -- display local symbols and their values - listUserSymbols -- display user symbols and their values - current -- the current expression; initially, the one - -- that produced an error - code current -- source code of current expression - value current -- execute current expression, obtain value - disassemble current -- display microcode of current expression - currentString -- the string being evaluated by 'value', if - -- an error occurred within it --- emacs commands in *M2* buffer: - RET -- on an file/position line, go to source/// - -inDebugger = false -addStartFunction(() -> inDebugger = false) --- This is called from interp.dd -debuggerHook = entering -> ( - if entering then ( - pushvar(symbol inDebugger, true); - c := code current; - if c =!= null then print c; - ) - else ( - popvar symbol inDebugger; - ) - ) - --- Local Variables: --- compile-command: "make -C $M2BUILDDIR/Macaulay2/m2 " --- End: diff -Nru macaulay2-1.22~rc1+ds/.pc/reproducible-version.patch/M2/configure.ac macaulay2-1.22+ds/.pc/reproducible-version.patch/M2/configure.ac --- macaulay2-1.22~rc1+ds/.pc/reproducible-version.patch/M2/configure.ac 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/reproducible-version.patch/M2/configure.ac 1970-01-01 00:00:00.000000000 +0000 @@ -1,2163 +0,0 @@ -AC_INIT([Macaulay2],[m4_esyscmd_s([cat VERSION])],[Macaulay2@math.uiuc.edu],[Macaulay2],[http://macaulay2.com/]) -AC_MSG_NOTICE([configuring Macaulay2 version $PACKAGE_VERSION]) -AC_CONFIG_SRCDIR(INSTALL) -AC_CONFIG_HEADERS(include/M2/config.h) -AC_CONFIG_FILES(m4_include(config/files)) -AC_SUBST(CONFIGURED_FILES,"$ac_config_files") -AC_SUBST(CONFIG_ARGS,"$ac_configure_args") -echo "'$0' $ac_configure_args" > config.args -C_CONFIG_ARGS=` echo "$ac_configure_args" | sed -e 's=\\\\=\\\\\\\\=g' -e 's=\\"=\\\\"=g' ` -AC_DEFINE_UNQUOTED(CONFIG_ARGS,"$C_CONFIG_ARGS",arguments used for configure) -AC_SUBST(CONFIG_CMD,"'$0' $ac_configure_args") - -AC_CONFIG_MACRO_DIR([config]) dnl can't get this to work -m4_include(config/ax_compare_version.m4) -m4_include(config/ax_prog_cc_for_build.m4) -m4_include(config/ax_func_accept_argtypes.m4) -m4_include(config/relpaths.m4) -m4_include(config/gtest.m4) -m4_include(config/openmp.m4) -m4_include(config/search-libraries.m4) -m4_include(config/ax_boost_base.m4) -m4_include(config/ax_boost_regex.m4) - -dnl define(TO_UPPER,[translit($1, [a-z], [A-Z])]) - -echo "relevant environment variable values, if any:" -for x in CC FC CXX AR CPPFLAGS CFLAGS FCFLAGS CXXFLAGS LDFLAGS LIBS ISSUE DISTRIBUTION PKG_CONFIG_PATH GFTABLESDIR -do eval v=\$$x - test "$v" && echo " $x = $v" -done - -AC_SUBST(DISTRIBUTION) # use this starting number to sequentially number the downstream distributions -test "$DISTRIBUTION" || DISTRIBUTION=1 - -for i in $CFLAGS -do case $i in - -I*) AC_MSG_ERROR(preprocessor flag $i found in CFLAGS instead of in CPPFLAGS) ;; - -L*) AC_MSG_ERROR(link flag $i found in CFLAGS instead of in LDFLAGS);; - esac -done - -for i in $CXXFLAGS -do case $i in - -I*) AC_MSG_ERROR(preprocessor flag $i found in CXXFLAGS instead of in CPPFLAGS);; - -L*) AC_MSG_ERROR(link flag $i found in CXXFLAGS instead of in LDFLAGS);; - esac -done - -for i in $CPPFLAGS -do case $i in - -L*) AC_MSG_ERROR(link flag $i found in CPPFLAGS instead of in LDFLAGS);; - esac -done - -for i in $LDFLAGS -do case $i in - -I*) AC_MSG_ERROR(preprocessor flag $i found in LDFLAGS instead of in CPPFLAGS);; - esac -done - -dnl AC_MSG_CHECKING(whether $FIND is GNU find) -dnl if "$FIND" --version | head -1 | grep "GNU find" >/dev/null 2>&1 -dnl then AC_MSG_RESULT(yes) -dnl else AC_MSG_ERROR($FIND: GNU find is required") -dnl fi - -dnl interesting behavior: $A expansion happens after statement separation! -dnl $ A="echo hi 2>/dev/null " -dnl $ echo "`$A`" -dnl hi 2>/dev/null -dnl $ $A -dnl hi 2>/dev/null -dnl $ eval $A -dnl hi - -AC_SUBST(NODENAME,"`uname -n`") -AC_DEFINE_UNQUOTED(NODENAME,"$NODENAME",hostname used for compilation) - -AC_SUBST(ISSUE) # no initial value -AC_ARG_WITH(issue, AS_HELP_STRING([--with-issue=...,specify the OS issue (e.g., Ubuntu-7.10)]),ISSUE=$withval) -AC_SUBST(OS,"` uname -s | sed s=/=-=g `") -AC_SUBST(REL,"` uname -r | sed -e s=/=-=g -e 's= =+=' -e 's=[()]==g' `") -AC_SUBST(UNAME_INFO_COMMAND," uname -pmso 2>/dev/null || uname -pms ") -AC_SUBST(UNAME_INFO,"` eval $UNAME_INFO_COMMAND `") - -case $OS in - # Here we normalize the name of the OS for windows for startup.m2, which - # needs to know that C:/FOO/BAR is an absolute path. - CYGWIN*) OS=MicrosoftWindows ; ISSUE=${ISSUE:-Cygwin} ;; -esac - -if test ! "$ISSUE" -then if test -f /usr/bin/sw_vers - then ISSUE_FLAVOR=`/usr/bin/sw_vers -productName` - ISSUE_RELEASE=`/usr/bin/sw_vers -productVersion` - elif test -f /usr/bin/lsb_release - then ISSUE_FLAVOR=`lsb_release -s --id` - ISSUE_RELEASE=`lsb_release -s --release` - elif test -f /etc/os-release - then ISSUE_FLAVOR=`. /etc/os-release ; echo $ID` - ISSUE_RELEASE=`. /etc/os-release ; echo $VERSION_ID` - elif test -f /usr/lib/os-release - then ISSUE_FLAVOR=`. /usr/lib/os-release ; echo $ID` - ISSUE_RELEASE=`. /usr/lib/os-release ; echo $VERSION_ID` - elif test -f /bin/freebsd-version - then ISSUE_FLAVOR=FreeBSD - ISSUE_RELEASE=`freebsd-version` - elif test -f /etc/system-release - then ISSUE_FLAVOR=[`&1 | grep remove-section >/dev/null - then val=yes - else val=no - fi - AC_MSG_RESULT($val) - AC_SUBST(STRIP_REMOVE_SECTION,$val) -fi - -AC_MSG_CHECKING(whether $MAKE is GNU make) -if "$MAKE" --version | head -1 | grep GNU >/dev/null 2>&1 -then AC_MSG_RESULT(yes) -else AC_MSG_RESULT(no) - AC_MSG_ERROR($MAKE: GNU make is required) -fi - -AC_MSG_CHECKING(whether GNU make is recent enough) -dnl Note: run our makefiles with GNU make, version 4 or larger. -dnl Version 3.81, provided on Mac OS X, has a bug, but you can -dnl use "homebrew" to install a modern version under the name "gmake" -if "$MAKE" --version | head -1 | grep "GNU Make 3.81" >/dev/null 2>&1 -then AC_MSG_RESULT(no) - AC_MSG_ERROR([$MAKE: GNU make 3.81 found, too old; install a more recent version]) -else AC_MSG_RESULT(yes) -fi - -AC_MSG_CHECKING(whether $TAR is GNU tar) -if "$TAR" --version | head -1 | grep "GNU tar" >/dev/null 2>&1 -then AC_MSG_RESULT(yes) -else AC_MSG_ERROR($TAR: GNU tar is required) -fi - -AC_ARG_ENABLE([documentation], - [AS_HELP_STRING([--enable-documentation=...], - [space-delimited list of types of documentation to build; available - options are "html", "info", and "pdf"; default value is "html info"])], - [DOCUMENTATION=$enableval], - [DOCUMENTATION="html info"]) - -if test "$DOCUMENTATION" = no -then DOCUMENTATION="" -elif test "$DOCUMENTATION" = yes -then DOCUMENTATION="html info" -else for DOCTYPE in $DOCUMENTATION - do case $DOCTYPE in - html|info|pdf) - ;; - *) - AC_MSG_ERROR([unknown documentation type ($DOCTYPE); expected html, info, or pdf]) - ;; - esac - done -fi - -AC_SUBST(DOCUMENTATION) - -dnl deprecated in 1.22 -dnl TODO: remove this completely after 1.22 is released -AC_ARG_ENABLE([syntax-highlighting], - [AS_HELP_STRING([--enable-syntax-highlighting], - [this option is deprecated; syntax highlight is always enabled.])], - [AC_MSG_WARN([the --enable-syntax-highlighting option is deprecated; syntax highlighting is always enabled.])]) - -AC_CANONICAL_HOST() -AC_SUBST(ARCH,$build_cpu) -AC_DEFINE_UNQUOTED(ARCH,"$ARCH",[machine hardware type]) - - -dnl AC_ARG_VAR(CC,C compiler to use) -dnl AC_ARG_VAR(CXX,C++ compiler to use) - -AC_SUBST(OPTIMIZE,yes) AC_ARG_ENABLE(optimize, AS_HELP_STRING(--disable-optimize,disable optimization), OPTIMIZE=$enableval) - -AC_SUBST(NTL_WIZARD,no) AC_ARG_ENABLE(ntl-wizard, AS_HELP_STRING(--enable-ntl-wizard,enable running the NTL wizard), NTL_WIZARD=$enableval) - -AC_SUBST(M2_CPPFLAGS) -AC_SUBST(M2_CFLAGS) -AC_SUBST(M2_CXXFLAGS) - -dnl Fix standards, apply everywhere -CXXFLAGS="-std=gnu++14 $CXXFLAGS" -CFLAGS="-std=gnu11 $CFLAGS" - -AC_PROG_CC() # set CFLAGS before this -AC_SUBST(GCC) # gets set to yes or no by AC_PROG_CC - -AC_PROG_CXX() # set CXXFLAGS before this -AC_SUBST(GXX) # gets set to yes or no by AC_PROG_CXX - -AC_PROG_YACC() -if test "$YACC" = byacc -then AC_MSG_ERROR([byacc found, but leads to a crash in scc1: install bison instead]) -fi - -AC_PROG_RANLIB() -AC_PROG_INSTALL() -AC_PROG_AWK() - -dnl always compile with "-g", so we can debug even optimized versions -if test "$GCC" = yes -then CFLAGS="$CFLAGS -g3" - CXXFLAGS="$CXXFLAGS -g3" - LDFLAGS="$LDFLAGS -g3" -else CFLAGS="$CFLAGS -g" - CXXFLAGS="$CXXFLAGS -g" - LDFLAGS="$LDFLAGS -g" -fi - -AC_SUBST(DEBUG,no) AC_ARG_ENABLE(debug, AS_HELP_STRING(--enable-debug,enable debugging (and disable stripping)), DEBUG=$enableval) -if test "$DEBUG" = yes -then # It is a mistake to add "-DDEBUG" to CPPFLAGS, because it is nonstandard and may confusing libraries, such as "flint". - # Instead, NDEBUG being *not* defined as a C macro is what indicates debug mode. This is standard practice. - # gc.h obeys the GC_DEBUG flag: - M2_CPPFLAGS="$M2_CPPFLAGS -DGC_DEBUG" - CPPFLAGS="$CPPFLAGS -DGC_DEBUG" -else M2_CPPFLAGS="$M2_CPPFLAGS -DNDEBUG" - CPPFLAGS="$CPPFLAGS -DNDEBUG" -fi - -[ - CFLAGS=` echo $CFLAGS | sed -e 's/-O[0-9]//g' -e 's/ */ /g' -e 's/^ *//' -e 's/ * $//' ` - CXXFLAGS=` echo $CXXFLAGS | sed -e 's/-O[0-9]//g' -e 's/ */ /g' -e 's/^ *//' -e 's/ * $//' ` - FCFLAGS=` echo $FCFLAGS | sed -e 's/-O[0-9]//g' -e 's/ */ /g' -e 's/^ *//' -e 's/ * $//' ` -] - -if test "$OPTIMIZE" = yes -then CFLAGS="$CFLAGS -O2" - CXXFLAGS="$CXXFLAGS -O2" - FCFLAGS="$FCFLAGS -O2" -else CFLAGS="$CFLAGS -O0" - CXXFLAGS="$CXXFLAGS -O0" - FCFLAGS="$FCFLAGS -O0" -fi - -AC_SUBST(GCCVERSION) -if test $GCC = yes -then AC_MSG_CHECKING(for $CC version) - GCCVERSION=`$CC -dumpversion 2>&1 | sed 's/.*-\(.*\):.*/\1/'` - AC_MSG_RESULT($GCCVERSION) -fi - -dnl this macro is available only in autoconf 2.60, but most systems have 2.59 as the default: -dnl AC_PROG_MKDIR_P() - -AC_MSG_CHECKING(whether exceptions are caught) - AC_LANG(C++) - AC_RUN_IFELSE([AC_LANG_SOURCE([ - #include - #include - int main () { - const std::string s("caught"); - try { throw(std::runtime_error(s)); } - catch (std::runtime_error e) { } - return 0; - }])], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT([no, use a different C++ compiler])]; exit 1 - ) - -AC_CHECK_SIZEOF([int *]) -AC_SUBST(SIZEOF_INT_P,$ac_cv_sizeof_int_p) -AC_CHECK_SIZEOF([long]) -AC_SUBST(SIZEOF_LONG,$ac_cv_sizeof_long) - -dnl Now we make the 32 bit / 64 bit choice explicit, because config.guess may guess it's a 32 bit system even though gcc compiles -dnl 64 bit object code by default, and then mpir's configure script (versions 1.2.1 and 1.3.0-rc1) gets confused. -dnl if test "$GCC" = yes -dnl then if test "$SIZEOF_INT_P" = 4 -dnl then case " $CC $CFLAGS " in -dnl *" -m32 "*) ;; -dnl *) CC="$CC -m32" ;; -dnl esac -dnl fi -dnl if test "$SIZEOF_INT_P" = 8 -dnl then case " $CC $CFLAGS " in -dnl *" -m64 "*) ;; -dnl *) CC="$CC -m64" ;; -dnl esac -dnl fi -dnl fi -dnl if test "$GXX" = yes -dnl then if test "$SIZEOF_INT_P" = 4 -dnl then case " $CXX $CFLAGS " in -dnl *" -m32 "*) ;; -dnl *) CXX="$CXX -m32" ;; -dnl esac -dnl fi -dnl if test "$SIZEOF_INT_P" = 8 -dnl then case " $CXX $CFLAGS " in -dnl *" -m64 "*) ;; -dnl *) CXX="$CXX -m64" ;; -dnl esac -dnl fi -dnl fi - -AC_CHECK_HEADERS_ONCE([sys/time.h]) -AC_CHECK_HEADERS(sys/ioctl.h termios.h sys/mman.h sys/socket.h netdb.h netinet/in.h arpa/inet.h sys/time.h time.h sys/wait.h sys/resource.h io.h linux/personality.h stddef.h stdint.h inttypes.h elf.h execinfo.h stdlib.h syscall.h sys/types.h sys/stat.h unistd.h math.h pthread.h assert.h alloca.h malloc.h dlfcn.h) -AC_CHECK_HEADERS(winsock2.h) dnl used with ws2_32.dll under mingw64 -dnl winsock2.h should be included before including windows.h -dnl pthread.h includes windows.h -dnl therefore winsock2.h should be included before pthread -AC_SEARCH_LIBS(clock_gettime,rt) -dnl winsock2.h should be used with ws2_32.lib; it defines: -dnl accept bind closesocket connect freeaddrinfo getaddrinfo gethostbyaddr -dnl gethostbyname gethostname getnameinfo getpeername getprotobyname -dnl getprotobynumber getservbyname getservbyport getsockname getsockopt htonl htons -dnl inet_addr inet_ntoa inet_ntop inet_pton ioctlsocket listen ntohl ntohs recv -dnl recvfrom select send sendto setsockopt shutdown socket -AC_SEARCH_LIBS(socket,socket ws2_32) dnl ws2_32 is used under mingw64 -AC_SEARCH_LIBS(hstrerror,resolv) -AC_SEARCH_LIBS(dlopen,dl) -AC_SEARCH_LIBS(gethostbyname,nsl) - -AC_SUBST(ENABLE_TBB,yes) AC_ARG_ENABLE(tbb, AS_HELP_STRING(--disable-tbb,disable use of the tbb (threaded building blocks) library), ENABLE_TBB=$enableval) -if test $ENABLE_TBB = yes -then AC_DEFINE(WITH_TBB,1,[whether the tbb library has been enabled by the builder]) - AC_SUBST(LIBTBB) dnl LIBTBB is usually set to -ltbb - AC_LANG(C++) - AC_CHECK_HEADER(tbb/tbb.h, - [AC_SEARCH_LIBS(TBB_runtime_interface_version,"tbb", - LIBTBB=$ac_cv_search_TBB_runtime_interface_version, - [AC_MSG_ERROR([tbb library not found])])], - [AC_MSG_ERROR([tbb include file (tbb.h) not found])]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 - #include - int main () { - printf("tbb version %d.%d found\n", TBB_VERSION_MAJOR, TBB_VERSION_MINOR); - return 0; - } - ]])]) -fi - -AC_CHECK_FUNCS([herror error clock_gettime getaddrinfo hstrerror sync getpgrp setpgid fchmod pipe waitpid setrlimit alarm fork sigprocmask kill longjmp siglongjmp sigaction wait4 readlink lstat realpath mkdir link symlink socket accept fcntl personality ioctl]) - -AC_SUBST(HAVE_PERSONALITY,$ac_cv_func_personality) - -AC_DEFINE_UNQUOTED(SOCKLEN_T,[`echo "$ac_cv_func_accept_arg3" | sed 's/ \*$//'`],[socket length type used by accept()]) - -if test $host_os = mingw32 -then CPPFLAGS="$CPPFLAGS -D_POSIX" # arrange for SIGPIPE to get defined - CPPFLAGS="$CPPFLAGS -D__USE_MINGW_ALARM" # for SIGALRM to get defined -fi - -AC_SUBST(__INTEL_COMPILER,no) -AC_CHECK_DECL(__INTEL_COMPILER,__INTEL_COMPILER=yes) - -dnl this macro is available only in autoconf 2.60, but most systems have 2.59 as the default: -dnl AC_TYPE_INT64_T() - -AC_FUNC_ALLOCA() - -dnl AC_SUBST(PTHREADS,yes) AC_ARG_ENABLE(pthreads, AS_HELP_STRING(--disable-pthreads,[disable pthreads (for gc)]), PTHREADS=$enableval) - -AC_SUBST(ENABLE_STRIP,no) AC_ARG_ENABLE(strip, AS_HELP_STRING(--enable-strip,strip the symbol table from the Macaulay2 binary), ENABLE_STRIP=$enableval) -test "$DEBUG" = "yes" && ENABLE_STRIP=no -# note: we build many programs for inclusion in the distribution -- stripping them saves 9MB of 70 - -AC_SUBST(MEMDEBUG,no) AC_ARG_ENABLE(memdebug, AS_HELP_STRING(--enable-memdebug,enable memory allocation debugging), MEMDEBUG=$enableval) -AC_SUBST(ENCAP,no) AC_ARG_ENABLE(encap, AS_HELP_STRING(--enable-encap,encapsulate all files in a subdirectory at installation time), ENCAP=$enableval) -AC_SUBST(XCODE,no) AC_ARG_ENABLE(xcode, AS_HELP_STRING(--enable-xcode,create Macaulay2/d/interpret.a for use with xcode), XCODE=$enableval) - -AC_SUBST(CC_THREAD_SUPPORT) -AC_MSG_CHECKING(whether the C compiler accepts the __thread storage attribute) -AC_LANG(C) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([__thread int x;])], - CC_THREAD_SUPPORT=yes; [AC_MSG_RESULT(yes)], - CC_THREAD_SUPPORT=no ; [AC_MSG_RESULT(no)]) - -AC_SUBST(XML,yes) -AC_ARG_ENABLE(xml, AS_HELP_STRING(--disable-xml,[do not link with xml library]), XML=$enableval) -if test "$XML" = yes -then AC_DEFINE(WITH_XML,1,[whether we are linking with the xml library]) -fi - -AC_SUBST(MYSQL,no) -AC_ARG_WITH(mysql, AS_HELP_STRING(--with-mysql,[link with mysql]), MYSQL=$withval) -if test "$MYSQL" = yes -then AC_DEFINE(WITH_MYSQL,1,[whether we are linking with the mysql library]) -fi - -AC_ARG_ENABLE(altivec, AS_HELP_STRING(--enable-altivec,compile with "-faltivec" option)) -if test "$enable_altivec" = yes -then LDFLAGS="$LDFLAGS -faltivec" - CFLAGS="CFLAGS -faltivec" - CXXFLAGS="$CXXFLAGS -faltivec" -fi - -AC_PROG_FC() dnl check for Fortran compiler presence -USE_FCLIBS=unspecified -AC_ARG_ENABLE(fc-lib-ldflags, - AS_HELP_STRING(--disable-fc-lib-ldflags,[do not use extra libraries for linking with Fortran (the default under Cygwin)]), - USE_FCLIBS=$enableval) - -if test "$USE_FCLIBS" = unspecified -then if test "$ISSUE" = Cygwin - then USE_FCLIBS=no - AC_MSG_NOTICE([by default under Cygwin, not adding linker flags to link with Fortran libraries]) - else USE_FCLIBS=yes - AC_MSG_NOTICE([by default, adding linker flags to link with Fortran libraries]) - fi -fi - -if test "$FC" -then AC_FC_DUMMY_MAIN() - AC_FC_WRAPPERS() - AC_FC_LIBRARY_LDFLAGS() -fi - -dnl if test "$PTHREADS" = yes -dnl then - AC_SEARCH_LIBS(pthread_mutex_trylock,pthread) -dnl fi - -AC_SUBST(PROFILING,no) -AC_ARG_ENABLE(profile, AS_HELP_STRING(--enable-profile,enable profiling (and disable stripping)), PROFILING=$enableval) -test "$PROFILING" = no; val=$?; AC_DEFINE_UNQUOTED(PROFILING, $val,whether profiling has been enabled) - -AC_SUBST(COMPRESS,gz) AC_ARG_ENABLE(compress, AS_HELP_STRING([--enable-compress=[gz|bz2]],compression method for tarball), COMPRESS=$enableval) - -AC_SUBST(EXPERIMENT,no) -AC_ARG_ENABLE(experimental-code, AS_HELP_STRING(--enable-experimental-code,enable experimental code), EXPERIMENT=$enableval) -test "$EXPERIMENT" = no; val=$?; AC_DEFINE_UNQUOTED(EXPERIMENT,$val,whether experimental code has been enabled) - -AC_SUBST(M2TARFILE,no) AC_ARG_ENABLE(tarfile, AS_HELP_STRING(--enable-tarfile,prepare binary and source packages as compressed tar files), M2TARFILE=$enableval) -AC_SUBST(TARLIBS,no) AC_ARG_ENABLE(tarlibs, AS_HELP_STRING(--enable-tarlibs,include symbolic links to needed shared libraries for tar), TARLIBS=$enableval) -AC_SUBST(SHARED,yes) AC_ARG_ENABLE(shared, AS_HELP_STRING(--disable-shared,disable building of shared libraries), SHARED=$enableval) - -dnl Under Mac OS X 10.15 the Gatekeeper makes it impossible for us to distribute shared libraries with our program to end users in disk image (*.dmg) format: -dnl ... but we've given up on trying to satisfy the gatekeeper. There is a strange error message when we try to link with libgmp.a: -dnl ld: illegal text-relocation to '___gmp_binvert_limb_table' in /Users/runner/runners/2.263.0/work/M2/M2/M2/BUILD/cicd/usr-host/lib/libgmp.a(mp_minv_tab.o) from '___gmpn_divexact_1' in /Users/runner/runners/2.263.0/work/M2/M2/M2/BUILD/cicd/usr-host/lib/libgmp.a(dive_1.o) for architecture x86_64 -dnl if test "$ISSUE_FLAVOR" = "MacOS" -dnl then SHARED=no -dnl AC_MSG_NOTICE([disabling the building of shared libraries under Mac OS X]) -dnl fi - -test "$MEMDEBUG" = "yes" && DEBUG=yes -test "$PROFILING" = "yes" && CFLAGS="$CFLAGS -pg" CXXFLAGS="$CXXFLAGS -pg" LDFLAGS="$LDFLAGS -pg" ENABLE_STRIP=no - -if <$srcdir/Macaulay2/packages/=distributed-packages sort|uniq -c|grep -v -q ' 1 ' -then echo "error: some packages are listed more than once in Macaulay2/packages/=distributed-packages:" - <$srcdir/Macaulay2/packages/=distributed-packages sort|uniq -c|grep -v ' 1 ' - exit 1 -fi -AC_SUBST(PACKAGES,`cat $srcdir/Macaulay2/packages/=distributed-packages`) -[if [ $? != 0 ] ; then exit 1 ; fi] -# convert the newlines to spaces -PACKAGES=`echo $PACKAGES` -AC_DEFINE_UNQUOTED(PACKAGES,"$PACKAGES",the list of packages included with the release of Macaulay2) - -AC_DEFINE_UNQUOTED(buildsystemtype,"$build",the type of system on which the package was built) -AC_DEFINE_UNQUOTED(hostsystemtype,"$host",the type of system on which the package runs) - -case $host in - i586-*|i686-*) - newhost=`echo $host | sed s/i.86-/i486-/` - AC_MSG_NOTICE([warning: building for host $host might not be compatible enough, consider using option "--build=$newhost"]) ;; -esac - -AC_SUBST(AUTOINST,no) -AC_ARG_ENABLE( - auto-instantiation, - AS_HELP_STRING([--enable-auto-instantiation,enable automatic instantiation of C++ templates (it uses -frepo option to g++)]), - AUTOINST=$enableval) -test "$AUTOINST" = no; val=$?; AC_DEFINE_UNQUOTED(AUTOINST,$val,whether to instantiate templates automatically) - -AC_SUBST(IMPLINST,yes) -AC_ARG_ENABLE( - implicit-templates, - AS_HELP_STRING([--disable-implicit-templates,disable implicit instantiation of C++ templates (it uses -fno-implicit-templates option to g++)]), - IMPLINST=$enableval) -test "$IMPLINST" = no; val=$?; AC_DEFINE_UNQUOTED(IMPLINST,$val,whether to instantiate templates implicitly) - -AC_SUBST(DEVELOPMENT,no) -AC_ARG_ENABLE(development, AS_HELP_STRING(--enable-development,build a development version), DEVELOPMENT=$enableval) -if test "$DEVELOPMENT" = yes -then AC_DEFINE_UNQUOTED(DEVELOPMENT,1,whether to build a development version) -fi - -AC_SUBST(DEVELOPER) -AC_ARG_WITH(developer, AS_HELP_STRING(--with-developer=...,specify the name of the developer ($USER)),DEVELOPER=$withval) - -AC_SUBST(TAR_COMPRESS_OPTION,) -case $COMPRESS in - gz) TAR_COMPRESS_OPTION=--gzip ;; - bz2) TAR_COMPRESS_OPTION=--bzip ;; - *) AC_MSG_ERROR(unrecognized option for enable-compress) ;; -esac - -AC_SUBST(GIT_DESCRIPTION) -# TODO: currently finds the last commit that changed the VERSION file -# but ideally it should get the last release commit instead -NEW_COMMITS=`$GIT rev-list $($GIT rev-list -1 HEAD $srcdir/VERSION)..HEAD --count` -GIT_COMMIT=`$GIT describe --dirty --always --match HEAD` -if test "$NEW_COMMITS-$GIT_COMMIT" = "-" -then GIT_DESCRIPTION=version-1.21-481-6cba5590c -else GIT_DESCRIPTION=version-$PACKAGE_VERSION-$NEW_COMMITS-$GIT_COMMIT -fi -AC_DEFINE_UNQUOTED(GIT_DESCRIPTION,"$GIT_DESCRIPTION",[summary of git status]) - -AC_SUBST(DEB,no) -AC_ARG_ENABLE(deb, AS_HELP_STRING(--enable-deb,prepare a *.deb package (for debian, ubuntu, ...)), DEB=$enableval) -if test "$DEB" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-deb both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-deb both specified]) - fi -fi - -AC_SUBST(FREEBSD,no) -AC_ARG_ENABLE(freebsd, AS_HELP_STRING(--enable-freebsd,prepare a package file for freebsd), FREEBSD=$enableval) -if test "$FREEBSD" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-freebsd both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-freebsd both specified]) - fi -fi - -AC_SUBST(RPM,no) -AC_ARG_ENABLE(rpm, AS_HELP_STRING(--enable-rpm,prepare a *.rpm package (for red hat based systems)), RPM=$enableval) -if test "$RPM" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-rpm both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-rpm both specified]) - fi -fi - -AC_SUBST(DMG,no) -AC_ARG_ENABLE(dmg, AS_HELP_STRING(--enable-dmg,prepare a *.dmg package (for Mac OS)), DMG=$enableval) -if test "$DMG" = yes -then if test "$OPTIMIZE" = no - then AC_MSG_ERROR([--disable-optimize and --enable-dmg both specified]) - fi - if test "$DEBUG" = yes - then AC_MSG_ERROR([--enable-debug and --enable-dmg both specified]) - fi - if test $SHARED = yes - then SHARED=no - AC_MSG_WARN([--enable-dmg specified, so disabling the building of shared libraries]) - fi -fi - -AC_SUBST(M2SUFFIX) -test "$program_suffix" != NONE && M2SUFFIX=$program_suffix -AC_ARG_ENABLE(dummy, AS_HELP_STRING(--program-suffix=...,suffix to append to executable name M2)) - -AC_DEFINE(M2_CONFIG_H,1,a macro definition to ensure our config.h was the one loaded) - -AC_DEFINE_UNQUOTED(M2SUFFIX,"$M2SUFFIX",[suffix to append to executable name M2]) - -WITH_NEWLINE_CR=0 -WITH_NEWLINE_CRLF=0 -AC_ARG_WITH(newline, AS_HELP_STRING([--with-newline=...], [crlf, cr, or lf (the default)]), - [ case $withval in - crlf) WITH_NEWLINE_CRLF=1 WITH_NEWLINE_CR=0 ;; - cr) WITH_NEWLINE_CR=1 WITH_NEWLINE_CRLF=0 ;; - lf) WITH_NEWLINE_CR=0 WITH_NEWLINE_CRLF=0 ;; - *) AC_MSG_ERROR([--with-newline expected crlf, cr, or lf]) ;; - esac ]) -AC_DEFINE_UNQUOTED(WITH_NEWLINE_CRLF,$WITH_NEWLINE_CRLF,[whether newline is cr lf]) -AC_DEFINE_UNQUOTED(WITH_NEWLINE_CR, $WITH_NEWLINE_CR, [whether newline is cr]) - -AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT",[suffix the compiler appends to executable filenames]) - -AC_SUBST(ISYSTEM,no) -AC_MSG_CHECKING(whether g++ gets confused about C linkage in system library files) -AC_LANG(C++) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - # 1 "foo" 1 3 4 - template struct A { };])],AC_MSG_RESULT(no);ISYSTEM=yes,AC_MSG_RESULT(yes)) - -dnl Check for openmp and fail if it cannot be found. -dnl This is required for building the library csdp and good for building the library normaliz -AC_LANG(C++) -AC_OPENMP -if test "$ac_cv_prog_cxx_openmp" = unsupported - then AC_MSG_ERROR([OpenMP does not work, use a compiler that supports OpenMP]) -fi -TMP=$OPENMP_CXXFLAGS -OPENMP_CXXFLAGS= -for i in $TMP -do case $i in - -l*) OPENMP_LIBS="$OPENMP_LIBS $i" ;; - *) OPENMP_CXXFLAGS="$OPENMP_CXXFLAGS $i" ;; - esac -done -AC_SUBST(OPENMP_CXXFLAGS,"$OPENMP_CXXFLAGS") -AC_SUBST(OPENMP_LIBS,"$OPENMP_LIBS") - -############################################################################# -AC_SUBST(BUILTLIBS) -# The list BUILTLIBS is the list of link options for the libraries we have decided to build, -# of the form "-lFOO", which will be used to link Macaulay2 later on. These libraries are not -# available at the time this configure script is run, which is why we can't add "-lFOO" to LIBS. -# (Programs linked by this configure script are linked with the options in LIBS. This allows libraries -# dependent on previously detected libraries to be detected by tests that involve linking. - -AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") -# The list LIBLIST is the list of libraries that might be used and linked into M2. - -AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") -# The list PROGLIST is the list of programs and libraries for them that are distributed with M2. -# Initially, we offer no option for not compiling some of them. - -AC_SUBST(SUBLIST, " memtailor mathic mathicgb fflas_ffpack givaro ") - -# The list SUBLIST is the list of submodules that might be used and linked into M2. - -# These three lists reflect dependencies, with prerequisites listed first, including the following dependencies: -# mathicgb needs mathic and memtailor -# mathic needs memtailor -# gc needs atomic_ops (and sometimes includes it) -# factory needs flint, ntl and gmp; it includes and installs gftables, so doesn't need it separately -# libfac has been replaced by code in factory -# lapack includes blas, makes both libblas and liblapack -# mpir is a plug-in replacement for gmp and can provide libgmp and libgmpxx, too. -# mpfr needs gmp (or mpir -# mpfr puts pointers to gmp numbers in thread local variables, unless -# specially configured, so we shouldn't tell gmp to use libgc (we used to do that) -# ntl needs gmp (or mpir) -# 4ti2 needs glpk -# glpk needs gmp (or mpir) -# topcom depends on cddlib -# gfan needs cddlib -# cddlib uses gmp -# polymake cannot be included in Macaulay2 because its compile/build/install procedure is flawed: -# it uses a dynamic readline library that can only be provided by fink and probably will not be copied into the install location -# it offers no way to provide a directory tree containing a readline library we've compiled -# it writes a file into the user's home directory called ".polymake" -# it asks questions -# normaliz needs libgmp, libgmpxx, boost -# Greg Smith requested cddplus and lrslib for future use -# nauty is used by the package Nauty -# normaliz is used by the package Normaliz -# gfan is used by the packages gfanInterface and StatePolytope -# 4ti2 is used by the package FourTiTwo -# linbox is provided as an option for experimentation -# linbox needs fflas_ffpack and givaro -# givaro uses gmp -# fflas_ffpack needs givaro and lapack, but fflas_ffpack is just source code, so we don't *have* to build it -# mpir is used by givaro -# mpir and mpfr are used by fplll -# flint depends on gmp (or mpir) and mpfr -# frobby depends on gmp -# mpfi needs mpfr - -AC_SUBST(FILE_PREREQS) -# This is the list of files found in the system that we need to be there for the user who -# installs a binary distribution. - -# a library is listed in BUILD_ALWAYS if and only if we *always* build it, -# even if the option "--disable-building" is specified: -BUILD_ALWAYS="" - -for i in $LIBLIST $SUBLIST $PROGLIST -do eval BUILD_$i=no -done - -# Convert package identifiers used here to package names as known by the package. -# The point is that BUILD_fflas_ffpack is a valid shell identifier, but -# the name of the package is fflas-ffpack and BUILD_fflas-ffpack is not valid as -# a shell identifier. We may need the name of the package, for example, as an -# argument to pkg-config. -for i in $LIBLIST -do eval PKGNAME_$i=$i -done -PKGNAME_fflas_ffpack=fflas-ffpack - -############################################################################# - -LIBLIST=" $LIBLIST " -AC_ARG_ENABLE(build-libraries, AS_HELP_STRING(--enable-build-libraries=...,[list of libraries, submodules, and programs to build from downloaded source code (e.g., gc gdbm mpir mpfr mpfi readline ntl gftables factory lapack mpsolve frobby glpk cddlib givaro fflas_ffpack linbox 4ti2 gfan normaliz csdp nauty cddplus lrslib)]), - [for i in $enableval - do case " $LIBLIST $SUBLIST $PROGLIST " in - *" $i "*) - eval BUILD_$i=yes - BUILD_ALWAYS="$BUILD_ALWAYS $i" - ;; - *) AC_MSG_ERROR(--enable-build-libraries option: unrecognized library name: $i) ;; - esac - done]) - -############################################################################# - -dnl We disable something temporarily that didn't work out, because if we put a static library, such -dnl as libflint.a, into LIBS, then mathicgb, mathic, and memtailor get confused and include a copy -dnl of the file in their *.a file. -TRY_STATIC=no - -AC_SUBST(LIBS_GDBM) -AC_LANG(C) -AC_CHECK_HEADER(gdbm.h, - test $BUILD_gdbm = yes && AC_MSG_WARN([[library gdbm exists, but we are asked to build it]]), - BUILD_gdbm=yes) -if test $BUILD_gdbm = yes -then LIBS_GDBM="-lgdbm" - BUILTLIBS="$LIBS_GDBM $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(gdbm_close,"/usr/lib/libgdbm.a" "/usr/local/lib/libgdbm.a",,[AC_MSG_ERROR([libgdbm.a not found])]) - else AC_SEARCH_LIBS(gdbm_close,"gdbm",,[AC_MSG_ERROR([libgdbm not found])]) - fi - if test "none required" != "$ac_cv_search_gdbm_close" - then LIBS_GDBM=$ac_cv_search_gdbm_close - fi -fi - -## we build gc by default so we can configure it for large memory spaces -## see issue #2445 -AC_ARG_WITH([system-gc], - [AS_HELP_STRING([--with-system-gc], - [use system gc instead of building it])], - [], - [with_system_gc=no]) - -AS_IF([test "x$with_system_gc" = xyes], - [AC_MSG_CHECKING(whether package bdw-gc is provided) -dnl Note: we don't include -lgccpp below, because linking with that library is what replaces ::new and friends with GC_MALLOC_UNCOLLECTABLE and friends: - if [ pkg-config --exists bdw-gc ] - then AC_MSG_RESULT(yes) - CPPFLAGS="`pkg-config --cflags-only-I bdw-gc | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - dnl should probably use `pkg-config --libs bdw-gc` here instead - FOUND_gc=yes - else AC_MSG_RESULT(no) - BUILD_gc=yes - fi], - [BUILD_gc=yes]) - -if test $BUILD_gc = yes -then BUILTLIBS="-lgc -lpthread $BUILTLIBS" - BUILD_ALWAYS="$BUILD_ALWAYS gc" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(GC_malloc,"/usr/lib/libgc.a" "/usr/local/lib/libgc.a",, - [AC_MSG_ERROR([libgc.a not found])]) - else AC_SEARCH_LIBS(GC_malloc,"gc",,[AC_MSG_ERROR([libgc not found])]) - fi -fi - -# mpir and gmp serve the same purpose -AC_SUBST(LIBS_GMP) -AC_LANG(C) -AC_CHECK_HEADER(gmp.h, FOUND_gmp=yes ,FOUND_gmp=no ) -AC_CHECK_HEADER(mpir.h,FOUND_mpir=yes,FOUND_mpir=no) -dnl Remark: both gmp.h and mpir.h are surrounded by -dnl #ifndef __GMP_H__ -dnl #endif -dnl , so only one can be loaded. Similarly for gmpxx.h and mpirxx.h. However, the contents of -dnl the files differ. For example, mpf_cmp_z is defined only in gmp.h. -AC_SUBST(PREFERRED_INTEGER_PACKAGE,gmp) -AC_ARG_WITH(integer-package, - AS_HELP_STRING(--with-integer-package=[mpir|gmp],specify the big integer package to use (mpir or gmp)), - if ! test $withval = mpir -o $withval = gmp - then AC_MSG_ERROR([big integer package option: invalid value: $withval]) - fi - PREFERRED_INTEGER_PACKAGE=$withval) -if test $BUILD_gmp = yes -a $BUILD_mpir = yes -then AC_MSG_ERROR([refusing to build both mpir and gmp, since the are interchangeable]) -fi -AC_MSG_CHECKING([whether to use gmp or mpir]) -if test "$PREFERRED_INTEGER_PACKAGE" = mpir -then USING_MPIR=1 - AC_MSG_RESULT([using mpir]) - AC_DEFINE(USING_MPIR,1,[Whether we use MPIR (instead of GMP)]) - if test "$FOUND_mpir" = no - then BUILD_mpir=yes - LIBS_GMP="-lmpirxx -lmpir" - BUILTLIBS="$LIBS_GMP $BUILTLIBS" - else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(__gmpz_init,"/usr/lib/libmpirxx.a /usr/lib/libmpir.a" "/usr/local/lib/libmpirxx.a /usr/local/lib/libmpir.a",, - [AC_MSG_ERROR([libmpir.a not found])]) - else SEARCH_LIBRARIES(__gmpz_init,"-lmpirxx -lmpir",,[AC_MSG_ERROR([libmpir not found])]) - fi - if test "none required" != "$ac_cv_search___gmpz_init" - then LIBS_GMP=$ac_cv_search___gmpz_init - fi - fi -else USING_MPIR=0 # i.e., using gmp - AC_MSG_RESULT([using gmp]) - AC_DEFINE(USING_MPIR,0,[Whether we use MPIR (instead of GMP)]) - if test "$FOUND_gmp" = no - then BUILD_gmp=yes - LIBS_GMP="-lgmpxx -lgmp" - BUILTLIBS="$LIBS_GMP $BUILTLIBS" - else AC_LANG(C) - if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(__gmpz_init,"/usr/lib/libgmpxx.a /usr/lib/libgmp.a" "/usr/local/lib/libgmpxx.a /usr/local/lib/libgmp.a",, - [AC_MSG_ERROR([libgmp.a not found])]) - else SEARCH_LIBRARIES(__gmpz_init,"-lgmpxx -lgmp",,[AC_MSG_ERROR([libgmp not found])]) - fi - if test "none required" != "$ac_cv_search___gmpz_init" - then LIBS_GMP=$ac_cv_search___gmpz_init - fi - dnl By the way: with Hombebrew on the Mac gmp comes with package configuration: - dnl $ pkg-config gmp --cflags - dnl -I/usr/local/Cellar/gmp/6.2.0/include - dnl $ pkg-config gmp --libs - dnl -L/usr/local/Cellar/gmp/6.2.0/lib -lgmp - fi -fi -AC_SUBST(USING_MPIR) - -AC_LANG(C) -AC_CHECK_HEADER(mpfr.h,,BUILD_mpfr=yes) -if test $BUILD_mpfr = yes -then BUILTLIBS="-lmpfr $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(mpfr_digamma,"/usr/lib/libmpfr.a" "/usr/local/lib/libmpfr.a",, - [AC_MSG_ERROR([libmpfr.a not found])]) - else AC_SEARCH_LIBS(mpfr_digamma,"mpfr",,[AC_MSG_ERROR([libmpfr not found])]) - fi -fi - -AC_LANG(C) -AC_CHECK_HEADER(mpfi.h,,BUILD_mpfi=yes) -if test $BUILD_mpfi = yes -then BUILTLIBS="-lmpfi $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(mpfi_set_prec,"/usr/lib/libmpfi.a" "/usr/local/lib/libmpfi.a",, - [AC_MSG_ERROR([libmpfi.a not found])]) - else AC_SEARCH_LIBS(mpfi_set_prec,"mpfi",,[AC_MSG_ERROR([libmpfi not found])]) - fi -fi - -# including mpsolve (requires gmp or mpir) -AC_LANG(C) -AC_CHECK_HEADER(mps/mps.h,LIBS="-lmps $LIBS",BUILD_mpsolve=yes) -if test $BUILD_mpsolve = yes -then BUILTLIBS="-lmps $BUILTLIBS" -fi - -AC_SUBST(LIBS_GLPK) -AC_LANG(C) -AC_CHECK_HEADER(glpk.h,,BUILD_glpk=yes) -if test $BUILD_glpk = yes -then BUILTLIBS="-lglpk $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(glp_free,"/usr/lib/libglpk.a" "/usr/local/lib/libglpk.a",,[AC_MSG_ERROR([libglpk.a not found])]) - else AC_SEARCH_LIBS(glp_free,"glpk",,[AC_MSG_ERROR([libglpk not found])]) - fi - if test "none required" != "$ac_cv_search_glp_free" - then LIBS_GLPK=$ac_cv_search_glp_free - fi -fi - -AC_MSG_CHECKING([whether givaro library is installed]) -AC_SUBST(BUILD_givaro) -if $PKG_CONFIG --exists givaro -then AC_MSG_RESULT(yes) - LIBS="`$PKG_CONFIG --libs givaro` $LIBS" - CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags-only-I givaro`" - AC_MSG_CHECKING([whether givaro has isUnit or isunit]) - AC_LANG([C++]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( [ #include - ], - [ class Givaro::GFqDom foo; foo.isunit(0) ])], - [AC_MSG_RESULT([isunit]); AC_DEFINE([HAVE_GIVARO_isunit], [1],[whether givaro has isunit])], - [AC_MSG_RESULT([isUnit]); AC_DEFINE([HAVE_GIVARO_isunit], [0],[whether givaro has isunit])]) -else AC_MSG_RESULT(no) - AC_DEFINE([HAVE_GIVARO_isunit], [0],[whether givaro has isunit]) - BUILD_givaro=yes -fi -if test $BUILD_givaro = yes -then BUILTLIBS="-lgivaro $BUILTLIBS" -fi - -# We add these directories to the end, so the user can override this by setting CPPFLAGS. -# /cddlib/ is more modern than /cdd/ -if test -d /usr/local/include/cddlib -then CPPFLAGS="$CPPFLAGS -I/usr/local/include/cddlib" -fi -if test -d /usr/local/include/cdd -then CPPFLAGS="$CPPFLAGS -I/usr/local/include/cdd" -fi -if test -d /usr/include/cddlib -then CPPFLAGS="$CPPFLAGS -I/usr/include/cddlib" -fi -if test -d /usr/include/cdd -then CPPFLAGS="$CPPFLAGS -I/usr/include/cdd" -fi -AC_LANG(C) -AC_CHECK_HEADER(cdd.h,,[ AC_MSG_RESULT([[cddlib not found, will build]]) - BUILD_cddlib=yes], - [ - #include - ]) -if test $BUILD_cddlib = yes -then BUILTLIBS="-lcdd $BUILTLIBS" -else if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(dd_Equal,"/usr/lib/libcdd.a" "/usr/local/lib/libcdd.a",, - [AC_MSG_ERROR([cdd.h found but libcdd.a not found])]) - else AC_SEARCH_LIBS(dd_Equal,"cdd",,[AC_MSG_ERROR([cdd.h found but libcdd not found])]) - fi -fi - -dnl factory needs to know: -AC_SUBST(BUILD_flint) -if test $BUILD_flint = no -then AC_LANG(C) - AC_MSG_CHECKING([for flint >= 2.6.3]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include - ], - [ - /* version == __FLINT_VERSION . __FLINT_VERSION_MINOR . __FLINT_VERSION_PATCHLEVEL */ - #if (__FLINT_VERSION < 2) \ - || (__FLINT_VERSION == 2 && __FLINT_VERSION_MINOR < 6) \ - || (__FLINT_VERSION == 2 && __FLINT_VERSION_MINOR == 6 && __FLINT_VERSION_PATCHLEVEL < 3) - #error old flint - #endif - ])], - AC_MSG_RESULT([yes]) - if test $SHARED = no -a $TRY_STATIC = yes - then SEARCH_LIBRARIES(_fmpz_mod_mul1,/usr/lib/libflint.a /usr/local/lib/libflint.a,, - [AC_MSG_ERROR([libflint.a not found])]) - else AC_SEARCH_LIBS(_fmpz_mod_mul1,"flint",,[AC_MSG_ERROR([libflint not found])]) - fi, - AC_MSG_RESULT([no]) - BUILD_flint=yes) -fi -if test $BUILD_flint = yes -then BUILTLIBS="-lflint $BUILTLIBS -lm" -fi - -dnl debian: 4ti2- -dnl suse: 4ti2_ -dnl fedora: /usr/lib/4ti2/bin or /usr/lib64/4ti2/bin -AC_MSG_CHECKING(whether the package 4ti2 is installed) -SAVE=$PATH -PATH="/usr/lib/4ti2/bin:/usr/lib64/4ti2/bin:$PATH" -FOUND_4ti2=no -for fourti2_prefix in "" "4ti2-" "4ti2_" -do - if command -v ${fourti2_prefix}circuits - then AC_MSG_RESULT([yes, using prefix "$fourti2_prefix"]) - FILE_PREREQS="$FILE_PREREQS `command -v ${fourti2_prefix}circuits`" - FOUND_4ti2=yes - break - fi -done -if test $FOUND_4ti2 = no -then AC_MSG_RESULT([no, will build]) - BUILD_4ti2=yes -fi -PATH=$SAVE - -AC_MSG_CHECKING(whether the package cohomcalg is installed) -if command -v cohomcalg -then if test "$OS" = Darwin -a "$DMG" = yes - then # On the Mac, we have no way (yet) to install prerequisite homebrew packages: - # the user just copies a directory tree to /Applications. Change this when - # porting to homebrew. - # Also, the package CohomCalg looks only in the directory where Macaulay2's binaries are - AC_MSG_RESULT([yes, will build anyway]) - BUILD_cohomcalg=yes - else AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v cohomcalg`" - fi -else AC_MSG_RESULT([no, will build]) - BUILD_cohomcalg=yes -fi - -AC_MSG_CHECKING(whether the package gfan is installed) -if command -v gfan -then gfan_version=`gfan _version | head -2 | tail -1 | sed 's/gfan//'` - AX_COMPARE_VERSION([$gfan_version], [ge], [0.6], - [AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v gfan`"], - [AC_MSG_RESULT([yes, but < 0.6, will build]) - BUILD_gfan=yes]) -else AC_MSG_RESULT([no, will build]) - BUILD_gfan=yes - dnl we'll also build cddlib until gfan can find its files in /usr/include instead of in /usr/include/cdd - BUILD_cddlib=yes -fi - -AC_MSG_CHECKING(whether the package lrs is installed) -if command -v lrs -then if test "$OS" = Darwin -a "$DMG" = yes - then # On the Mac, we have no way (yet) to install prerequisite homebrew packages: - # the user just copies a directory tree to /Applications. Change this when - # porting to homebrew. - AC_MSG_RESULT([yes, will build anyway]) - BUILD_lrslib=yes - else AC_MSG_RESULT(yes) - FILE_PREREQS="$FILE_PREREQS `command -v lrs`" - fi -else AC_MSG_RESULT([no, will build]) - BUILD_lrslib=yes -fi - -AC_MSG_CHECKING(whether the package csdp is installed) -if command -v csdp -then AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v csdp`" -else AC_MSG_RESULT([no, will build]) - BUILD_csdp=yes -fi - -AC_MSG_CHECKING(whether the package normaliz is installed) -if command -v normaliz -then normaliz_version=`normaliz --version | head -1 | cut -d " " -f 2` - AX_COMPARE_VERSION([$normaliz_version], [ge], [2.11], - [AC_MSG_RESULT([yes]) - FILE_PREREQS="$FILE_PREREQS `command -v normaliz`"], - [AC_MSG_RESULT([yes, but < 2.11, will build]) - BUILD_normaliz=yes]) -else AC_MSG_RESULT([no, will build]) - BUILD_normaliz=yes -fi - -if test "$BUILD_nauty" = no -then dnl debian/fedora: nauty- - AC_MSG_CHECKING(whether the package nauty is installed) - FOUND_nauty=no - for nauty_prefix in "" "nauty-" - do - if command -v ${nauty_prefix}complg - then - dnl check if #1408 is a problem - if ${nauty_prefix}biplabg < /dev/null 2>/dev/null - then - AC_MSG_RESULT([yes, using prefix "$nauty_prefix"]) - FILE_PREREQS="$FILE_PREREQS `command -v ${nauty_prefix}complg`" - FOUND_nauty=yes - break - else - FOUND_nauty=bad - fi - fi - done - if test $FOUND_nauty != yes - then - if test $FOUND_nauty = bad - then AC_MSG_RESULT([yes, but ${nauty_prefix}biplabg raises an error, will build]) - else AC_MSG_RESULT([no, will build]) - fi - BUILD_nauty=yes - fi -fi - -dnl debian: topcom- -dnl fedora: TOPCOM- (only for cube) -dnl gentoo: topcom_ (only for cube, 4 others) -dnl we save ourselves some trouble and check one of the programs that -dnl only debian gives a prefix -AC_MSG_CHECKING(whether the package topcom is installed) -FOUND_topcom=no -for topcom_prefix in "" "topcom-" -do - if command -v ${topcom_prefix}points2finetriangs - then AC_MSG_RESULT([yes, using prefix "$topcom_prefix"]) - FILE_PREREQS="$FILE_PREREQS `command -v ${topcom_prefix}points2finetriangs`" - FOUND_topcom=yes - break - fi -done -if test $FOUND_topcom = no -then AC_MSG_RESULT([no, will build]) - BUILD_topcom=yes -fi - -AC_MSG_CHECKING([whether eigen3 library is installed]) -if $PKG_CONFIG --exists eigen3 -then CFO=`$PKG_CONFIG --cflags-only-other eigen3` - CFI=`$PKG_CONFIG --cflags-only-I eigen3` - CXXFLAGS="$CXXFLAGS $CFO" - CPPFLAGS="$CPPFLAGS $CFI" - AC_MSG_RESULT([yes, with flags $CFI $CFO]) -else AC_MSG_ERROR(eigen library not found) -fi - -AC_LANG(C++) -AC_CHECK_HEADER(NTL/version.h,,BUILD_ntl=yes) -if test $BUILD_ntl = yes -then BUILTLIBS="-lntl $BUILTLIBS" -else AC_MSG_CHECKING([whether libntl is present and usable]) - if test $SHARED = no -a $TRY_STATIC = yes - then dnl It would be better to use SEARCH_LIBRARIES here, but all the symbols in libntl.a are mangled by the C++ compiler, - dnl so I don't know how to do it. - if test -f /usr/lib/libntl.a - then LIBS="/usr/lib/libntl.a $LIBS" - elif test -f /usr/local/lib/libntl.a - then LIBS="/usr/local/lib/libntl.a $LIBS" - else AC_MSG_ERROR([libntl.a not found]) - fi - else LIBS="-lntl $LIBS" - fi - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [ - #include - ], - [_ntl_GetTime()])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no, even though include files are present]) - AC_MSG_ERROR(quitting) - ]) -fi -dnl factory needs to know: -AC_SUBST(BUILD_ntl) - -AC_LANG(C++) -AC_CHECK_HEADER(frobby.h,LIBS="-lfrobby $LIBS",BUILD_frobby=yes) -if test $BUILD_frobby = yes -then BUILTLIBS="-lfrobby $BUILTLIBS" - dnl uncomment this to [1] when frobby is built from a submodule (?) - dnl AC_DEFINE([HAVE_FROBBY_VERSION], [0], [whether frobby has frobby_version]) -else - AC_MSG_CHECKING([whether frobby has frobby_version]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#include ], [frobby_version])], - [AC_MSG_RESULT([yes]) && AC_DEFINE([HAVE_FROBBY_VERSION], [1], [whether frobby has frobby_version])], - [AC_MSG_RESULT([no])]) -fi - -############################################################################# - -PROGLIST=" $PROGLIST " -AC_ARG_WITH(unbuilt-programs, - [AS_HELP_STRING(--with-unbuilt-programs=...,list of programs not to build from downloaded source code (e.g., $PROGLIST))], - [for i in $withval - do case $PROGLIST in - *" $i "*) eval BUILD_$i=no ;; - *) AC_MSG_ERROR(unrecognized program name: $i) ;; - esac - done]) - -AC_SUBST(DOWNLOAD,no) -AC_ARG_ENABLE(download, AS_HELP_STRING(--enable-download,enable automatic downloading of needed third-party libraries), DOWNLOAD=$enableval) -AC_CHECK_PROGS(WGET,wget,false) -AC_CHECK_PROGS(CURL,curl,false) -if test $DOWNLOAD = yes -then if test "$WGET" = false -a "$CURL" = false; then AC_MSG_ERROR(wget or curl is required); fi -fi - -# the order of these segments also reflects dependencies -AC_LANG(C) -AC_SEARCH_LIBS(tgoto,curses tinfo ncurses,,AC_MSG_ERROR([[not found: library containing symbol tgoto; tried libcurses, libncurses, and libtinfo)]])) -if test $BUILD_readline = no -then AC_CHECK_HEADER(readline/readline.h,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(rl_set_prompt,readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(rl_completion_matches,readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(readline,readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then AC_SEARCH_LIBS(add_history,history readline,,BUILD_readline=yes) -fi -if test $BUILD_readline = no -then # readline on Mac OS X is stuck at version 4.2, which has this bug: - # CTRL-A doesn't go all the way to the beginning of the - # line after typing r e s o TAB C-a - # So we build it ourselves. - AC_LANG(C) - AC_MSG_CHECKING([whether readline library is new enough (version at least 6)]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main () { return ! ( RL_READLINE_VERSION >= 6 * 0x100 ) ; }]])], - [ AC_MSG_RESULT([yes]) ], - [ AC_MSG_RESULT([no, will build it]) ; BUILD_readline=yes ], - [ AC_MSG_RESULT([cross-compiling, test not possible]) ]) -fi -if test $BUILD_readline = no -then AC_CHECK_DECL(rl_catch_signals,,BUILD_readline=yes,[ - #include - #include - ]) -fi -if test $BUILD_readline = yes -then AC_MSG_NOTICE(readline library will be compiled) - BUILTLIBS="-lreadline -lhistory $BUILTLIBS" -fi - -AC_ARG_WITH([system-memtailor], - [AS_HELP_STRING([--with-system-memtailor], - [use system memtailor instead of building git submodule])],, - [with_system_memtailor=no]) -if test $with_system_memtailor = no -then - BUILD_memtailor=yes - BUILTLIBS="-lmemtailor $BUILTLIBS" -else AC_LANG(C++) - AC_SEARCH_LIBS(MEMTAILOR_VERSION_STRING,memtailor,,BUILD_memtailor=yes) - AC_CHECK_HEADER(memtailor.h,,BUILD_memtailor=yes) -fi - -AC_ARG_WITH([system-mathic], - [AS_HELP_STRING([--with-system-mathic], - [use system mathic instead of building git submodule])],, - [with_system_mathic=no]) -if test $with_system_mathic = no -then - BUILD_mathic=yes - BUILTLIBS="-lmathic $BUILTLIBS" -else AC_LANG(C++) - AC_SEARCH_LIBS(MATHIC_VERSION_STRING,mathic,,BUILD_mathic=yes) - AC_CHECK_HEADER(mathic.h,,BUILD_mathic=yes) -fi - -AC_ARG_WITH([system-mathicgb], - [AS_HELP_STRING([--with-system-mathicgb], - [use system mathicgb instead of building git submodule])],, - [with_system_mathicgb=no]) -if test $with_system_mathicgb = no -then - BUILD_mathicgb=yes - BUILTLIBS="-lmathicgb $BUILTLIBS" -else AC_LANG(C++) - AC_SEARCH_LIBS(MATHICGB_VERSION_STRING,mathicgb,,BUILD_mathicgb=yes) - AC_CHECK_HEADER(mathicgb.h,,BUILD_mathicgb=yes) -fi - -if test $BUILD_gtest = no -then - CHECK_GTEST - if test $have_gtest = yes - then - CPPFLAGS="$GTEST_CPPFLAGS $CPPFLAGS" - GTEST_PATH=$GTEST_SOURCE - AC_MSG_NOTICE(we have found gtest) - else - BUILD_gtest=yes - GTEST_PATH="\$(BUILTLIBPATH)/include/gtest" - AC_MSG_NOTICE(we will build gtest) - fi -else - GTEST_PATH="\$(BUILTLIBPATH)/include/gtest" -fi -AC_SUBST(GTEST_PATH) - -AC_SUBST(PYTHON,no) -AC_ARG_WITH(python, AS_HELP_STRING(--with-python@<:@=3.x@:>@., - [link with libpython. If the version number is not specified, then the - system's default version will be detected.]), PYTHON=$withval) -if test $PYTHON != no -then AC_DEFINE(WITH_PYTHON,1,[whether we are linking with the python library]) - if test $PYTHON = yes - then - AC_CHECK_PROGS(PYTHON_BIN, python3, false) - else - AC_CHECK_PROGS(PYTHON_BIN, python$PYTHON, false) - PYTHON=yes - fi - if test $PYTHON_BIN = false - then - AC_MSG_ERROR([could not find python]) - else - PYTHON_VERSION=`$PYTHON_BIN -c \ - "from sys import version_info; \ - print('%d.%d' % (version_info.major, version_info.minor))"` - fi - PYTHON_INCLUDE_DIR=`$PYTHON_BIN -c \ - "from sysconfig import get_config_var; \ - print(get_config_var('CONFINCLUDEPY'))"` - CPPFLAGS="$CPPFLAGS -I$PYTHON_INCLUDE_DIR" - AC_CHECK_HEADER(Python.h,,AC_MSG_ERROR(Python.h not found)) - AC_SEARCH_LIBS(Py_Initialize, - python${PYTHON_VERSION} python${PYTHON_VERSION}m,, - AC_MSG_ERROR(libpython not found)) -fi - -dnl boost 1.65 was the first release containing the stacktrace library -AX_BOOST_BASE([1.65],, - [AC_MSG_ERROR([boost library >= 1.65 not installed, but required])]) -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - -AC_MSG_CHECKING([whether the Boost::Stacktrace library is available]) -AC_LANG(C++) -SAVECPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS -DBOOST_STACKTRACE_LINK" -SAVELIBS=$LIBS -FOUND_stacktrace_library=no -for stacktrace_library in backtrace addr2line -do - LIBS="$SAVELIBS -lboost_stacktrace_${stacktrace_library}" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([#include - ], [boost::stacktrace::stacktrace();])], - [AC_MSG_RESULT([yes, boost_stacktrace_${stacktrace_library}]) - FOUND_stacktrace_library=yes - break],) -done -if test $FOUND_stacktrace_library = no -then - AC_MSG_RESULT([no, will use header-only library]) - CPPFLAGS=$SAVECPPFLAGS - LIBS=$SAVELIBS -fi - -AX_BOOST_REGEX -LIBS="$LIBS $BOOST_REGEX_LIB" - -AC_CHECK_HEADERS([boost/math/special_functions.hpp], [], - [AC_MSG_ERROR([Boost Math Toolkit not available])]) -AC_SEARCH_LIBS([ldexpq], [quadmath]) - -AC_SUBST(ULIMIT_T,yes) -AC_SUBST(ULIMIT_M,yes) -AC_SUBST(ULIMIT_V,yes) -AC_SUBST(ULIMIT_S,yes) -( ulimit -t 2000 2>/dev/null) || ULIMIT_T=no -( ulimit -m 2000 2>/dev/null) || ULIMIT_M=no -( ulimit -v 2000 2>/dev/null) || ULIMIT_V=no -( ulimit -s 2000 2>/dev/null) || ULIMIT_S=no - -if test $BUILD_atomic_ops = no -then AC_MSG_CHECKING(whether package atomic_ops is provided) - if [ pkg-config --exists atomic_ops ] - then AC_MSG_RESULT(yes) - CPPFLAGS="`pkg-config --cflags-only-I atomic_ops | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - else AC_MSG_RESULT([no, will be built from downloaded sources]) - BUILD_atomic_ops=yes - fi -fi - -# test for fflas_ffpack -if test $BUILD_fflas_ffpack = no -then AC_MSG_CHECKING([for fflas_ffpack library, version at least 2]) - if command -v fflas-ffpack-config && test "`fflas-ffpack-config --decimal-version`" -gt 20000 - then AC_MSG_RESULT(found) - FFLAS_FFPACK_CXXFLAGS=$(for x in $(fflas-ffpack-config --cflags 2>&1) ; do case $x in (-I*) /bin/echo -n "$x " ;; esac done) - AC_MSG_NOTICE([adding fflas_ffpack flags $FFLAS_FFPACK_CXXFLAGS]) - M2_CXXFLAGS="$M2_CXXFLAGS $FFLAS_FFPACK_CXXFLAGS" - LIBS="$LIBS `fflas-ffpack-config --libs`" dnl note: this might add "-Xpreprocessor -fopenmp" to LIBS, and that will confuse libtool - LIBS=`echo $LIBS | sed 's/-Xpreprocessor -fopenmp//'` - else AC_MSG_RESULT(not found, will build) - BUILD_fflas_ffpack=yes - fi -fi - -AC_SUBST(ENABLE_LINBOX,no) -AC_ARG_ENABLE(linbox, - [AS_HELP_STRING(--enable-linbox,enable building the linbox library and linking with it)], - AC_DEFINE(HAVE_LINBOX,1,[whether we are linking with the linbox library]) - BUILD_linbox=yes - ENABLE_LINBOX=yes - ) - -AC_SUBST(ENABLE_FPLLL,no) -AC_ARG_ENABLE(fplll, - [AS_HELP_STRING(--enable-fplll,[enable building the fplll library and linking with it])], - AC_DEFINE(HAVE_FPLLL,1,[whether we are linking with the fplll library]) - BUILD_fplll=yes - ENABLE_FPLLL=yes - ) - -test $BUILD_linbox = yes && BUILTLIBS="-llinbox $BUILTLIBS" -test $BUILD_fplll = yes && BUILTLIBS="-lfplll $BUILTLIBS" - -SINGULARLIBS="-lfactory " -if test $BUILD_factory = no -then - AC_MSG_CHECKING([whether factory library is installed]) - FACTORY_MINVERSION=4.2.0 - if $PKG_CONFIG --exists "factory >= $FACTORY_MINVERSION" - then - FACTORY_NAME=factory - AC_MSG_RESULT([yes ($FACTORY_NAME)]) - elif $PKG_CONFIG --exists "singular-factory >= $FACTORY_MINVERSION" - then - FACTORY_NAME=singular-factory - AC_MSG_RESULT([yes ($FACTORY_NAME)]) - elif $PKG_CONFIG --exists factory || $PKG_CONFIG --exists singular-factory - then - BUILD_factory=yes - FACVER=`pkg-config --modversion factory` - AC_MSG_RESULT([yes, version $FACVER is installed, but version $FACTORY_MINVERSION is required: will build]) - else - BUILD_factory=yes - AC_MSG_RESULT([no; will build]) - fi -fi -if test $BUILD_factory = no -then - LIBS="`$PKG_CONFIG --libs $FACTORY_NAME` $LIBS" - CPPFLAGS="`$PKG_CONFIG --cflags $FACTORY_NAME` $CPPFLAGS" -else - BUILTLIBS="$SINGULARLIBS $BUILTLIBS" -fi - -AC_ARG_VAR([GFTABLESDIR], - [path to gftables directory if factory is already installed]) -if test $BUILD_factory = yes -then - BUILD_gftables=yes - GFTABLESDIR="${datadir}/Macaulay2/Core/factory/" -else - BUILD_gftables=no - if test x$GFTABLESDIR = x - then - if test $FACTORY_NAME = factory - then - GFTABLESDIR="`$PKG_CONFIG --variable=prefix $FACTORY_NAME`/share/factory/" - else - GFTABLESDIR="`$PKG_CONFIG --variable=prefix $FACTORY_NAME`/share/singular/factory/" - fi - fi - adl_RECURSIVE_EVAL([$GFTABLESDIR], [GFTABLESDIR]) - AC_CHECK_FILE([${GFTABLESDIR}gftables/961],, - [AC_MSG_ERROR([could not find gftables but we are not building factory; try specifying the directory with GFTABLESDIR])]) - FILE_PREREQS="$FILE_PREREQS ${GFTABLESDIR}gftables/961" -fi - -if test $BUILD_factory = no -then - AC_MSG_CHECKING([whether factory was built with --enable-streamio]) - AC_LANG([C++]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [ - #include - #include - ], - [Variable x; x = Variable(); std::cout << x])], - [AC_MSG_RESULT([yes]) - AC_DEFINE([FACTORY_STREAMIO], [1]) - ], - [AC_MSG_RESULT([no]) - AC_DEFINE([FACTORY_STREAMIO], [0])]) -else AC_DEFINE([FACTORY_STREAMIO], [1], [whether factory was built with --enable-streamio]) -fi - -AC_SUBST(LINALGLIBS) - -# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds -# one of them to $LIBS, making it impossible to check for the presence of C or -# C++ libraries. (I'm not sure why putting -llapack on the gcc command line -# needlessly causes the library to be linked against.) -FORTRANUSED=no -if test $BUILD_lapack = yes -then if test $USE_FCLIBS != no - then LIBS="$FCLIBS $LIBS" - fi -else lapack_found=no - blas_found=no - AC_MSG_CHECKING([whether the Accelerate framework for lapack is available]) - LINALGLIBS="-framework Accelerate" - SAVELIBS=$LIBS LIBS="$LINALGLIBS $LIBS" - AC_LANG(C) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])], - [USE_FCLIBS=no; blas_found=yes; lapack_found=yes; AC_MSG_RESULT(yes)], - [LINALGLIBS= LIBS=$SAVELIBS; AC_MSG_RESULT(no)]) - if test $blas_found = no - then AC_MSG_CHECKING([whether package blas is provided (by pkg-config)]) - if pkg-config --exists blas - then AC_MSG_RESULT(yes) - blas_found=yes - BLASLIBS=`pkg-config --libs blas` - LIBS="$BLASLIBS $LIBS" - CPPFLAGS="`pkg-config --cflags-only-I blas | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - AC_SEARCH_LIBS(sgemv_,,,AC_MSG_ERROR(blas function sgemv_ not found with $BLASLIBS)) - else AC_MSG_RESULT(no) - fi - fi - if test $lapack_found = no - then AC_MSG_CHECKING([whether package lapack is provided (by pkg-config)]) - if pkg-config --exists lapack - then AC_MSG_RESULT(yes) - lapack_found=yes - LAPACKLIBS="`pkg-config --libs lapack`" - LIBS="$LAPACKLIBS $LIBS" - CPPFLAGS="`pkg-config --cflags-only-I lapack | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` $CPPFLAGS" - AC_SEARCH_LIBS(dgetrf_,,,AC_MSG_ERROR(lapack function dgetrf_ not found with $LAPACKLIBS)) - else AC_MSG_RESULT(no) - fi - fi - if test $USE_FCLIBS != no - then LIBS="$FCLIBS $LIBS"; added_fclibs=yes - fi - if test $blas_found = no - then AC_SEARCH_LIBS(sgemv_,refblas blas f77blas atlcblas, - blas_found=yes - if test "none required" != "$ac_cv_search_sgemv_" - then BLASLIBS=$ac_cv_search_sgemv_ - fi - ) - # we've been told that both f77blas and atlcblas are needed. If so, fix this somehow. - fi - if test $lapack_found = no - then AC_SEARCH_LIBS(dgetrf_,lapack atllapack, - lapack_found=yes - if test "none required" != "$ac_cv_search_dgetrf_" - then LAPACKLIBS=$ac_cv_search_dgetrf_ - fi - ) - fi - if test $blas_found = no -o $lapack_found = no - then BUILD_lapack=yes - LINALGLIBS="$LINALGLIBS -llapack -lrefblas" - else LINALGLIBS="$LINALGLIBS $LAPACKLIBS $BLASLIBS" - fi -fi - -if test $BUILD_lapack = yes -then if test $added_fclibs != yes - then LIBS="$FCLIBS $LIBS" - fi - LINALGLIBS="$LINALGLIBS -llapack -lrefblas" - dnl we'll need the fortran compiler to be present to compile lapack - FORTRANUSED=yes - if test "$FC" = "" - then AC_MSG_ERROR([no fortran compiler found (FC not set)]) - else AC_MSG_NOTICE(using fortran compiler $FC) - fi -fi - -dnl This code doesn't seem to be needed, and it wasn't ever working, anyway: -dnl if test $BUILD_lapack = yes -dnl then # test whether the fortran compiler can handle lapack, which, starting with -dnl # version 3.2, requires fortran 90, not fortran 77 -dnl AC_LANG(Fortran) -dnl AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack]) -dnl AC_COMPILE_IFELSE([intrinsic maxloc], dnl this is said to be a Fortran 90 feature -dnl AC_MSG_RESULT(yes), -dnl AC_MSG_RESULT(no)) -dnl fi - -test "$USE_FCLIBS" = no && FCLIBS= -test "$FORTRANUSED" = no && FCLIBS= - -AC_LANG(C) - -dnl The installation of libxml2 under Mac OS X is problematic: -dnl (1) Starting with Mac OS X 10.15, /usr/include is not present. The compilers look in -dnl /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include instead. It's a good idea -dnl not to depend on that. -dnl (2) The libraries own include files have lines like this: -dnl #include -dnl but the files is found at this path -dnl /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2/libxml/xmlexports.h -dnl Combine (1) and (2) and we conclude that somehow we have to get this option on the compiler command line: -dnl -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2 -dnl Ubuntu doesn't have this problem, because the configuration is done correctly: -dnl $ pkg-config --cflags libxml-2.0 -dnl -I/usr/include/libxml2 -dnl , and we can just use that. Homebrew tries to emulate that by providing pkg-config files that provide the -dnl same value, but as we said above, /usr/include is not present, so that doesn't work! -dnl -dnl The solution seems to be to use the C preprocessor to obtain the path to the file libxml include files, and -dnl to use that to automatically add the correct option to CPPFLAGS. This assumes the system allows -dnl #include -dnl to work, but not -dnl #include -dnl , so we test those two lines early. -dnl -if pkg-config --exists libxml-2.0 -then XML_INCLUDE=`pkg-config --cflags-only-I libxml-2.0 | sed -e 's=^-I/=-isystem /=g' -e 's= -I/= -isystem /=g'` - if test "$XML_INCLUDE" - then AC_MSG_NOTICE([pkg-config: will search for include files also in $XML_INCLUDE]) - CPPFLAGS="$XML_INCLUDE $CPPFLAGS" - fi -fi - -AC_CHECK_HEADER(libxml/xmlexports.h,, - dnl if it's not found, it might be here: - AC_CHECK_HEADERS(libxml2/libxml/xmlexports.h) - AC_LANG(C) - AC_PREPROC_IFELSE( - [AC_LANG_SOURCE([[ - #include - ]])], - [ LIBXML_LOCATION=` grep libxml2/libxml/xmlexports.h conftest.i | sed 's=.* "\(.*\)/libxml/xmlexports.h.*=\1=' ` - if test -z "$LIBXML_LOCATION" - then AC_MSG_WARN([failed to extract path to libxml from preprocessor output:]) - dnl perhaps this happens when libxml2 is a symbolic link and the preprocessor unpacks it - sed 's/^/| /' &1 | grep demangle >/dev/null - then NM_DEMANGLES=yes; AC_MSG_RESULT(yes) - else NM_DEMANGLES=no ; AC_MSG_RESULT(no) -fi - -AC_LANG(C) -AC_MSG_CHECKING([whether getaddrinfo can handle numeric service (port) numbers]) -AC_RUN_IFELSE([AC_LANG_SOURCE([ - #include - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_WINSOCK2_H - #include - #endif - #ifdef HAVE_NETDB_H - #include - #endif - int main(void) { - struct addrinfo *addr; - return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ; - } - ])], - [AC_DEFINE_UNQUOTED(GETADDRINFO_WORKS,1,[whether getaddrinfo can handle numeric service (port) numbers])] [AC_MSG_RESULT(yes)], - [if test $? = 99 ; then AC_MSG_RESULT(no) ; else AC_MSG_ERROR([test file failed to compile]) ; fi], - [AC_DEFINE_UNQUOTED(GETADDRINFO_WORKS,1,[whether getaddrinfo can handle numeric service (port) numbers])] [AC_MSG_RESULT([probably (cross-compiling, not tested)])]) - -AC_SUBST(BUILDLIST) -for i in $LIBLIST $PROGLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDLIST="$BUILDLIST $i" -done - -AC_SUBST(BUILDLIBLIST) -for i in $LIBLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDLIBLIST="$BUILDLIBLIST $i" -done - -AC_SUBST(BUILDSUBLIST) -for i in $SUBLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDSUBLIST="$BUILDSUBLIST $i" -done - -AC_SUBST(BUILDPROGLIST) -for i in $PROGLIST -do eval t=\$BUILD_$i - test "$t" = yes && BUILDPROGLIST="$BUILDPROGLIST $i" -done - -TESTFLAG=-Wframe-address -AC_MSG_CHECKING(whether $CC accepts $TESTFLAG) -AC_SUBST(HAVE_WFRAME_ADDRESS) -SAVE=$CFLAGS -CFLAGS="-Werror $TESTFLAG $CFLAGS" -AC_LANG(C) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], M2_CFLAGS="$M2_CFLAGS $TESTFLAG" HAVE_WFRAME_ADDRESS=yes, HAVE_WFRAME_ADDRESS=no) -CFLAGS=$SAVE -AC_MSG_RESULT($HAVE_WFRAME_ADDRESS) - -TESTFLAG=-Wstrict-aliasing -AC_MSG_CHECKING(whether $CC accepts $TESTFLAG) -AC_SUBST(HAVE_WSTRICT_ALIASING) -SAVE=$CFLAGS -CFLAGS="$TESTFLAG -Werror $CFLAGS" -AC_LANG(C) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], M2_CFLAGS="$M2_CFLAGS $TESTFLAG" HAVE_WSTRICT_ALIASING=yes, HAVE_WSTRICT_ALIASING=no) -CFLAGS=$SAVE -AC_MSG_RESULT($HAVE_WSTRICT_ALIASING) - -TESTFLAG=-Wincompatible-pointer-types-discards-qualifiers -AC_MSG_CHECKING(whether $CC accepts $TESTFLAG) -AC_SUBST(HAVE_WDISCARDS_QUALIFIERS) -SAVE=$CFLAGS -CFLAGS="$TESTFLAG -Werror $CFLAGS" -AC_LANG(C) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], M2_CFLAGS="$M2_CFLAGS $TESTFLAG" HAVE_WDISCARDS_QUALIFIERS=yes, HAVE_WDISCARDS_QUALIFIERS=no) -CFLAGS=$SAVE -AC_MSG_RESULT($HAVE_WDISCARDS_QUALIFIERS) - -AC_MSG_CHECKING(whether $CC accepts -Wfatal-errors) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wfatal-errors -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - M2_CFLAGS="$M2_CFLAGS -Wfatal-errors" - AC_MSG_RESULT(yes, adding -Wfatal-errors to flags), - AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -dnl Always check for the option that turns the warning on, because gcc doesn't complain -dnl about invalid options that turn off warnings, if there are no warnings to be issued anyway. -dnl It's a feature, not a bug! -dnl On the other hand, clang does complain! - -AC_MSG_CHECKING(whether $CXX accepts -Wmismatched-tags) -AC_LANG(C++) -SAVE=$CXXFLAGS -CXXFLAGS="$CXXFLAGS -Wmismatched-tags -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - CXXFLAGS=$SAVE - CXXFLAGS="$CXXFLAGS -Wno-mismatched-tags" - dnl We don't like seeing this warning, especially from the "clang++" compiler, because - dnl we like using "struct" and "class" interchangeably. - AC_MSG_RESULT([[yes, adding -Wno-mismatched-tags to flags]]), - CXXFLAGS=$SAVE - AC_MSG_RESULT(no)) - -dnl we should make a macro for this test -AC_MSG_CHECKING(whether $CC accepts -Wunused-but-set-variable) -AC_SUBST(HAVE_WUNUSED_BUT_SET_VARIABLE) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WUNUSED_BUT_SET_VARIABLE=yes; AC_MSG_RESULT(yes), - HAVE_WUNUSED_BUT_SET_VARIABLE=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING(whether $CC accepts -Wsometimes-uninitialized) -AC_SUBST(HAVE_WSOMETIMES_UNINITIALIZED) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wsometimes-uninitialized -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WSOMETIMES_UNINITIALIZED=yes; AC_MSG_RESULT(yes), - HAVE_WSOMETIMES_UNINITIALIZED=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING(whether $CC accepts -Wmaybe-uninitialized) -AC_SUBST(HAVE_WMAYBE_UNINITIALIZED) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wmaybe-uninitialized -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WMAYBE_UNINITIALIZED=yes; AC_MSG_RESULT(yes), - HAVE_WMAYBE_UNINITIALIZED=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING(whether $CC accepts -Wparentheses-equality) -AC_SUBST(HAVE_WPARENTHESES_EQUALITY) -AC_LANG(C) -SAVE=$CFLAGS -CFLAGS="$CFLAGS -Wparentheses-equality -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WPARENTHESES_EQUALITY=yes; AC_MSG_RESULT(yes), - HAVE_WPARENTHESES_EQUALITY=no ; AC_MSG_RESULT(no)) -CFLAGS=$SAVE - -AC_MSG_CHECKING([whether $CC accepts -Wl,-z,noexecstack]) -AC_SUBST(HAVE_WL_X_NOEXECSTACK) -AC_LANG(C) -SAVE=$LDFLAGS -LDFLAGS="$LDFLAGS -Wl,-z,noexecstack -Werror" -AC_LINK_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WL_X_NOEXECSTACK=yes; AC_MSG_RESULT(yes), - HAVE_WL_X_NOEXECSTACK=no ; AC_MSG_RESULT(no)) -LDFLAGS=$SAVE - -AC_MSG_CHECKING([whether $CC accepts -Wl,--enable-auto-import]) -AC_SUBST(HAVE_WL_ENABLE_AUTO_IMPORT) -AC_LANG(C) -SAVE=$LDFLAGS -LDFLAGS="$LDFLAGS -Wl,--enable-auto-import -Werror" -AC_LINK_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WL_ENABLE_AUTO_IMPORT=yes; AC_MSG_RESULT(yes), - HAVE_WL_ENABLE_AUTO_IMPORT=no ; AC_MSG_RESULT(no)) -LDFLAGS=$SAVE - -AC_MSG_CHECKING([whether $CC accepts -Wl,-Map,conftest.mapfile]) -AC_SUBST(HAVE_WL_MAP) -AC_LANG(C) -SAVE=$LDFLAGS -LDFLAGS="$LDFLAGS -Wl,-Map,conftest.mapfile -Werror" -AC_LINK_IFELSE([AC_LANG_SOURCE([int main() {}])], - HAVE_WL_MAP=yes; AC_MSG_RESULT(yes), - HAVE_WL_MAP=no ; AC_MSG_RESULT(no)) -rm -f conftest.mapfile -LDFLAGS=$SAVE - -AC_SUBST(DUMPDATAFILE,Macaulay2-$ARCH-data) - -test "$MEMDEBUG" = yes && M2_CPPFLAGS="$M2_CPPFLAGS -DMEMDEBUG" - -if test "$OS" = MacOS -then - # we don't know what this does, but some apple documentation writers seem to like it: - LDFLAGS="$LDFLAGS -bind_at_load" - - # this one makes it find and use our readline.a first, even if there is a file readline.dylib in /usr/lib - # the point is that the system's readline.dylib might be much older and conflict with our newer one - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" -fi - -AC_SUBST(package,Macaulay2-$PACKAGE_VERSION) - -# The suffix "-binary" distinguishes the binary program M2-binary from the shell script M2. -# The purpose of the shell script M2 is to set LD_LIBRARY_PATH appropriately. -AC_SUBST(EXE,-binary$M2SUFFIX$EXEEXT) - -AC_SUBST(DESC,$PACKAGE_VERSION-$host_cpu-$OS-$REL) -# we used to use @ ARCH @ instead of @ host_cpu @ here, but for DEC alphas, -# and perhaps other machines, it gives more information. The script -# config.guess assembles host_cpu from /proc/cpuinfo, and can be something -# like "alphaev6" or "alphaev56", but ARCH, which is determined from 'uname' -# by the 'configure' script, will be simply "alpha". - -AC_MSG_NOTICE([using BUILDLIBLIST = $BUILDLIBLIST]) -AC_MSG_NOTICE([using BUILDSUBLIST = $BUILDSUBLIST]) -AC_MSG_NOTICE([using BUILDPROGLIST = $BUILDPROGLIST]) -AC_MSG_NOTICE([using BUILDLIST = $BUILDLIST]) -AC_MSG_NOTICE([using BUILD_ALWAYS = $BUILD_ALWAYS]) -AC_MSG_NOTICE([using FILE_PREREQS = $FILE_PREREQS]) -AC_MSG_NOTICE([link using:]) -dnl the order of this list should agree with that in Macaulay2/bin/Makefile.in -AC_MSG_NOTICE([ BUILTLIBS = $BUILTLIBS]) -AC_MSG_NOTICE([ LINALGLIBS = $LINALGLIBS]) -AC_MSG_NOTICE([ LIBS = $LIBS]) -AC_MSG_NOTICE([ FCLIBS = $FCLIBS]) -AC_MSG_NOTICE([using CC = $CC]) -AC_MSG_NOTICE([using CPP = $CPP]) -AC_MSG_NOTICE([using CPPFLAGS = $CPPFLAGS]) -AC_MSG_NOTICE([using CFLAGS = $CFLAGS]) -AC_MSG_NOTICE([using CXX = $CXX]) -AC_MSG_NOTICE([using CXXFLAGS = $CXXFLAGS]) -AC_MSG_NOTICE([using FC = $FC]) -AC_MSG_NOTICE([using AR = $AR]) -AC_MSG_NOTICE([using RANLIB = $RANLIB]) -AC_MSG_NOTICE([using LDFLAGS = $LDFLAGS]) -AC_MSG_NOTICE([using BLASLIBS = $BLASLIBS]) -AC_MSG_NOTICE([using LAPACKLIBS = $LAPACKLIBS]) -AC_MSG_NOTICE([using LIBS_GDBM = $LIBS_GDBM]) -AC_MSG_NOTICE([using LIBS_GLPK = $LIBS_GLPK]) -AC_MSG_NOTICE([using LIBS_GMP = $LIBS_GMP]) -AC_MSG_NOTICE([using CC_FOR_BUILD = $CC_FOR_BUILD]) -AC_MSG_NOTICE([with ISSUE = $ISSUE]) -AC_MSG_NOTICE([with NODENAME = $NODENAME]) -AC_MSG_NOTICE([with OS REL = $OS $REL]) -AC_MSG_NOTICE([with ARCH = $ARCH]) -AC_MSG_NOTICE([with OPTIMIZE = $OPTIMIZE]) -AC_MSG_NOTICE([with DEBUG = $DEBUG]) -AC_MSG_NOTICE([with GIT_DESCRIPTION = $GIT_DESCRIPTION]) -AC_MSG_NOTICE([with USING_MPIR = $USING_MPIR]) -AC_MSG_NOTICE([with DOCUMENTATION = $DOCUMENTATION]) - -subset() { - # whether the words of $1 are among the words of $2 - y=" $2 " - for i in $1 - do case "$y" in - *" $i "*) ;; - *) return 1 ;; - esac - done - return 0 -} - -complement() { - # the words of $1 not among the words of $2 - y=" $2 " - for i in $1 - do case "$y" in - *" $i "*) ;; - *) /bin/echo -n "$i " ;; - esac - done - echo -} - - -BUILDING=yes -AC_ARG_ENABLE(building, AS_HELP_STRING(--disable-building,disable automatic building of libraries), BUILDING=$enableval) -# This option looks useless, but it allows us to test the configure script. After we build the libraries, we -# run the configure script again, and it should detect the ones we've built. -subset "$BUILDLIBLIST" "$BUILD_ALWAYS" -sub=$? -if test "$BUILDING" = no -a $sub = 1 -then c=`complement "$BUILDLIBLIST" "$BUILD_ALWAYS"` - AC_MSG_ERROR([ *** - automatic building of libraries disabled, but some must be built: $c]) -fi - -# Here we insert autoconf's default values so we can compute the relative locations in the directory tree -test "$prefix" || prefix=/usr/local - -# for some distributions, we know what the prefix should be: -test "$DEB" = yes && test "$prefix" != /usr && - AC_MSG_ERROR(--enable-deb specified and --prefix not set to /usr) -test "$RPM" = yes && test "$prefix" != /usr && - AC_MSG_ERROR(--enable-rpm specified and --prefix not set to /usr) - -if test "$prefix" != /usr/local -then test "$FREEBSD" = yes && AC_MSG_ERROR(--enable-freebsd specified and --prefix not set to /usr/local) -fi - -# these are the variables that make their way into autoconf after version 2.59 -test "$datarootdir" || AC_SUBST(datarootdir,'${prefix}/share') -test "$docdir" || AC_SUBST(docdir,'${datarootdir}/doc/${PACKAGE_TARNAME}') -test "$dvidir" || AC_SUBST(dvidir,'${docdir}') -test "$htmldir" || AC_SUBST(htmldir,'${docdir}') -test "$pdfdir" || AC_SUBST(pdfdir,'${docdir}') -test "$psdir" || AC_SUBST(psdir,'${docdir}') -test "$localedir" || AC_SUBST(localedir,'${datarootdir}/locale') - -AC_ARG_WITH([emacsdir], - [AS_HELP_STRING([--with-emacsdir=...], - [set installation directory for installing Emacs Lisp files; - must begin with ${prefix} or ${exec_prefix}])], - [emacsdir=$withval], - [emacsdir=${datarootdir}/emacs/site-lisp/macaulay2]) -AC_SUBST(emacsdir) - -# Here we normalize all the configure variables so each one begins either with ${prefix} or with ${exec_prefix}, -# so they can be handled more simply in Macaulay2, by a single text replacement. -save_prefix=$prefix -save_exec_prefix=$exec_prefix -prefix=NONE -exec_prefix=NOWHERE -# Here we normalize almost everything. -# We put docdir and datarootdir at end, because we are changing the values of the variables, and -# other variables depend on them. -# We don't normalize sysconfdir, sharedstatedir, and localstatedir, because Fedora -# insists in /usr/share/config.site that they be /etc, /var, and /var, respectively. -# We don't use those directories, anyway. To ensure that, we set them to /nowhere. -# (We could avoid config.site with the CONFIG_SITE environment variable.) -sysconfdir=/nowhere -sharedstatedir=/nowhere -localstatedir=/nowhere -for i in bindir datadir includedir infodir libdir libexecdir mandir sbindir \ - psdir pdfdir dvidir htmldir localedir GFTABLESDIR docdir datarootdir \ - emacsdir -do eval w=\$$i ; eval v="$w" ; eval v="$v" ; eval v="$v" ; eval v="$v" ; eval v="$v" - case $v in - "$exec_prefix"|"$exec_prefix"/*) - eval tail_${i}=`echo $v | sed s,"^$exec_prefix/","",` - eval pre_${i}=`echo $v | sed s,"^$exec_prefix","'\\${pre_exec_prefix}'",` - eval ${i}=`echo $v | sed s,"^$exec_prefix","'\\${exec_prefix}'",` - ;; - "$prefix"|"$prefix"/*) - eval tail_${i}=`echo $v | sed s,"^$prefix/","",` - eval pre_${i}=`echo $v | sed s,"^$prefix","'\\${pre_prefix}'",` - eval ${i}=`echo $v | sed s,"^$prefix","'\\${prefix}'",` - ;; - *) if test $i != GFTABLESDIR #only needs normalized if we build factory - then AC_MSG_ERROR([expected "\${$i}" => "$w" to start with "\${prefix}" or with "\${exec_prefix}"]) - fi ;; - esac -done -prefix=$save_prefix -exec_prefix=$save_exec_prefix - -if test $BUILD_gftables = no -then PRE_GFTABLESDIR="$GFTABLESDIR" -else -PRE_GFTABLESDIR="$pre_datadir/Macaulay2/Core/factory/" -fi -AC_SUBST(PRE_GFTABLESDIR) - -AC_SUBST(pre_bindir) dnl In Macaulay2/bin/M2.in we assume that $pre_bindir/.. is $pre_exec_prefix, which follows from pre_bindir=${pre_exec_prefix}/bin. -AC_SUBST(pre_datadir) -AC_SUBST(pre_includedir) -AC_SUBST(pre_infodir) -AC_SUBST(pre_libdir) -AC_SUBST(pre_libexecdir) -AC_SUBST(pre_localstatedir) -AC_SUBST(pre_mandir) -AC_SUBST(pre_sbindir) -AC_SUBST(pre_sharedstatedir) -AC_SUBST(pre_sysconfdir) -AC_SUBST(pre_psdir) -AC_SUBST(pre_pdfdir) -AC_SUBST(pre_dvidir) -AC_SUBST(pre_htmldir) -AC_SUBST(pre_localedir) -AC_SUBST(pre_docdir) -AC_SUBST(pre_datarootdir) -AC_SUBST(pre_emacsdir) - -AC_SUBST(tail_bindir) -AC_SUBST(tail_datadir) -AC_SUBST(tail_includedir) -AC_SUBST(tail_infodir) -AC_SUBST(tail_libdir) -AC_SUBST(tail_libexecdir) -AC_SUBST(tail_localstatedir) -AC_SUBST(tail_mandir) -AC_SUBST(tail_sbindir) -AC_SUBST(tail_sharedstatedir) -AC_SUBST(tail_sysconfdir) -AC_SUBST(tail_psdir) -AC_SUBST(tail_pdfdir) -AC_SUBST(tail_dvidir) -AC_SUBST(tail_htmldir) -AC_SUBST(tail_localedir) -AC_SUBST(tail_docdir) -AC_SUBST(tail_datarootdir) -AC_SUBST(tail_emacsdir) - -AC_SUBST(MACHINE,"$ARCH-$OS-$ISSUE") -AC_DEFINE_UNQUOTED(MACHINE,"$MACHINE",[complete machine description (to appear in name of tar file)]) - -AC_SUBST(COMMONSTAGINGAREA,usr-dist) # staging area for common files -AC_SUBST(LOCALSTAGINGAREA,usr-dist) # staging area for arch. dep. files -AC_ARG_WITH(staging-area, - AS_HELP_STRING(--with-staging-area=...,directory for pre-installation of architecture-independent files (usr-dist)), - COMMONSTAGINGAREA=$withval) -AC_ARG_ENABLE(common-staging-area, - AS_HELP_STRING(--enable-common-staging-area,use the common staging area), - if test "$enableval" = yes - then if test "$COMMONSTAGINGAREA" != usr-dist - then AC_MSG_ERROR(--with-staging-area and --enable-common-staging-area options both provided) - fi - COMMONSTAGINGAREA=\${abs_top_srcdir}/BUILD/CommonStagingArea # this depends on config.Makefile.in setting abs_top_srcdir - fi - ) -[ -case `pwd` in - .) ;; - *) - case "$COMMONSTAGINGAREA" in - [\\/]* | ?:[\\/]* | '${abs'* );; - .) COMMONSTAGINGAREA=`pwd`;; - *) COMMONSTAGINGAREA=`pwd`/"$COMMONSTAGINGAREA";; - esac - case "$LOCALSTAGINGAREA" in - [\\/]* | ?:[\\/]* | '${abs'* );; - .) LOCALSTAGINGAREA=`pwd`;; - *) LOCALSTAGINGAREA=`pwd`/"$LOCALSTAGINGAREA";; - esac;; -esac -] -AC_SUBST(pre_prefix,$COMMONSTAGINGAREA/common) # as in layout.m2.in -AC_SUBST(pre_exec_prefix,$LOCALSTAGINGAREA/$MACHINE) # as in layout.m2.in -AC_MSG_NOTICE([staging area for common files: $pre_prefix]) -AC_MSG_NOTICE([staging area for architecture dependent files: $pre_exec_prefix]) - -# Here we define the Macaulay2 layout, once and for all. -# There is a hidden dependency: see M2/distributions/dmg/Makefile.in and adjust the number "../"s if the basic layout here is changed. - -AC_SUBST(packagesdir,$datadir/Macaulay2) -AC_SUBST(libm2dir,$libdir/Macaulay2) -AC_SUBST(librariesdir,$libm2dir/lib) -AC_SUBST(programsdir,$libexecdir/Macaulay2/bin) -AC_SUBST(licensesdir,$libexecdir/Macaulay2/program-licenses) -AC_SUBST(packagecachecoredir,$libm2dir/cache) - -AC_SUBST(tail_packagesdir,$tail_datadir/Macaulay2) -AC_SUBST(tail_libm2dir,$tail_libdir/Macaulay2) -AC_SUBST(tail_librariesdir,$tail_libm2dir/lib) -AC_SUBST(tail_programsdir,$tail_libexecdir/Macaulay2/bin) -AC_SUBST(tail_licensesdir,$tail_libexecdir/Macaulay2/program-licenses) -AC_SUBST(tail_packagecachecoredir,$tail_libm2dir/cache) - -AC_SUBST(pre_packagesdir,$pre_datadir/Macaulay2) -AC_SUBST(pre_libm2dir,$pre_libdir/Macaulay2) -AC_SUBST(pre_librariesdir,$pre_libm2dir/lib) -AC_SUBST(pre_programsdir,$pre_libexecdir/Macaulay2/bin) -AC_SUBST(pre_licensesdir,$pre_libexecdir/Macaulay2/program-licenses) -AC_SUBST(pre_packagecachecoredir,$pre_libm2dir/cache) - -AC_OUTPUT - -dnl Local Variables: -dnl mode: autoconf -dnl compile-command: "make -f Makefile " -dnl End: diff -Nru macaulay2-1.22~rc1+ds/.pc/skip-failing-core-tests.patch/M2/Macaulay2/tests/ComputationsBook/Makefile.in macaulay2-1.22+ds/.pc/skip-failing-core-tests.patch/M2/Macaulay2/tests/ComputationsBook/Makefile.in --- macaulay2-1.22~rc1+ds/.pc/skip-failing-core-tests.patch/M2/Macaulay2/tests/ComputationsBook/Makefile.in 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/skip-failing-core-tests.patch/M2/Macaulay2/tests/ComputationsBook/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# @configure_input@ -include ../../../include/config.Makefile -VPATH = @srcdir@ -CHAPTERS = completeIntersections constructions d-modules exterior-algebra geometry \ - monomialIdeals preface programming schemes solving toricHilbertScheme varieties -.PHONY: changes capture -all: -$(CHAPTERS):; $(MKDIR_P) "$@" -check capture changes :: Makefile.chapter $(CHAPTERS) -$(foreach d,$(CHAPTERS), \ - $(eval capture check ::; + @echo "testing: ComputationsBook::$d"; \ - $(MAKE) --no-print-directory -C $d -I .. $$@) \ - $(eval changes::; diff -u @srcdir@/$d/chapter.m2 @srcdir@/$d/test.m2 || true) \ - $(eval changes::; diff -u @srcdir@/$d/chapter.out.expected @srcdir@/$d/test.out.expected || true)) -clean:; rm -f */*.trim */*.out programming/foo */*.tmp -Makefile: Makefile.in; cd ../../..; ./config.status Macaulay2/tests/ComputationsBook/Makefile -Makefile.chapter: Makefile.chapter.in; cd ../../..; ./config.status Macaulay2/tests/ComputationsBook/Makefile.chapter -distclean:clean; rm -f Makefile -# Local Variables: -# compile-command: "make -C $M2BUILDDIR/Macaulay2/tests/ComputationsBook " -# End: -.NOTPARALLEL: diff -Nru macaulay2-1.22~rc1+ds/.pc/skip-failing-engine-tests.patch/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp macaulay2-1.22+ds/.pc/skip-failing-engine-tests.patch/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp --- macaulay2-1.22~rc1+ds/.pc/skip-failing-engine-tests.patch/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp 2023-06-02 02:24:38.000000000 +0000 +++ macaulay2-1.22+ds/.pc/skip-failing-engine-tests.patch/M2/Macaulay2/e/unit-tests/NCGroebnerTest.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,1034 +0,0 @@ -#include -#include -#include - -#include "MemoryBlock.hpp" -#include "interface/ring.h" - -#include "poly.hpp" -#include "aring-glue.hpp" -#include "NCAlgebras/FreeAlgebra.hpp" -#include "NCAlgebras/FreeAlgebraQuotient.hpp" -#include "NCAlgebras/WordTable.hpp" -#include "NCAlgebras/NCGroebner.hpp" -#include "NCAlgebras/OverlapTable.hpp" -#include "NCAlgebras/SuffixTree.hpp" -#include "NCAlgebras/NCReduction.hpp" -#include "monordering.hpp" -#include "monoid.hpp" - -/** MemoryBlock tests - */ - -bool testMemoryBlock() -{ - MemoryBlock B; - for (size_t i = 0; i < 1000; ++i) - { - size_t sz = 4 + (32343 * i) % 10; - auto range = B.allocateArray(sz); - for (int j = 0; j < sz; j++) - range.first[j] = 100 * i + j; - if (i % 93 == 0) - { - range = B.shrinkLastAllocate(range.first, range.second, range.first + 4); - for (int j = 0; j < 4; j++) - range.first[j] = 100 * i + j; - } - if ((range.second - range.first != sz) and (range.second - range.first != 4)) - return false; - // std::cout << "i = " << i << " sz = " << sz << " elems = "; - // for (int* a = range.first; a != range.second; ++a) - // std::cout << *a << " "; - // std::cout << std::endl << "memory usage: " << B.getMemoryUsedInBytes() << std::endl; - } - return true; -} - -TEST(MemoryBlock, tryit) -{ - EXPECT_TRUE(testMemoryBlock()); // TODO: this test is a bit lame currently -} - -/** Monoid tests - */ -const Monoid* degreeMonoid(const std::vector& names) -{ - std::vector wts; - for (int i=0; icast_to_PolynomialRing(), - {}, - {}); -} - -const PolynomialRing* degreeRing(const std::vector& names) -{ - auto degM = degreeMonoid(names); - if (degM == nullptr) return nullptr; - return PolyRing::create(globalZZ, degM); -} -const PolynomialRing* degreeRing(int ndegrees) -{ - assert(ndegrees == 1); - return degreeRing({"T"}); -} - -extern void tryOutMathicCode(); - -std::vector monom1 {2, 0, 1}; // cab -std::vector monom2 {2, 2}; // cc -std::vector monom3 {1, 0, 1, 0}; // baba -std::vector word {2, 0, 1, 2, 2, 1, 0, 1, 0}; // cabccbaba - -TEST(NCReduction, tryit) -{ - tryOutMathicCode(); -} - -TEST(NCReduction, TrivialPolynomialHeap) -{ - FreeAlgebra* A = FreeAlgebra::create(globalQQ, - { "x", "y", "z" }, - degreeRing(1), - {1,1,1}, - {}, - {1} - ); - FreeAlgebraElement x(A), y(A), z(A), f(A), g(A), h(A); - A->var(*x, 0); - A->var(*y, 1); - A->var(*z, 2); - f = x + y; - g = y + z; - h = x + y + y + z; - - auto H { makePolynomialHeap(HeapType::Trivial, *A) }; - H->addPolynomial(*f); - H->addPolynomial(*g); - EXPECT_TRUE(A->is_equal(* H->value(), *h)); - EXPECT_TRUE(A->is_equal(* H->value(), *h)); - - H->removeLeadTerm(); - EXPECT_FALSE(H->isZero()); - - H->removeLeadTerm(); - EXPECT_FALSE(H->isZero()); - - H->removeLeadTerm(); - EXPECT_TRUE(H->isZero()); - EXPECT_TRUE(A->is_zero(* H->value())); -} - -TEST(NCReduction, NaiveDedupPolynomialHeap) -{ - FreeAlgebra* A = FreeAlgebra::create(globalQQ, - { "x", "y", "z"}, - degreeRing(1), - {1,1,1}, - {}, - {1} - ); - FreeAlgebraElement x(A), y(A), z(A), f(A), g(A), h(A), mh(A); - FreeAlgebraElement F(A), G(A); - A->var(*x, 0); - A->var(*y, 1); - A->var(*z, 2); - f = x + y; - g = y + z; - h = x + y + y + z; - mh = -h; - // strangely enough, this doesn't give an error unless you use *all* the terms - // stopping F early will not cause the error. - F = y*z*x*z - y*z*y*y - y*z*z*x - z*x*y*z + z*x*z*y - z*y*y*y - z*z*x*y - z*z*y*x - z*z*z*z; - G = -y*z*x*z - y*z*y*y - y*z*z*x; - - auto H { makePolynomialHeap(HeapType::NaiveDedupGeobucket, *A) }; - std::cout << H->getName() << std::endl; - H->addPolynomial(*f); - H->addPolynomial(*g); - std::cout << "H->value() = " << FreeAlgebraElement(A, *H->value()); - std::cout << " H->value() = " << FreeAlgebraElement(A, *H->value()) << std::endl; - EXPECT_TRUE(A->is_equal(* H->value(), *h)); - EXPECT_TRUE(A->is_equal(* H->value(), *h)); - - H->removeLeadTerm(); - EXPECT_FALSE(H->isZero()); - - H->removeLeadTerm(); - EXPECT_FALSE(H->isZero()); - - H->removeLeadTerm(); - EXPECT_TRUE(H->isZero()); - EXPECT_TRUE(A->is_zero(* H->value())); - H->addPolynomial(*h); - H->addPolynomial(*mh); - EXPECT_TRUE(H->isZero()); - EXPECT_TRUE(A->is_zero(* H->value())); - - H->addPolynomial(*F); - H->addPolynomial(*G); - buffer o; - A->elem_text_out(o,* (H->value()), true, false, false); - std::cout << o.str() << std::endl; -} - -TEST(NCReduction, NaivePolynomialHeap) -{ - FreeAlgebra* A = FreeAlgebra::create(globalQQ, - { "x", "y", "z"}, - degreeRing(1), - {1,1,1}, - {}, - {1} - ); - FreeAlgebraElement x(A), y(A), z(A), f(A), g(A), h(A), mh(A); - FreeAlgebraElement F(A), G(A); - A->var(*x, 0); - A->var(*y, 1); - A->var(*z, 2); - f = x + y; - g = y + z; - h = x + y + y + z; - mh = -h; - // strangely enough, this doesn't give an error unless you use *all* the terms - // stopping F early will not cause the error. - F = y*z*x*z - y*z*y*y - y*z*z*x - z*x*y*z + z*x*z*y - z*y*y*y - z*z*x*y - z*z*y*x - z*z*z*z; - G = -y*z*x*z - y*z*y*y - y*z*z*x; - - auto H { makePolynomialHeap(HeapType::NaiveGeobucket, *A) }; - std::cout << H->getName() << std::endl; - H->addPolynomial(*f); - std::cout << "H->value() = " << FreeAlgebraElement(A, *H->value()) << std::endl; - H->addPolynomial(*g); - std::cout << "H->value() = " << FreeAlgebraElement(A, *H->value()) << std::endl; - EXPECT_TRUE(A->is_equal(* H->value(), *h)); - EXPECT_TRUE(A->is_equal(* H->value(), *h)); - - std::cout << "about to call removeLeadTerm" << std::endl; - - H->removeLeadTerm(); - EXPECT_FALSE(H->isZero()); - - H->removeLeadTerm(); - EXPECT_FALSE(H->isZero()); - - H->removeLeadTerm(); - EXPECT_TRUE(H->isZero()); - EXPECT_TRUE(A->is_zero(* H->value())); - H->addPolynomial(*h); - H->addPolynomial(*mh); - EXPECT_TRUE(H->isZero()); - EXPECT_TRUE(A->is_zero(* H->value())); - - H->addPolynomial(*F); - H->addPolynomial(*G); - buffer o; - A->elem_text_out(o,* (H->value()), true, false, false); - std::cout << o.str() << std::endl; -} - -TEST(MonomialOrdering, create) -{ - auto mo1 = MonomialOrderings::Lex(5); - auto mo2 = MonomialOrderings::GroupLex(4); - auto mo3 = MonomialOrderings::join({mo1, mo2}); - std::string answer3 { "MonomialOrder => {\n Lex => 5,\n GroupLex => 4\n }" }; - EXPECT_EQ(answer3, MonomialOrderings::toString(mo3)); - EXPECT_EQ(9, rawNumberOfVariables(mo3)); - EXPECT_TRUE(moIsLex(mo1)); - - auto mo4 = MonomialOrderings::GRevLex({3,2,5,7}); - EXPECT_TRUE(moIsGRevLex(mo4)); - auto mo5 = MonomialOrderings::GRevLex2({1,1,1,1}); - EXPECT_TRUE(moIsGRevLex(mo5)); - auto mo6 { - MonomialOrderings::join( - { - MonomialOrderings::GRevLex(3), - MonomialOrderings::GRevLex2(4), - MonomialOrderings::GRevLex4(5), - MonomialOrderings::GroupLex(3) - })}; - (void)mo6;//force a use, suppress a warning -} - - -TEST(FreeAlgebra, create) -{ - if (degreeRing(1) == nullptr or error()) - { - std::cout << "Error: " << error_message() << std::endl; - EXPECT_TRUE(false); - } - - FreeAlgebra* A = FreeAlgebra::create(globalQQ, - { "x", "y", "z" }, - degreeRing(1), - {1,2,3}, - {}, - {1} - ); - EXPECT_TRUE(A != nullptr); -} - -TEST(FreeAlgebra, polyarithmetic) -{ - FreeAlgebra* A = FreeAlgebra::create(globalQQ, - { "x", "y", "z" }, - degreeRing(1), - {1,2,3}, - {}, - {1} - ); - FreeAlgebraElement x(A), y(A), z(A), f(A), g(A), h(A); - A->var(*x, 0); - A->var(*y, 1); - A->var(*z, 2); - f = x + y; - g = y + z; - EXPECT_TRUE(x + y == y + x); - EXPECT_FALSE(f == g); - EXPECT_TRUE(x * (y + z) == x * y + x * z); - EXPECT_TRUE((f * g) * f == f * (g * f)); - EXPECT_TRUE((f^2) == (f * f)); - - A->from_word(*h, {1,2,1,0,1}); - EXPECT_TRUE(h == y * z * y * x * y); - - A->setZero(*f); - A->subtract(*f,*x,*y); - EXPECT_TRUE(f == (x - y)); - - A->setZero(*f); - A->setZero(*g); - A->from_long(*f,1); - std::vector gdata {}; - A->from_word(*g, gdata); - // from_rational test? How to create an mpq_ptr? - EXPECT_TRUE(f == g); - EXPECT_TRUE(A->is_unit(*f)); - EXPECT_TRUE((h^0) == f); - - A->setZero(*f); - A->setZero(*g); - A->setZero(*h); - f = x + y; - A->from_long(*g,-1); - A->negate(*h,*f); - EXPECT_TRUE(h == f*g); - A->setZero(*h); - A->mult_by_coeff(*h,*f,A->coefficientRing()->from_long(-1)); - EXPECT_TRUE(h == f*g); - - A->setZero(*f); - A->setZero(*g); - A->setZero(*h); - EXPECT_TRUE(A->is_zero(*h)); - f = x + y; - A->lead_term_as_poly(*g,*f); - EXPECT_TRUE(g == x); - A->add_to_end(*f,*z); - EXPECT_TRUE(f == (x + y + z)); - - A->subtract(*h,*f,*(x+y+z)); - EXPECT_TRUE(A->is_zero(*h)); - - A->setZero(*f); - A->setZero(*g); - f = x + y; - A->mult_by_term_left(*g,*f,A->coefficientRing()->from_long(1),Word(monom2)); - EXPECT_TRUE(g == z*z*f); - A->setZero(*g); - A->mult_by_term_right(*g,*f,A->coefficientRing()->from_long(1),Word(monom3)); - EXPECT_TRUE(g == f*y*x*y*x); - A->setZero(*g); - A->mult_by_term_left_and_right(*g,*f,A->coefficientRing()->from_long(1),Word(monom2),Word(monom3)); - EXPECT_TRUE(g == z*z*f*y*x*y*x); - - // making polynomial monic test - A->setZero(*f); - A->setZero(*g); - A->setZero(*h); - A->from_long(*f,-1); - g = f*(x + y); - A->makeMonic(*h,*g); - EXPECT_TRUE(h == x + y); -} - -TEST(FreeAlgebra, quotientArithmetic) -{ - FreeAlgebra* Q = FreeAlgebra::create(globalQQ, - { "x", "y", "z" }, - degreeRing(1), - {1,2,3}, - {}, - {1} - ); - FreeAlgebraElement X(Q), Y(Q), Z(Q), F(Q), G(Q), H(Q); - Q->var(*X,0); - Q->var(*Y,1); - Q->var(*Z,2); - F = X*Y + Y*X; - G = X*Z + Z*X; - H = Y*Z + Z*Y; - - auto GB = std::unique_ptr (new ConstPolyList); - //auto GB = new ConstPolyList; - GB->push_back(&*F); - GB->push_back(&*G); - GB->push_back(&*H); - EXPECT_TRUE(GB->size() == 3); - - FreeAlgebraQuotient* A = new FreeAlgebraQuotient(*Q, *GB, -1); // are we transferring ownership of GB? - - FreeAlgebraQuotientElement x(A), y(A), z(A), f(A), g(A), h(A); - - // check if things reduce properly - A->var(*x,0); - A->var(*y,1); - A->var(*z,2); - A->setZero(*f); - A->setZero(*g); - A->setZero(*h); - f = x*y*x*z*x*y*x*z; - g = x*x*x*x*y*y*z*z; - A->negate(*h,*g); - EXPECT_TRUE(f == h); -} - -TEST(FreeAlgebra, comparisons) -{ - FreeAlgebra* A = FreeAlgebra::create(globalQQ, - { "x", "y", "z" }, - degreeRing(1), - {1,2,3}, - {}, - {1} - ); - FreeAlgebraElement x(A), y(A), z(A), f(A), g(A), h(A); - A->var(*x, 0); - A->var(*y, 1); - A->var(*z, 2); - EXPECT_TRUE(A->compare_elems(*x,*y) == GT); - EXPECT_TRUE(A->compare_elems(*y,*x) == LT); - EXPECT_TRUE(A->compare_elems(*x,*x) == EQ); -} - -TEST(FreeAlgebra, spairs) -{ - FreeAlgebra* A = FreeAlgebra::create(globalQQ, - { "x", "y", "z" }, - degreeRing(1), - {3,2,1}, - {3,2,1}, - {1} - ); - FreeAlgebraElement x(A), y(A), z(A), f(A), g(A), h(A); - A->var(*x, 0); - A->var(*y, 1); - A->var(*z, 2); - f = x*y*x + z*y*z; - Word leadWord = A->lead_word(*f); - Word leadWordPrefix = A->lead_word_prefix(*f,2); - Word leadWordSuffix = A->lead_word_suffix(*f,1); - // TODO: did the offset change on our recent heft changes? - EXPECT_TRUE((*f).cbegin().monom().begin() + 2 == leadWord.begin() && (*f).cbegin().monom().begin() + 5 == leadWord.end()); - EXPECT_TRUE((*f).cbegin().monom().begin() + 2 == leadWordPrefix.begin() && (*f).cbegin().monom().begin() + 4 == leadWordPrefix.end()); - EXPECT_TRUE((*f).cbegin().monom().begin() + 3 == leadWordSuffix.begin() && (*f).cbegin().monom().begin() + 5 == leadWordSuffix.end()); - - PolyList polyList {&*f}; - *g = *(NCGroebner::createOverlapPoly(*A, polyList, 0, 2, 0)); - h = f*y*x - x*y*f; - EXPECT_TRUE(g == h); -} - -TEST(OverlapTable, insertion) -{ - OverlapTable overlapTable; - overlapTable.insert(3,false,std::make_tuple(1,2,3,true)); - overlapTable.insert(3,false,std::make_tuple(1,2,1,true)); - overlapTable.insert(2,false,std::make_tuple(1,1,1,true)); - EXPECT_FALSE(overlapTable.isFinished()); - EXPECT_TRUE(overlapTable.isFinished(1)); - EXPECT_FALSE(overlapTable.isFinished(3)); - EXPECT_TRUE(overlapTable.size() == 3); -} - -TEST(NCGroebner, sorting) -{ - auto key1 = std::make_pair(1,false); - auto key2 = std::make_pair(1,true); - auto key3 = std::make_pair(2,false); - auto key4 = std::make_pair(2,true); - std::map,int> myMap; - myMap.insert(std::make_pair(key1,0)); - myMap.insert(std::make_pair(key2,0)); - myMap.insert(std::make_pair(key3,0)); - myMap.insert(std::make_pair(key4,0)); - // TODO: Make this into a test - for (auto i : myMap) - { - std::cout << "[" << i.first.first << "," << i.first.second << "]" << std::endl; - } -} - -TEST(WordTable, create) -{ - WordTable W; - - EXPECT_EQ(monom1.size(), 3); - EXPECT_EQ(monom2.size(), 2); - - W.insert(Word(monom1)); - W.insert(Word(monom2)); - W.insert(Word(monom3)); - - EXPECT_EQ(W.monomialCount(), 3); -} - -TEST(WordTable, insert) -{ - WordTable W; - - EXPECT_EQ(monom1.size(), 3); - EXPECT_EQ(monom2.size(), 2); - - W.insert(Word(monom1)); - W.insert(Word(monom2)); - W.insert(Word(monom3)); - - std::vector> matches; - W.subwords(Word(word), matches); - - EXPECT_EQ(matches.size(), 3); - EXPECT_EQ(matches[0], std::make_pair(0, 0)); - EXPECT_EQ(matches[1], std::make_pair(1, 3)); - EXPECT_EQ(matches[2], std::make_pair(2, 5)); -} - - -#if 0 -TEST(WordTable, sizet) -{ - size_t a = 3; - size_t b = 5; - auto c = a-b; - std::cout << c << std::endl; -} -#endif - -TEST(WordTable, simpleSubwords) -{ - std::vector monom1 {1, 1}; // yy - std::vector word {1}; // y - - WordTable W; - W.insert(Word(monom1)); - - std::vector> matches; - W.subwords(Word(word), matches); - - EXPECT_EQ(matches.size(), 0); -} - -TEST(WordTable, subwords) -{ - std::vector monom1 {1, 0, 1, 2}; // babc - std::vector monom2 {1, 0, 2, 2}; // bacc - std::vector monom3 {1, 0, 1, 0}; // baba - std::vector monom4 {1, 0}; // ba - std::vector word {1, 0, 1, 0, 2, 2, 1, 0, 1, 2}; - - WordTable W; - - EXPECT_EQ(monom1.size(), 4); - EXPECT_EQ(monom2.size(), 4); - EXPECT_EQ(monom3.size(), 4); - EXPECT_EQ(monom4.size(), 2); - EXPECT_EQ(word.size(), 10); - - W.insert(Word(monom1)); - W.insert(Word(monom2)); - W.insert(Word(monom3)); - W.insert(Word(monom4)); - - std::vector> matches; - W.subwords(Word(word), matches); - - EXPECT_EQ(matches.size(), 6); - EXPECT_EQ(matches[0], std::make_pair(0, 6)); - EXPECT_EQ(matches[1], std::make_pair(1, 2)); - EXPECT_EQ(matches[2], std::make_pair(2, 0)); - EXPECT_EQ(matches[3], std::make_pair(3, 0)); - EXPECT_EQ(matches[4], std::make_pair(3, 2)); - EXPECT_EQ(matches[5], std::make_pair(3, 6)); -} - -TEST(WordTable, prefix_suffix) -{ - std::vector monom1 {1, 0, 1, 2}; // babc - std::vector monom2 {1, 0, 2, 2}; // bacc - std::vector monom3 {1, 0, 1, 0}; // baba - std::vector word {1, 0, 1, 0, 2, 2, 1, 0, 1, 2}; - std::vector word2 {1, 0, 1, 1, 2, 2, 1, 1, 1, 2}; - - WordTable W; - - EXPECT_EQ(monom1.size(), 4); - EXPECT_EQ(monom2.size(), 4); - EXPECT_EQ(monom3.size(), 4); - EXPECT_EQ(word.size(), 10); - - W.insert(Word(monom1)); - W.insert(Word(monom2)); - W.insert(Word(monom3)); - - int ind = -1; // index of prefix solution, if any. - int ind2 = -1; // index of suffix solution, if any. - bool isprefix = W.isPrefix(Word(word), ind); - bool issuffix = W.isSuffix(Word(word), ind2); - - EXPECT_TRUE(isprefix); - EXPECT_TRUE(issuffix); - EXPECT_EQ(2, ind); - EXPECT_EQ(0, ind2); - - ind = -1; - ind2 = -1; - isprefix = W.isPrefix(Word(monom1), ind); - issuffix = W.isSuffix(Word(monom2), ind2); - EXPECT_TRUE(isprefix); - EXPECT_EQ(0,ind); - EXPECT_TRUE(issuffix); - EXPECT_EQ(1,ind2); - - - ind = -1; - ind2 = -1; - isprefix = W.isPrefix(Word(word2), ind); - issuffix = W.isSuffix(Word(word2), ind2); - - EXPECT_FALSE(isprefix); - EXPECT_FALSE(issuffix); -} - -std::ostream& operator<<(std::ostream& o, const std::vector& val) -{ - int count = 0; - for (auto a : val) - { - o << "[" << std::get<0>(a) << "," - << std::get<1>(a) << "," - << std::get<2>(a) << "]"; - o << " "; - count++; - if (count % 10 == 0) o << std::endl; - } - o << std::endl; - return o; -} - -std::ostream& operator<<(std::ostream& o, const std::vector>& val) -{ - int count = 0; - for (auto a : val) - { - o << "[" << std::get<0>(a) << "," - << std::get<1>(a) << "]"; - o << " "; - count++; - if (count % 10 == 0) o << std::endl; - } - o << std::endl; - return o; -} - -#if 0 -template -std::ostream& operator<<(std::ostream& o, const std::vector& val) -{ - int count = 0; - for (auto a : val) - { - o << "["; - int sz = std::tuple_size::value; - for (auto i=0; i(a) << ","; - } - o << "]"; - o << " "; - count++; - if (count % 10 == 0) o << std::endl; - } - o << std::endl; - return o; -} -#endif - -TEST(WordTable, skylanin) -{ - // X,Y Z are the 3 variables -#if 0 - mons = {{Z, X}, {Z, Y}, {Z, Z}, {Y, Y, X}, {Y, Y, Z}, - {Y, X, Y, Y}, {Y, Y, Y, Y}, {Y, X, Y, X, X}, - {Y, X, Y, X, Y}, {Y, X, Y, X, Z}, - {Y, X, X, Y, X, X}, {Y, X, X, Y, X, Z}, - {Y, X, X, Y, Y, Y}} -#endif - - std::vector m0 {2,0}; // ZX - std::vector m1 {2,1}; // ZY - std::vector m2 {2,2}; // ZZ - std::vector m3 {1,1,0}; // YYX - std::vector m4 {1,1,2}; // YYZ - std::vector m5 {1,0,1,1}; // YXYY - std::vector m6 {1,1,1,1}; // YYYY - std::vector m7 {1,0,1,0,0}; // YXYXX - std::vector m8 {1,0,1,0,1}; // YXYXY - std::vector m9 {1,0,1,0,2}; // YXYXZ - std::vector m10 {1,0,0,1,0,0}; // YXXYXX - std::vector m11 {1,0,0,1,0,2}; // YXXYXZ - std::vector m12 {1,0,0,1,1,1}; // YXXYYY - - std::vector overlaps; - std::vector> matches; - - WordTable W; - W.insert(Word(m0), overlaps); - EXPECT_EQ(0, overlaps.size()); - - W.insert(Word(m1), overlaps); - EXPECT_EQ(0, overlaps.size()); - - W.insert(Word(m2), overlaps); - std::vector ans { - std::make_tuple(2,1,0,true), - std::make_tuple(2,1,1,true), - std::make_tuple(2,1,2,true) - }; - std::sort(ans.begin(),ans.end()); - std::sort(overlaps.begin(),overlaps.end()); - - EXPECT_EQ(overlaps, ans); - overlaps.clear(); - W.leftOverlaps(overlaps); - EXPECT_EQ(0, overlaps.size()); - - W.insert(Word(m3)); - W.insert(Word(m4)); - W.insert(Word(m5)); - W.insert(Word(m6)); - W.insert(Word(m7)); - W.insert(Word(m8)); - W.insert(Word(m9)); - W.insert(Word(m10)); - W.insert(Word(m11)); - W.insert(Word(m12)); - - matches.clear(); - W.superwords(Word(std::vector {1, 1}), matches); - std::vector> ans2 - { - std::make_pair(3,0), - std::make_pair(4,0), - std::make_pair(5,2), - std::make_pair(6,0), - std::make_pair(6,1), - std::make_pair(6,2), - std::make_pair(12,3), - std::make_pair(12,4) - }; - std::sort(ans2.begin(),ans2.end()); - std::sort(matches.begin(),matches.end()); - EXPECT_EQ(ans2, matches); - - matches.clear(); - EXPECT_TRUE(W.isNontrivialSuperword(Word(std::vector {1,2,1,1,2,1,1}), 6, 6)); - EXPECT_TRUE(W.isNontrivialSuperword(Word(std::vector {1,1,2,1,1,2,1,1,2}), 4, 4)); - - matches.clear(); - W.subwords(Word(std::vector {2,2,0,1,1,0,1,0,1,1}), matches); // ZZXYYXYXYY - std::vector> ans3 - { - {0,1}, - {2,0}, - {3,3}, - {5,6}, - {8,4} - }; - std::sort(ans3.begin(),ans3.end()); - std::sort(matches.begin(),matches.end()); - EXPECT_EQ(ans3, matches); - -} - -// Comment this out temporarily. Working on speeding up the suffix tree code. -/* -TEST(SuffixTree, suffixtree1) -{ - auto vec = std::vector {}; - EXPECT_TRUE(vec.size() == 0); - SuffixTree* suffixTree = new SuffixTree(); - EXPECT_TRUE(suffixTree->numPatterns() == 0); - - Label sLabel {1,2,3,2,1}; - Label tLabel {1,2,3,4,1}; - Label resultLabel {1,2,3}; - Word sWord(sLabel); - Word tWord(tLabel); - Word resultWord(resultLabel); - EXPECT_TRUE(suffixTree->sharedPrefix(sWord,tWord) == Word(resultWord)); - - std::vector rightOverlaps {}; - - auto monList1 = std::vector