New Qt5-based implementation

Change-Id: I1a165aacd8c8254a250a14a2024fecf50c986abe
diff --git a/wscript b/wscript
index 66b998a..97f13a2 100644
--- a/wscript
+++ b/wscript
@@ -6,18 +6,20 @@
 
 def options(opt):
     opt.load('compiler_c compiler_cxx qt4 gnu_dirs')
-    opt.load('sparkle xcode', tooldir='waf-tools')
+    opt.load('boost sparkle xcode default-compiler-flags', tooldir='waf-tools')
 
     grp = opt.add_option_group('NFD Control Center options')
     grp.add_option('--with-nfd', dest='with_nfd', type=str, default='/usr/local',
                    help='''Root path to NFD installation (default: /usr/local)''')
 
     if Utils.unversioned_sys_platform () == "darwin":
-        grp.add_option('--with-qt', help='''Build QT4 app, instead of native one''',
-                       action='store_true', dest='with_qt', default=False)
+        grp.add_option('--with-qt4', help='''Build QT4 app, instead of native one''',
+                       action='store_true', dest='with_qt4', default=False)
+        grp.add_option('--with-qt5', help='''Build QT5 app, instead of native one''',
+                       action='store_true', dest='with_qt5', default=False)
 
 def configure(conf):
-    conf.load('compiler_c compiler_cxx')
+    conf.load('compiler_c compiler_cxx default-compiler-flags boost')
 
     conf.start_msg('Checking for NFD tools in %s' % conf.options.with_nfd)
     if not conf.find_file(['nfd-start', 'nfd-stop'],
@@ -34,12 +36,18 @@
     conf.define('NFD_STOP_COMMAND', '%s/bin/nfd-stop' % conf.options.with_nfd)
     conf.define('NFD_AUTOCONFIG_COMMAND', '%s/bin/ndn-autoconfig' % conf.options.with_nfd)
 
-    if not conf.options.with_qt and Utils.unversioned_sys_platform() == "darwin":
-        # conf.fatal("Native implementation of NFD Control Center is not yet available")
+    conf.check_boost(lib="system thread")
+
+    if not conf.options.with_qt4 and not not conf.options.with_qt4 and Utils.unversioned_sys_platform() == "darwin":
         conf.env.BUILD_OSX_NATIVE = 1
         conf.recurse('osx')
     else:
-        conf.recurse('qt')
+        if conf.options.with_qt5:
+            conf.env.BUILD_QT5 = 1
+            conf.recurse('qt5')
+        else:
+            conf.env.BUILD_QT4 = 1
+            conf.recurse('qt4')
 
     conf.write_config_header('config.hpp')
 
@@ -47,4 +55,7 @@
     if bld.env.BUILD_OSX_NATIVE:
         bld.recurse('osx')
     else:
-        bld.recurse('qt')
+        if bld.env.BUILD_QT5:
+            bld.recurse('qt5')
+        else:
+            bld.recurse('qt4')