mpir/yasm/m4/pyrex.m4
wbhart c0e157e3b2 Roughly speaking mpir should now build on an AMD64. At the present moment the config.guess doesn't distinguish a Core 2 from an AMD64 and so the same code is probably built on both.
One must build yasm (included in the yasm directory) before building GMP, if building on an x86_64 machine.

Note: make test and make tune do not currently build.
2008-05-26 22:11:40 +00:00

18 lines
817 B
Plaintext

dnl a macro to check for the installed Pyrex version; note PYTHON needs to
dnl be set before this function is called.
dnl PYREX_CHECK_VERSION([MIN-VERSION], [ACTION-IF-TRUE], [ACTION-IF-FALSE])
AC_DEFUN([PYREX_CHECK_VERSION],
[prog="import sys
from Pyrex.Compiler.Version import version
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
pyrexver = map(int, version.rstrip('abcdefghijklmnopqrstuvwxyz').split('.')) + [[0, 0, 0]]
pyrexverhex = 0
for i in xrange(0, 4): pyrexverhex = (pyrexverhex << 8) + pyrexver[[i]]
minver = map(int, '$1'.split('.')) + [[0, 0, 0]]
minverhex = 0
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
sys.exit(pyrexverhex < minverhex)"
AS_IF([AM_RUN_LOG([$PYTHON -c "$prog"])], [$2], [$3])])