This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build/pkgs/4ti2/spkg-configure.m4: New
- Loading branch information
Matthias Koeppe
committed
Jun 23, 2021
1 parent
0f13173
commit 1c1c1c8
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
SAGE_SPKG_CONFIGURE([4ti2], [ | ||
SAGE_SPKG_DEPCHECK([gmp mpir glpk zlib], [ | ||
dnl Debian installs these programs with an executable prefix "4ti2-" | ||
dnl but polymake and our own code do not handle this yet (Singular does). | ||
m4_foreach([prog], [hilbert,markov,graver,zsolve,qsolve,rays,ppi,circuits,groebner], | ||
AC_CHECK_PROGS([FOURTITWO_]m4_toupper(prog), prog) | ||
AS_VAR_IF([FOURTITWO_]m4_toupper(prog), [""], [sage_spkg_install_4ti2=yes]) | ||
) | ||
dnl Adapted from https://github.com/latte-int/latte/blob/master/m4/4ti2-check.m4 | ||
AC_MSG_CHECKING(for library 4ti2gmp) | ||
BACKUP_CXXFLAGS=${CXXFLAGS} | ||
BACKUP_LIBS=${LIBS} | ||
FORTYTWO_CXXFLAGS="-D__STDC_LIMIT_MACROS -D_4ti2_GMP_" | ||
FORTYTWO_LIBS="-l4ti2gmp -lzsolve" | ||
CXXFLAGS="${BACKUP_CXXFLAGS} ${FORTYTWO_CXXFLAGS} ${GMP_CFLAGS}" | ||
LIBS="${BACKUP_LIBS} ${FORTYTWO_LIBS} ${GMP_LIBS}" | ||
AC_TRY_LINK([ | ||
#include "4ti2/4ti2.h" | ||
], | ||
[ _4ti2_rays_create_state(_4ti2_PREC_INT_ARB); | ||
], [ | ||
AC_MSG_RESULT([yes]) | ||
], [ | ||
AC_MSG_RESULT([no]) | ||
sage_spkg_install_4ti2=yes | ||
]) | ||
CXXFLAGS=${BACKUP_CXXFLAGS} | ||
LIBS=${BACKUP_LIBS} | ||
]) | ||
]) |