summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorTodd Zullinger <tmzullinger@users.sourceforge.net>2007-02-27 21:34:14 +0000
committerTodd Zullinger <tmzullinger@users.sourceforge.net>2007-02-27 21:34:14 +0000
commit56a6f268be0276976d6e140aa10467eb92aa646c (patch)
treee0bbfdf006d36da050b8c5ec13ca54d7cb19de3a /m4
parente4650b1a4fe703337ee00324010340725ae68c8f (diff)
downloadlibgpod-56a6f268be0276976d6e140aa10467eb92aa646c.tar.gz
libgpod-56a6f268be0276976d6e140aa10467eb92aa646c.tar.xz
libgpod-56a6f268be0276976d6e140aa10467eb92aa646c.zip
allow the use of nicer version strings in AM_CHECK_PYMOD
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1401 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'm4')
-rw-r--r--m4/python.m47
1 files changed, 5 insertions, 2 deletions
diff --git a/m4/python.m4 b/m4/python.m4
index cc5c6a0..685f4b6 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -47,10 +47,13 @@ sys.exit(0)"], [prog="
import sys, string, $1
curverstr = $3
# use method from AM_PYTHON_CHECK_VERSION
-minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+minver = map(int, string.split('$2', '.'))
+length = len[(minver)]
+minver += [[0, 0, 0]]
minverhex = 0
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
-curver = map(int, string.split(curverstr, '.')) + [[0, 0, 0]]
+curver = map(int, string.split(curverstr, '.')[[:length]])
+curver += [[0, 0, 0]]
curverhex = 0
for i in xrange(0, 4): curverhex = (curverhex << 8) + curver[[i]]
if (curverhex >= minverhex):