build: Fix compilation on Ubuntu platform and add work-around for ndn-cxx regression

Note that on Ubuntu 12.04, either boost libraries or compiler needs to be upgraded.

Change-Id: I33f1089f961f99abf3d1803bf833e76ff7fb528d
Refs: #2379, #2380, #2382, #2381, #2383
diff --git a/.waf-tools/compiler-features.py b/.waf-tools/compiler-features.py
new file mode 100644
index 0000000..5344939
--- /dev/null
+++ b/.waf-tools/compiler-features.py
@@ -0,0 +1,27 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+from waflib.Configure import conf
+
+OVERRIDE = '''
+class Base
+{
+  virtual void
+  f(int a);
+};
+
+class Derived : public Base
+{
+  virtual void
+  f(int a) override;
+};
+'''
+
+@conf
+def check_override(self):
+    if self.check_cxx(msg='Checking for override specifier',
+                      fragment=OVERRIDE,
+                      features='cxx', mandatory=False):
+        self.define('HAVE_CXX_OVERRIDE', 1)
+
+def configure(conf):
+    conf.check_override()