Skip to content

Commit

Permalink
Click installation prefix can now be passed to --with-nsclick option …
Browse files Browse the repository at this point in the history
…for building ns-3-click
  • Loading branch information
Mathieu Lacage committed Mar 29, 2011
1 parent 8187bea commit f4c2e86
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/click/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Options

def set_options(opt):
opt.add_option('--with-nsclick',
help=('Path to Click source for NS-3 Click Integration support'),
help=('Path to Click source or installation prefix for NS-3 Click Integration support'),
dest='with_nsclick', default=None)

def configure(conf):
Expand Down Expand Up @@ -55,10 +55,13 @@ int main()
'''
conf.env['DL'] = conf.check(mandatory=True, lib='dl', define_name='DL', uselib='DL')

conf.env.append_value('NS3_MODULE_PATH',os.path.abspath(os.path.join(conf.env['WITH_NSCLICK'],'ns')))
for tmp in ['lib', 'ns']:
libdir = os.path.abspath(os.path.join(conf.env['WITH_NSCLICK'],tmp))
if os.path.isdir(libdir):
conf.env.append_value('NS3_MODULE_PATH',libdir)
conf.env['LIBPATH_NSCLICK'] = [libdir]

conf.env['CPPPATH_NSCLICK'] = [os.path.abspath(os.path.join(conf.env['WITH_NSCLICK'],'include'))]
conf.env['LIBPATH_NSCLICK'] = [os.path.abspath(os.path.join(conf.env['WITH_NSCLICK'],'ns'))]

conf.env['NSCLICK'] = conf.check(fragment=test_code, lib='nsclick', uselib='NSCLICK DL')
conf.report_optional_feature("nsclick", "NS-3 Click Integration",
Expand Down

0 comments on commit f4c2e86

Please sign in to comment.