Changes in tools/autotool.py [7174403:2429e4a] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/autotool.py

    r7174403 r2429e4a  
    184184        sys.stderr.write("ok\n")
    185185
    186 def check_app_alternatives(alts, args, name, details):
    187         "Check whether an application can be executed (use several alternatives)"
    188        
    189         tried = []
    190         found = None
    191        
    192         for alt in alts:
    193                 working = True
    194                 cmdline = [alt] + args
    195                 tried.append(" ".join(cmdline))
    196                
    197                 try:
    198                         sys.stderr.write("Checking for %s ... " % alt)
    199                         subprocess.Popen(cmdline, stdout = subprocess.PIPE, stderr = subprocess.PIPE).wait()
    200                 except:
    201                         sys.stderr.write("failed\n")
    202                         working = False
    203                
    204                 if (working):
    205                         sys.stderr.write("ok\n")
    206                         found = alt
    207                         break
    208        
    209         if (found is None):
    210                 print_error(["%s is missing." % name,
    211                              "",
    212                              "Please make sure that it is installed in your",
    213                              "system (%s)." % details,
    214                              "",
    215                              "The following alternatives were tried:"] + tried)
    216        
    217         return found
    218 
    219186def check_gcc(path, prefix, common, details):
    220187        "Check for GCC"
     
    492459       
    493460        for key, value in common.items():
    494                 if (type(value) is list):
    495                         outmk.write('%s = %s\n' % (key, " ".join(value)))
    496                 else:
    497                         outmk.write('%s = %s\n' % (key, value))
     461                outmk.write('%s = %s\n' % (key, value))
    498462       
    499463        outmk.close()
     
    660624                # Platform-specific utilities
    661625                if ((config['BARCH'] == "amd64") or (config['BARCH'] == "ia32") or (config['BARCH'] == "ppc32") or (config['BARCH'] == "sparc64")):
    662                         common['GENISOIMAGE'] = check_app_alternatives(["mkisofs", "genisoimage"], ["--version"], "ISO 9660 creation utility", "usually part of genisoimage")
     626                        check_app(["mkisofs", "--version"], "ISO 9660 creation utility", "usually part of genisoimage")
    663627               
    664628                probe = probe_compiler(common,
Note: See TracChangeset for help on using the changeset viewer.