212c212
< 'PYTHONPATH', 'RANLIB', 'SWIG', 'TERM' ])
---
> 'PYTHONPATH', 'RANLIB', 'TERM' ])
244,248d243
< # Check that swig is present
< if not 'SWIG' in main_dict_keys:
< print "swig is not installed (package swig on Ubuntu and RedHat)"
< Exit(1)
<
527d521
< ('SWIG', 'SWIG tool', environ.get('SWIG', main['SWIG'])),
648d641
< main['SWIGCOMSTR'] = Transform("SWIG")
894,898d886
< # Check for SWIG
< if not main.has_key('SWIG'):
< print 'Error: SWIG utility not found.'
< print ' Please install (see http://www.swig.org) and retry.'
< Exit(1)
900,928d887
< # Check for appropriate SWIG version
< swig_version = readCommand([main['SWIG'], '-version'], exception='').split()
< # First 3 words should be "SWIG Version x.y.z"
< if len(swig_version) < 3 or \
< swig_version[0] != 'SWIG' or swig_version[1] != 'Version':
< print 'Error determining SWIG version.'
< Exit(1)
<
< min_swig_version = '2.0.4'
< if compareVersions(swig_version[2], min_swig_version) < 0:
< print 'Error: SWIG version', min_swig_version, 'or newer required.'
< print ' Installed version:', swig_version[2]
< Exit(1)
<
< # Check for known incompatibilities. The standard library shipped with
< # gcc >= 4.9 does not play well with swig versions prior to 3.0
< if main['GCC'] and compareVersions(gcc_version, '4.9') >= 0 and \
< compareVersions(swig_version[2], '3.0') < 0:
< print termcap.Yellow + termcap.Bold + \
< 'Warning: This combination of gcc and swig have' + \
< ' known incompatibilities.\n' + \
< ' If you encounter build problems, please update ' + \
< 'swig to 3.0 or later.' + \
< termcap.Normal
<
< # Set up SWIG flags & scanner
< swig_flags=Split('-c++ -python -modern -templatereduce $_CPPINCFLAGS')
< main.Append(SWIGFLAGS=swig_flags)
<
943,963d901
< # filter out all existing swig scanners, they mess up the dependency
< # stuff for some reason
< scanners = []
< for scanner in main['SCANNERS']:
< skeys = scanner.skeys
< if skeys == '.i':
< continue
<
< if isinstance(skeys, (list, tuple)) and '.i' in skeys:
< continue
<
< scanners.append(scanner)
<
< # add the new swig scanner that we like better
< from SCons.Scanner import ClassicCPP as CPPScanner
< swig_inc_re = '^[ \t]*[%,#][ \t]*(?:include|import)[ \t]*(<|")([^>"]+)(>|")'
< scanners.append(CPPScanner("SwigScan", [ ".i" ], "CPPPATH", swig_inc_re))
<
< # replace the scanners list that has what we want
< main['SCANNERS'] = scanners
<