diff --git a/SConstruct b/SConstruct index ba640ed4..3adbbe64 100644 --- a/SConstruct +++ b/SConstruct @@ -61,22 +61,22 @@ defenv.Append(NSIS_VERSION = VERSION) ####### Options ### ###################################################################### +import os +hhc = 'no' +if defenv.WhereIs('hhc', os.environ['PATH']): + hhc = 'yes' + opts = Options() opts.Add(PathOption('PREFIX', 'Installation prefix', None)) opts.Add(BoolOption('MSTOOLKIT', 'Use Microsoft Visual C++ Toolkit', 'no')) opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no')) -opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', 'no')) +opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc)) opts.Add(PathOption('CPPPATH', 'Path to search for include files', None)) opts.Add(PathOption('LIBPATH', 'Path to search for libraries', None)) opts.Add(ListOption('SKIPSTUBS', 'A list of stubs that will not be built', 'none', stubs)) opts.Add(ListOption('SKIPPLUGINS', 'A list of plug-ins that will not be built', 'none', plugins)) opts.Add(ListOption('SKIPUTILS', 'A list of utilities that will not be built', 'none', utils)) opts.Add(ListOption('SKIPMISC', 'A list of plug-ins that will not be built', 'none', misc)) - -import os -if defenv.WhereIs('hhc', os.environ['PATH']): - defenv['CHMDOCS'] = 1 - opts.Update(defenv) Help(opts.GenerateHelpText(defenv))