]> git.donarmstrong.com Git - lilypond.git/commitdiff
(test_program): Bugfix for double digit version compares, use
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 17 Apr 2005 09:53:17 +0000 (09:53 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 17 Apr 2005 09:53:17 +0000 (09:53 +0000)
integer (not string-) compare.

ChangeLog
SConstruct

index eff4abf9389bd4bb9dd657d2b11c42c72b0eeddf..48e7c450a2a6cbae47fbaa668ec906d02ec8188b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2005-04-17  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * SConstruct: Require pkg-config.
+       (test_program): Bugfix for double digit version compares, use
+       integer (not string-) compare.
 
        * stepmake/aclocal.m4 (STEPMAKE_PANGO_FT2): Define HAVE_PANGO16 too.
 
index fb52df0540eb9540409d6f7d4483cdb5553af515..e85691077ba9d0c299595a9a8016b6253910a7bd 100644 (file)
@@ -235,7 +235,8 @@ def list_sort (lst):
 
 
 def configure (target, source, env):
-       vre = re.compile ('^.*[^-.0-9]([0-9][0-9]*\.[0-9][.0-9]*).*$', re.DOTALL)
+       vre = re.compile ('^.*[^-.0-9]([0-9][0-9]*\.[0-9][.0-9]*).*$',
+                         re.DOTALL)
        def get_version (program):
                command = '(pkg-config --modversion %(program)s || %(program)s --version || %(program)s -V) 2>&1' % vars ()
                pipe = os.popen (command)
@@ -257,7 +258,8 @@ def configure (target, source, env):
                        return 0
                sys.stdout.write (string.join (actual, '.'))
                sys.stdout.write ('\n')
-               if actual < string.split (minimal, '.'):
+               if map (string.atoi, actual) \
+                  < map (string.atoi, string.split (minimal, '.')):
                        lst.append ((description, package, minimal, program,
                                     string.join (actual, '.')))
                        return 0