common/autoconf/jdk-options.m4
changeset 44734 70bbd6884287
parent 44727 ca162fc20601
child 47060 1deb34f59d8e
--- a/common/autoconf/jdk-options.m4	Sun Apr 23 21:10:32 2017 +0200
+++ b/common/autoconf/jdk-options.m4	Sun Apr 23 21:34:02 2017 +0200
@@ -156,7 +156,7 @@
 
   # Should we build the complete docs, or just a lightweight version?
   AC_ARG_ENABLE([full-docs], [AS_HELP_STRING([--enable-full-docs],
-      [build complete documentation @<:@disabled@:>@])])
+      [build complete documentation @<:@enabled if all tools found@:>@])])
 
   # Verify dependencies
   AC_MSG_CHECKING([for graphviz dot])
@@ -167,6 +167,14 @@
     FULL_DOCS_DEP_MISSING=true
   fi
 
+  AC_MSG_CHECKING([for pandoc])
+  if test "x$PANDOC" != "x"; then
+    AC_MSG_RESULT([yes])
+  else
+    AC_MSG_RESULT([no, cannot generate full docs])
+    FULL_DOCS_DEP_MISSING=true
+  fi
+
   AC_MSG_CHECKING([full docs])
   if test "x$enable_full_docs" = xyes; then
     if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
@@ -181,8 +189,14 @@
     ENABLE_FULL_DOCS=false
     AC_MSG_RESULT([no, forced])
   elif test "x$enable_full_docs" = x; then
-    ENABLE_FULL_DOCS=false
-    AC_MSG_RESULT([no, default])
+    # Check for prerequisites
+    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
+      ENABLE_FULL_DOCS=false
+      AC_MSG_RESULT([no, missing dependencies])
+    else
+      ENABLE_FULL_DOCS=true
+      AC_MSG_RESULT([yes, dependencies present])
+    fi
   else
     AC_MSG_ERROR([--enable-full-docs can only take yes or no])
   fi