Bug 735828 - configure fails for python < 2.7.

sys.version_info named components only available since 2.7, though GIMP
is supposed to support 2.5.0 and over. Used numerical tuple index
instead.
This commit is contained in:
Jehan 2014-09-07 16:31:12 +02:00
parent 97d6629d66
commit d249ec348b
1 changed files with 4 additions and 1 deletions

View File

@ -202,7 +202,10 @@ minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
minverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
sys.exit(sys.version_info.major != 2 or sys.hexversion < minverhex)"
# sys.version_info.major only available since Python 2.7.
# use sys.version_info[0] instead.
# Double the square brackets for M4 syntax.
sys.exit(sys.version_info[[0]] != 2 or sys.hexversion < minverhex)"
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])