Adding random jitter for interest reexpression
diff --git a/waf-tools/ns3.py b/waf-tools/ns3.py
index 04a6e9b..8a1f33f 100644
--- a/waf-tools/ns3.py
+++ b/waf-tools/ns3.py
@@ -20,8 +20,13 @@
 def _check_dependencies(conf, required, mandatory):
     # Logs.pprint ('CYAN', '  + %s' % required)
     found = []
+    
+    libversion = "optimized"
+    if conf.options.ns3_debug:
+        libversion = "debug"
+    
     for module in required:
-        retval = conf.check_cfg(package = 'libns3-dev-%s-optimized' % module,
+        retval = conf.check_cfg(package = 'libns3-dev-%s-%s' % (module, libversion),
                                 args='--cflags --libs', mandatory=mandatory,
                                 msg="Checking for ns3-%s" % module,
                                 uselib_store='NS3_%s' % module.upper())