Check the availability of DOT tool

Checked the availability of DOT tool, and adaptively decided whether
or not to use it in documentation. This also stopped compiler warning
"dot: command not found".

BUG=aomedia:2674
BUG=aomedia:2682

Change-Id: Idf8172c5ab00c8ba4e25f50bb2879b5f75be5ec4
diff --git a/docs.cmake b/docs.cmake
index d4decdc..d7af430 100644
--- a/docs.cmake
+++ b/docs.cmake
@@ -256,6 +256,11 @@
   file(APPEND "${AOM_DOXYFILE}"
        "PROJECT_LOGO = ${AOM_CONFIG_DIR}/${aom_logo}\n")
 
+  # Only set HAVE_DOT to YES if dot tool is found.
+  if(DOXYGEN_HAVE_DOT)
+    file(APPEND "${AOM_DOXYFILE}" "HAVE_DOT = YES\n")
+  endif()
+
   # Add the doxygen generation rule.
   add_custom_target(docs ALL
                     COMMAND "${DOXYGEN_EXECUTABLE}" "${AOM_DOXYFILE}"
diff --git a/libs.doxy_template b/libs.doxy_template
index 105c7c0..cde1d1a 100644
--- a/libs.doxy_template
+++ b/libs.doxy_template
@@ -2210,7 +2210,7 @@
 # set to NO
 # The default value is: YES.
 
-HAVE_DOT               = YES
+HAVE_DOT               = NO
 
 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
 # to run in parallel. When set to 0 doxygen will base this on the number of