Alexander Afanasyev | 864522f | 2012-05-31 13:33:57 -0700 | [diff] [blame^] | 1 | From 63e2f7d75601540169f62dea0b8aa17fda34812a Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 3 | Date: Wed, 29 Feb 2012 10:07:08 -0800 |
| 4 | Subject: [PATCH] core+openflow: Moving `boost`-related configuration to main |
| 5 | wscript. |
| 6 | |
| 7 | There is a problem when two different modules require different boost |
| 8 | libs. Only requirements of the last module are actually picked up by |
| 9 | the build system. |
| 10 | --- |
| 11 | src/openflow/wscript | 10 +--------- |
| 12 | wscript | 9 +++++++++ |
| 13 | 2 files changed, 10 insertions(+), 9 deletions(-) |
| 14 | |
| 15 | diff --git a/src/openflow/wscript b/src/openflow/wscript |
| 16 | index b18d2c1..21c483a 100644 |
| 17 | --- a/src/openflow/wscript |
| 18 | +++ b/src/openflow/wscript |
| 19 | @@ -2,23 +2,15 @@ |
| 20 | |
| 21 | import os |
| 22 | import Options |
| 23 | +import Logs |
| 24 | from waflib.Errors import WafError |
| 25 | |
| 26 | def options(opt): |
| 27 | opt.add_option('--with-openflow', |
| 28 | help=('Path to OFSID source for NS-3 OpenFlow Integration support'), |
| 29 | default='', dest='with_openflow') |
| 30 | - opt.tool_options('boost', tooldir=["waf-tools"]) |
| 31 | |
| 32 | def configure(conf): |
| 33 | - try: |
| 34 | - conf.check_tool('boost') |
| 35 | - conf.check_boost(lib='signals filesystem') |
| 36 | - if not conf.env.LIB_BOOST: |
| 37 | - conf.check_boost(lib='signals filesystem', libpath="/usr/lib64") |
| 38 | - except WafError: |
| 39 | - conf.env['LIB_BOOST'] = [] |
| 40 | - |
| 41 | if not conf.env.LIB_BOOST: |
| 42 | conf.report_optional_feature("openflow", "NS-3 OpenFlow Integration", False, |
| 43 | "Required boost libraries not found") |
| 44 | diff --git a/wscript b/wscript |
| 45 | index 05440fa..c60fd18 100644 |
| 46 | --- a/wscript |
| 47 | +++ b/wscript |
| 48 | @@ -125,6 +125,7 @@ def options(opt): |
| 49 | opt.load('compiler_cxx') |
| 50 | opt.load('cflags') |
| 51 | opt.load('gnu_dirs') |
| 52 | + opt.tool_options('boost', tooldir=["waf-tools"]) |
| 53 | |
| 54 | opt.add_option('--cwd', |
| 55 | help=('Set the working directory for a program.'), |
| 56 | @@ -364,6 +365,14 @@ def configure(conf): |
| 57 | conf.report_optional_feature("static", "Static build", False, |
| 58 | "Link flag -Wl,--whole-archive,-Bstatic does not work") |
| 59 | |
| 60 | + try: |
| 61 | + conf.check_tool('boost') |
| 62 | + conf.check_boost(lib='signals filesystem iostreams regex') |
| 63 | + if not conf.env.LIB_BOOST: |
| 64 | + conf.check_boost(lib='signals filesystem iostreams regex', libpath="/usr/lib64") |
| 65 | + except WafError: |
| 66 | + conf.env['LIB_BOOST'] = [] |
| 67 | + |
| 68 | # Set this so that the lists won't be printed at the end of this |
| 69 | # configure command. |
| 70 | conf.env['PRINT_BUILT_MODULES_AT_END'] = False |
| 71 | -- |
| 72 | 1.7.10.2 |
| 73 | |