From a5fee5c5fb3e5ed464048a5502a281cbef357245 Mon Sep 17 00:00:00 2001 From: tmzullinger Date: Tue, 27 Feb 2007 21:34:14 +0000 Subject: 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 --- m4/python.m4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'm4/python.m4') 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): -- cgit