summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2010-01-01 20:55:07 +0000
committerPeter Johnson <peter@tortall.net>2010-01-01 20:55:07 +0000
commitfcb228f18cd5c1286e79ff3d0e7b6a299df76fc6 (patch)
treea8eb6cbea4eed2c57ccaefea85e7772a722115ae /m4
parentf608f67ad258a7802a674809f2e5472c7651aef9 (diff)
downloadyasm-fcb228f18cd5c1286e79ff3d0e7b6a299df76fc6.tar.gz
Use Cython instead of Pyrex.
svn path=/trunk/yasm/; revision=2256
Diffstat (limited to 'm4')
-rw-r--r--m4/cython.m417
-rw-r--r--m4/pyrex.m417
2 files changed, 17 insertions, 17 deletions
diff --git a/m4/cython.m4 b/m4/cython.m4
new file mode 100644
index 00000000..352df3d6
--- /dev/null
+++ b/m4/cython.m4
@@ -0,0 +1,17 @@
+dnl a macro to check for the installed Cython version; note PYTHON needs to
+dnl be set before this function is called.
+dnl CYTHON_CHECK_VERSION([MIN-VERSION], [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+AC_DEFUN([CYTHON_CHECK_VERSION],
+ [prog="import sys
+from Cython.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.
+ver = map(int, version.rstrip('abcdefghijklmnopqrstuvwxyz').split('.')) + [[0, 0, 0]]
+verhex = 0
+for i in xrange(0, 4): verhex = (verhex << 8) + ver[[i]]
+minver = map(int, '$1'.split('.')) + [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(verhex < minverhex)"
+ AS_IF([AM_RUN_LOG([$PYTHON -c "$prog"])], [$2], [$3])])
+
diff --git a/m4/pyrex.m4 b/m4/pyrex.m4
deleted file mode 100644
index 379c5e3d..00000000
--- a/m4/pyrex.m4
+++ /dev/null
@@ -1,17 +0,0 @@
-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])])
-