src/openflow/wscript
changeset 7494 d93f5e8e0a59
parent 7488 72d0c878f3c7
child 7501 c9eb1416deec
equal deleted inserted replaced
7493:3bbefa91e694 7494:d93f5e8e0a59
     1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     2 
     2 
     3 import os
     3 import os
     4 import Options
     4 import Options
       
     5 from waflib.Errors import WafError
     5 
     6 
     6 def options(opt):
     7 def options(opt):
     7     opt.add_option('--with-openflow',
     8     opt.add_option('--with-openflow',
     8 		   help=('Path to OFSID source for NS-3 OpenFlow Integration support'),
     9 		   help=('Path to OFSID source for NS-3 OpenFlow Integration support'),
     9 		   default='', dest='with_openflow')
    10 		   default='', dest='with_openflow')
    10     opt.tool_options('boost', tooldir=["waf-tools"])
    11     opt.tool_options('boost', tooldir=["waf-tools"])
    11 
    12 
    12 def configure(conf):
    13 def configure(conf):
    13     conf.check_tool('boost')
    14     try:
    14     conf.env['BOOST'] = conf.check_boost(lib = 'signals filesystem',
    15         conf.check_tool('boost')
    15                                          kind = 'STATIC_BOTH',
       
    16                                          score_version = (-1000, 1000),
       
    17                                          tag_minscore = 1000)
       
    18     if not conf.env['BOOST']:
       
    19         conf.env['BOOST'] = conf.check_boost(lib = 'signals filesystem',
    16         conf.env['BOOST'] = conf.check_boost(lib = 'signals filesystem',
    20                                             kind = 'STATIC_BOTH',
    17                                              kind = 'STATIC_BOTH',
    21                                             score_version = (-1000, 1000),
    18                                              score_version = (-1000, 1000),
    22                                             tag_minscore = 1000,
    19                                              tag_minscore = 1000)
    23                                             libpath="/usr/lib64")
    20         if not conf.env['BOOST']:
       
    21             conf.env['BOOST'] = conf.check_boost(lib = 'signals filesystem',
       
    22                                                 kind = 'STATIC_BOTH',
       
    23                                                 score_version = (-1000, 1000),
       
    24                                                 tag_minscore = 1000,
       
    25                                                 libpath="/usr/lib64")
       
    26     except WafError:
       
    27         conf.env['BOOST'] = False
    24 
    28 
    25     if not conf.env['BOOST']:
    29     if not conf.env['BOOST']:
    26 	conf.report_optional_feature("openflow", "NS-3 OpenFlow Integration", False,
    30 	conf.report_optional_feature("openflow", "NS-3 OpenFlow Integration", False,
    27 				     "Required boost libraries not found")
    31 				     "Required boost libraries not found")
    28 
    32