doxygen: make dox
[openafs.git] / acinclude.m4
index 7e02450..9228ac2 100644 (file)
@@ -277,11 +277,36 @@ AC_ARG_WITH([docbook-stylesheets],
                AC_WARN([Docbook stylesheets not found; some documentation can't be built])
        fi)
 
+AC_ARG_WITH([dot],
+       AS_HELP_STRING([--with-dot@<:@=PATH@:>@],
+        [use graphviz dot to generate dependency graphs with doxygen (defaults to autodetect)]),
+        [], [with_dot="maybe"])
+
 enable_login="no"
 
 dnl Check whether kindlegen exists.  If not, we'll suppress that part of the
 dnl documentation build.
 AC_CHECK_PROGS([KINDLEGEN], [kindlegen])
+AC_CHECK_PROGS([DOXYGEN], [doxygen])
+
+dnl Optionally generate graphs with doxygen.
+case "$with_dot" in
+maybe)
+    AC_CHECK_PROGS([DOT], [dot])
+    AS_IF([test "x$DOT" = "x"], [HAVE_DOT="no"], [HAVE_DOT="yes"])
+    ;;
+yes)
+    HAVE_DOT="yes"
+    ;;
+no)
+    HAVE_DOT="no"
+    ;;
+*)
+    HAVE_DOT="yes"
+    DOT_PATH=$with_dot
+esac
+AC_SUBST(HAVE_DOT)
+AC_SUBST(DOT_PATH)
 
 dnl Checks for UNIX variants.
 AC_ISC_POSIX