diff -r 74e3c7359393 SConstruct --- a/SConstruct Wed Apr 22 20:22:29 2015 -0700 +++ b/SConstruct Thu Apr 30 14:34:02 2015 +0100 @@ -237,9 +237,10 @@ Exit(1) # 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) +if not ('SWIG' in main_dict_keys or \ + 'SWIG' in main.Dictionary()['ENV']): + print "swig is not installed (package swig on Ubuntu and RedHat)" + Exit(1) # add useful python code PYTHONPATH so it can be used by subprocesses # as well @@ -399,7 +400,7 @@ global_vars.AddVariables( ('CC', 'C compiler', environ.get('CC', main['CC'])), ('CXX', 'C++ compiler', environ.get('CXX', main['CXX'])), - ('SWIG', 'SWIG tool', environ.get('SWIG', main['SWIG'])), + ('SWIG', 'SWIG tool', environ.get('SWIG', main.get('SWIG'))), ('PROTOC', 'protoc tool', environ.get('PROTOC', 'protoc')), ('BATCH', 'Use batch pool for build and tests', False), ('BATCH_CMD', 'Batch pool submission command name', 'qdo'),