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/type_traits.py b/.waf-tools/type_traits.py
new file mode 100644
index 0000000..07eb129
--- /dev/null
+++ b/.waf-tools/type_traits.py
@@ -0,0 +1,30 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+#
+# Copyright (c) 2014, Regents of the University of California
+#
+# GPL 3.0 license, see the COPYING.md file for more information
+
+from waflib import Configure
+
+IS_DEFAULT_CONSTRUCTIBLE_CHECK = '''
+#include <type_traits>
+static_assert(std::is_default_constructible<int>::value, "");
+'''
+
+IS_MOVE_CONSTRUCTIBLE_CHECK = '''
+#include <type_traits>
+static_assert(std::is_move_constructible<int>::value, "");
+'''
+
+def configure(conf):
+    if conf.check_cxx(msg='Checking for std::is_default_constructible',
+                      fragment=IS_DEFAULT_CONSTRUCTIBLE_CHECK,
+                      features='cxx', mandatory=False):
+        conf.define('HAVE_IS_DEFAULT_CONSTRUCTIBLE', 1)
+        conf.env['HAVE_IS_DEFAULT_CONSTRUCTIBLE'] = True
+
+    if conf.check_cxx(msg='Checking for std::is_move_constructible',
+                      fragment=IS_MOVE_CONSTRUCTIBLE_CHECK,
+                      features='cxx', mandatory=False):
+        conf.define('HAVE_IS_MOVE_CONSTRUCTIBLE', 1)
+        conf.env['HAVE_IS_MOVE_CONSTRUCTIBLE'] = True