View | Details | Raw Unified | Return to bug 3007
Collapse All | Expand All

(-)a/contrib/wscript (+4 lines)
 Lines 26-31    Link Here 
26
        all_contrib_modules.append(dirname)
26
        all_contrib_modules.append(dirname)
27
all_contrib_modules.sort()
27
all_contrib_modules.sort()
28
28
29
def get_required_boost_libs(conf):
30
    for module in all_contrib_modules:
31
        conf.recurse (module, name="required_boost_libs", mandatory=False)
32
29
def options(opt):
33
def options(opt):
30
    for module in all_contrib_modules:
34
    for module in all_contrib_modules:
31
        opt.recurse(module, mandatory=False)
35
        opt.recurse(module, mandatory=False)
(-)a/src/wscript (-13 / +3 lines)
 Lines 29-35    Link Here 
29
        all_modules.append(dirname)
29
        all_modules.append(dirname)
30
all_modules.sort()
30
all_modules.sort()
31
31
32
32
def get_required_boost_libs(conf):
33
    for module in all_modules:
34
        conf.recurse (module, name="required_boost_libs", mandatory=False)
33
35
34
def options(opt):
36
def options(opt):
35
    opt.add_option('--enable-rpath',
37
    opt.add_option('--enable-rpath',
 Lines 49-66    Link Here 
49
        opt.recurse(module, mandatory=False)
51
        opt.recurse(module, mandatory=False)
50
52
51
def configure(conf):
53
def configure(conf):
52
    conf.env['REQUIRED_BOOST_LIBS'] = []
53
    for module in all_modules:
54
        conf.recurse (module, name="required_boost_libs", mandatory=False)
55
56
    if conf.env['REQUIRED_BOOST_LIBS'] is not []:
57
        conf.load('boost')
58
        conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), mandatory=False)
59
        if not conf.env['LIB_BOOST']:
60
            conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), libpath="/usr/lib64", mandatory=False)
61
            if not conf.env['LIB_BOOST']:
62
                conf.env['LIB_BOOST'] = []
63
64
    # Append blddir to the module path before recursing into modules
54
    # Append blddir to the module path before recursing into modules
65
    blddir = os.path.abspath(os.path.join(conf.bldnode.abspath(), conf.variant))
55
    blddir = os.path.abspath(os.path.join(conf.bldnode.abspath(), conf.variant))
66
    conf.env.append_value('NS3_MODULE_PATH', blddir + "/lib")
56
    conf.env.append_value('NS3_MODULE_PATH', blddir + "/lib")
(-)a/wscript (+13 lines)
 Lines 457-462    Link Here 
457
    else:
457
    else:
458
        Logs.warn("CXX Standard flag " + Options.options.cxx_standard + " was not recognized, using compiler's default")
458
        Logs.warn("CXX Standard flag " + Options.options.cxx_standard + " was not recognized, using compiler's default")
459
459
460
    # Find Boost libraries by modules
461
    conf.env['REQUIRED_BOOST_LIBS'] = []
462
    for modules_dir in ['src', 'contrib']:
463
        conf.recurse (modules_dir, name="get_required_boost_libs", mandatory=False)
464
465
    if conf.env['REQUIRED_BOOST_LIBS'] is not []:
466
        conf.load('boost')
467
        conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), mandatory=False)
468
        if not conf.env['LIB_BOOST']:
469
            conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), libpath="/usr/lib64", mandatory=False)
470
            if not conf.env['LIB_BOOST']:
471
                conf.env['LIB_BOOST'] = []
472
460
    # Set this so that the lists won't be printed at the end of this
473
    # Set this so that the lists won't be printed at the end of this
461
    # configure command.
474
    # configure command.
462
    conf.env['PRINT_BUILT_MODULES_AT_END'] = False
475
    conf.env['PRINT_BUILT_MODULES_AT_END'] = False

Return to bug 3007