From 86436acaad368864ee9210a8ea19f2589fa8468d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 7 Jul 2011 19:19:53 +0000 Subject: Don't automatically check for C and C++ compilers for all projects git-svn-id: http://svn.drobilla.net/autowaf@49 e2e4594f-ea7b-45dc-bc5a-5f5301e603aa --- autowaf.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/autowaf.py b/autowaf.py index 78bd7fc..643a5cd 100644 --- a/autowaf.py +++ b/autowaf.py @@ -34,8 +34,6 @@ def set_options(opt): global g_step if g_step > 0: return - opt.load('compiler_cc') - opt.load('compiler_cxx') # Install directory options dirs_options = opt.add_option_group('Installation directories', '') @@ -87,16 +85,25 @@ def set_options(opt): help="LV2 bundles [Default: LIBDIR/lv2]") g_step = 1 -def check_header(conf, name, define='', mandatory=True): +def check_header(conf, lang, name, define='', mandatory=True): "Check for a header" includes = '' # search default system include paths if sys.platform == "darwin": includes = '/opt/local/include' + + if lang == 'c': + check_func = conf.check_cc + elif lang == 'cxx': + check_func = conf.check_cxx + else: + Logs.error("Unknown header language `%s'" % lang) + return + if define != '': - conf.check_cxx(header_name=name, includes=includes, - define_name=define, mandatory=mandatory) + check_func(header_name=name, includes=includes, + define_name=define, mandatory=mandatory) else: - conf.check_cxx(header_name=name, includes=includes, mandatory=mandatory) + check_func(header_name=name, includes=includes, mandatory=mandatory) def nameify(name): return name.replace('/', '_').replace('++', 'PP').replace('-', '_').replace('.', '_') @@ -134,10 +141,10 @@ def configure(conf): conf.env.append_value('CXXFLAGS', vals.split()) print('') display_header('Global Configuration') - conf.load('compiler_cc') - conf.load('compiler_cxx') + if Options.options.docs: conf.load('doxygen') + conf.env['DOCS'] = Options.options.docs conf.env['DEBUG'] = Options.options.debug conf.env['STRICT'] = Options.options.strict -- cgit v1.2.1