33 if Options.options.with_nsc: |
33 if Options.options.with_nsc: |
34 if os.path.isdir(Options.options.with_nsc): |
34 if os.path.isdir(Options.options.with_nsc): |
35 conf.check_message("NSC location", '', True, ("%s (given)" % Options.options.with_nsc)) |
35 conf.check_message("NSC location", '', True, ("%s (given)" % Options.options.with_nsc)) |
36 conf.env['WITH_NSC'] = os.path.abspath(Options.options.with_nsc) |
36 conf.env['WITH_NSC'] = os.path.abspath(Options.options.with_nsc) |
37 else: |
37 else: |
|
38 # ns-3-dev uses ../nsc, while ns-3 releases use ../NSC_RELEASE_NAME |
38 nsc_dir = os.path.join('..', "nsc") |
39 nsc_dir = os.path.join('..', "nsc") |
|
40 nsc_release_dir = os.path.join('..', NSC_RELEASE_NAME) |
39 if os.path.isdir(nsc_dir): |
41 if os.path.isdir(nsc_dir): |
40 conf.check_message("NSC location", '', True, ("%s (guessed)" % nsc_dir)) |
42 conf.check_message("NSC location", '', True, ("%s (guessed)" % nsc_dir)) |
41 conf.env['WITH_NSC'] = os.path.abspath(nsc_dir) |
43 conf.env['WITH_NSC'] = os.path.abspath(nsc_dir) |
|
44 elif os.path.isdir(nsc_release_dir): |
|
45 conf.check_message("NSC location", '', True, ("%s (guessed)" % nsc_release_dir)) |
|
46 conf.env['WITH_NSC'] = os.path.abspath(nsc_release_dir) |
42 del nsc_dir |
47 del nsc_dir |
|
48 del nsc_release_dir |
43 if not conf.env['WITH_NSC']: |
49 if not conf.env['WITH_NSC']: |
44 conf.check_message("NSC location", '', False) |
50 conf.check_message("NSC location", '', False) |
45 conf.report_optional_feature("nsc", "Network Simulation Cradle", False, |
51 conf.report_optional_feature("nsc", "Network Simulation Cradle", False, |
46 "NSC not found (see option --with-nsc)") |
52 "NSC not found (see option --with-nsc)") |
47 return |
53 return |