diff --git a/.gitignore b/.gitignore
index 82976ef9a..18955a0a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,7 +72,9 @@ core
# /doc/
/doc/doxygen
+/doc/install-sh
/doc/man
+/doc/missing
/doc/progs/vm-mem.eps
/doc/progs/vm-mem.png
/doc/progs/vm-mem.svg
diff --git a/INSTALL b/INSTALL
index 5e3920559..788dfa49f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -93,6 +93,15 @@ in an already configured source tree:
make doc
\endverbatim
+If the tree has not been configured and doing so is not desirable or
+possible, then the documentation may be configured separately:
+\verbatim
+ cd doc
+ ./docstrap
+ ./configure
+ make doc
+\endverbatim
+
Then either point your webbrowser to doxygen/html/index.html
, or
copy/move doxygen/html
to a webserver and point your browser
to that. The documentation is currently grossly inadequate, but hopefully
diff --git a/doc/configure.ac b/doc/configure.ac
index ae912f3e3..5d30f7b86 100644
--- a/doc/configure.ac
+++ b/doc/configure.ac
@@ -7,20 +7,32 @@ AC_CONFIG_SRCDIR([template.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign])
-# Checks for programs.
AC_PROG_INSTALL
# PKG_PROG_PKG_CONFIG
-# Checks for libraries.
+AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, false)
+AC_CHECK_PROG(DOT, dot, dot, false)
+AC_CHECK_PROG(MSCGEN, mscgen, mscgen, false)
+AC_CHECK_PROG(TRANSFIG, transfig, transfig, false)
-# Checks for header files.
+if test "x$DOXYGEN" = "xfalse" \
+ -o "x$DOT" = "xfalse" \
+ -o "x$MSCGEN" = "xfalse" \
+ -o "x$TRANSFIG" = "xfalse"; then
+ AC_MSG_ERROR([required tools missing, unable to build documentation])
+fi
-# Checks for typedefs, structures, and compiler characteristics.
-
-# Checks for library functions.
+AC_ARG_ENABLE(static-doc,
+ [ --enable-static-doc Enable generation of doxygen docs for static]
+ [ functions.])
+STATIC_DOC=NO
+if test "x$enable_static_doc" = xyes; then
+ STATIC_DOC=YES
+fi
+AC_SUBST(STATIC_DOC)
TOPSRC=`readlink -f ${srcdir}/..`
AC_SUBST(TOPSRC)
-AC_CONFIG_FILES([Makefile man/Makefile quakeforge.dox])
+AC_CONFIG_FILES([Makefile man/Makefile quakeforge.dox.conf])
AC_OUTPUT