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

(-)a/src/internet-stack/wscript (-3 / +16 lines)
 Lines 46-51    Link Here 
46
            conf.env['WITH_NSC'] = os.path.abspath(nsc_release_dir)
46
            conf.env['WITH_NSC'] = os.path.abspath(nsc_release_dir)
47
        del nsc_dir
47
        del nsc_dir
48
        del nsc_release_dir
48
        del nsc_release_dir
49
49
    if not conf.env['WITH_NSC']:
50
    if not conf.env['WITH_NSC']:
50
        conf.check_message("NSC location", '', False)
51
        conf.check_message("NSC location", '', False)
51
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
52
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
 Lines 57-70    Link Here 
57
    else:
58
    else:
58
        arch = None
59
        arch = None
59
    ok = False
60
    ok = False
60
    if arch == 'x86_64' or arch == 'i686' or arch == 'i586' or arch == 'i486' or arch == 'i386':
61
    if arch in ('x86_64', 'i686', 'i586', 'i486', 'i386'):
61
        conf.env['NSC_ENABLED'] = 'yes'
62
        conf.env['NSC_ENABLED'] = 'yes'
62
        conf.env.append_value('CXXDEFINES', 'NETWORK_SIMULATION_CRADLE')
63
        conf.env.append_value('CXXDEFINES', 'NETWORK_SIMULATION_CRADLE')
63
        conf.check(mandatory=True, lib='dl', define_name='HAVE_DL', uselib='DL')
64
        conf.check(mandatory=True, lib='dl', define_name='HAVE_DL', uselib='DL')
64
        ok = True
65
        ok = True
65
    conf.check_message('NSC supported architecture', arch, ok)
66
    conf.check_message('NSC supported architecture', arch, ok)
66
    conf.report_optional_feature("nsc", "Network Simulation Cradle", ok,
67
    
67
                                 "architecture %r not supported" % arch)
68
    if not ok:
69
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
70
                                     "architecture %r not supported" % arch)
71
        return
72
73
    lib_to_check = 'liblinux2.6.26.so'
74
75
    if not os.path.exists(os.path.join(conf.env['WITH_NSC'], lib_to_check)):
76
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
77
            "NSC library %s is missing: NSC has not been built?" % lib_to_check)
78
        return
68
79
69
    # append the NSC kernel dirs to the module path so that these dirs
80
    # append the NSC kernel dirs to the module path so that these dirs
70
    # will end up in the LD_LIBRARY_PATH, thus allowing the NSC NS-3
81
    # will end up in the LD_LIBRARY_PATH, thus allowing the NSC NS-3
 Lines 73-78    Link Here 
73
        conf.env.append_value('NS3_MODULE_PATH',
84
        conf.env.append_value('NS3_MODULE_PATH',
74
                              os.path.abspath(os.path.join(conf.env['WITH_NSC'], nsc_module)))
85
                              os.path.abspath(os.path.join(conf.env['WITH_NSC'], nsc_module)))
75
86
87
    conf.report_optional_feature("nsc", "Network Simulation Cradle", True, "")
88
76
89
77
90
78
def build(bld):
91
def build(bld):

Return to bug 980