Click integration now builds from standalone source and on OSx as well
authorLalith Suresh <suresh.lalith@gmail.com>
Wed, 23 Jun 2010 17:44:43 +0530
changeset 6310 ce1376cfd708
parent 6309 43978698d3a9
child 6311 ac1114adddc5
Click integration now builds from standalone source and on OSx as well
src/routing/click/wscript
--- a/src/routing/click/wscript	Thu Jun 10 23:19:19 2010 +0530
+++ b/src/routing/click/wscript	Wed Jun 23 17:44:43 2010 +0530
@@ -6,7 +6,7 @@
 
 def set_options(opt):
     opt.add_option('--with-nsclick',
-                   help=('Path to Click installation for NS-3 Click Integration support'),
+                   help=('Path to Click source for NS-3 Click Integration support'),
                    dest='with_nsclick', default=None)
 
 def configure(conf):
@@ -28,6 +28,7 @@
 
     test_code = '''
 #include<sys/types.h>
+#include<sys/time.h>
 #include<click/simclick.h>
 
 #ifdef __cplusplus
@@ -54,16 +55,17 @@
 '''
     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'],'lib')))
+    conf.env.append_value('NS3_MODULE_PATH',os.path.abspath(os.path.join(conf.env['WITH_NSCLICK'],'ns')))
 
     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'],'lib'))]
+    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",
                                   conf.env['NSCLICK'], "nsclick library not found")
     if conf.env['NSCLICK']:
         conf.env.append_value('CXXDEFINES', 'NS3_CLICK')
+        conf.env.append_value('CPPPATH', conf.env['CPPPATH_NSCLICK'])
 
 def build(bld):