build: make graphviz optional for building documentation

Change-Id: Icff993cccc675c95cd6f671cd217c74d7768fac9
diff --git a/wscript b/wscript
index cad98bc..cd86ca8 100644
--- a/wscript
+++ b/wscript
@@ -81,6 +81,7 @@
     conf.env.WITH_EXAMPLES = conf.options.with_examples
 
     conf.find_program('sh', var='SH')
+    conf.find_program('dot', var='DOT', mandatory=False)
 
     conf.check_cxx(lib='atomic', uselib_store='ATOMIC', define_name='HAVE_ATOMIC', mandatory=False)
     conf.check_cxx(lib='pthread', uselib_store='PTHREAD', define_name='HAVE_PTHREAD', mandatory=False)
@@ -333,6 +334,7 @@
         target=['docs/doxygen.conf',
                 'docs/named_data_theme/named_data_footer-with-analytics.html'],
         VERSION=VERSION,
+        HAVE_DOT='YES' if bld.env.DOT else 'NO',
         HTML_FOOTER='../build/docs/named_data_theme/named_data_footer-with-analytics.html' \
                         if os.getenv('GOOGLE_ANALYTICS', None) \
                         else '../docs/named_data_theme/named_data_footer.html',