[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gsrc-commit] /srv/bzr/gsrc/trunk r945: clean up Python verify version m
From: |
Brandon Invergo |
Subject: |
[Gsrc-commit] /srv/bzr/gsrc/trunk r945: clean up Python verify version macro |
Date: |
Sun, 23 Sep 2012 18:45:06 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 945
committer: Brandon Invergo <address@hidden>
branch nick: trunk
timestamp: Sun 2012-09-23 18:45:06 +0200
message:
clean up Python verify version macro
modified:
util/python-configure/m4/python.m4
=== modified file 'util/python-configure/m4/python.m4'
--- a/util/python-configure/m4/python.m4 2012-09-22 14:25:13 +0000
+++ b/util/python-configure/m4/python.m4 2012-09-23 16:45:06 +0000
@@ -123,7 +123,7 @@
]) # PC_PYTHON_PROG_PYTHON_CONFIG
-# PC_PYTHON_VERIFY_VERSION(PYTHON-PROGRAM, VERSION, [ACTION-IF-TRUE],
[ACTION-IF-NOT-FOUND])
+# PC_PYTHON_VERIFY_VERSION(VERSION, [ACTION-IF-TRUE], [ACTION-IF-NOT-FOUND])
# ---------------------------------------------------------------------------
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
# Run ACTION-IF-FALSE otherwise.
@@ -132,8 +132,8 @@
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
AC_DEFUN([PC_PYTHON_VERIFY_VERSION],
[AC_REQUIRE([AC_PROG_PYTHON])[]dnl
-m4_define([pc_python_safe_ver], m4_bpatsubsts($2, [\.], [_]))
-AC_CACHE_CHECK([if Python >= '$2'],
+m4_define([pc_python_safe_ver], m4_bpatsubsts($1, [\.], [_]))
+AC_CACHE_CHECK([if Python >= '$1'],
[[pc_cv_python_min_version_]pc_python_safe_ver],
[AC_LANG_PUSH(Python)[]dnl
AC_RUN_IFELSE(
@@ -143,7 +143,7 @@
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
- minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+ minver = list(map(int, '$1'.split('.'))) + [[0, 0, 0]]
minverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(4)):
@@ -154,7 +154,7 @@
[[pc_cv_python_min_version_]pc_python_safe_ver="no"])
AC_LANG_POP(Python)[]dnl
])
-AS_IF([test "$[pc_cv_python_min_version_]pc_python_safe_ver" = "no"], [$4],
[$3])
+AS_IF([test "$[pc_cv_python_min_version_]pc_python_safe_ver" = "no"], [$3],
[$2])
])# PC_PYTHON_VERIFY_VERSION
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gsrc-commit] /srv/bzr/gsrc/trunk r945: clean up Python verify version macro,
Brandon Invergo <=