-
-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #28333: spkg-configure.m4 for eclib
the main issue here is how to check that the version installed on the system is good enough. We check for a header that only appeared in 2018, that's all we could find atm. URL: https://trac.sagemath.org/28333 Reported by: dimpase Ticket author(s): Dima Pasechnik Reviewer(s): Isuru Fernando
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
SAGE_SPKG_CONFIGURE([eclib], [ | ||
AC_REQUIRE([SAGE_SPKG_CONFIGURE_NTL]) | ||
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PARI]) | ||
AC_MSG_CHECKING([installing ntl or pari? ]) | ||
if test x$sage_spkg_install_ntl = xyes -o x$sage_spkg_install_pari = xyes; then | ||
AC_MSG_RESULT([yes; install eclib as well]) | ||
sage_spkg_install_eclib=yes | ||
else | ||
dnl header types.h appeared in v20180710 | ||
AC_CHECK_HEADER([eclib/types.h], [ | ||
AC_MSG_CHECKING([whether we can link and run a program using eclib]) | ||
ECLIB_SAVED_LIBS=$LIBS | ||
LIBS="$LIBS -lec" | ||
AC_RUN_IFELSE([ | ||
AC_LANG_PROGRAM([[#include <eclib/version.h>] | ||
[#include <eclib/interface.h>]], | ||
[[set_bit_precision(42); /* test for versions >= v20190226 */ | ||
show_version(); | ||
return 0;]] | ||
)], [AC_MSG_RESULT([yes; use eclib from the system])], [ | ||
AC_MSG_RESULT([no; install eclib]) | ||
sage_spkg_install_eclib=yes | ||
LIBS=$ECLIB_SAVED_LIBS | ||
]) | ||
], [sage_spkg_install_eclib=yes]) | ||
fi | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters