From ccc4926813482545ea47e85e8d134d504c68f3e7 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 28 Apr 2003 23:40:17 +0000 Subject: 2003-04-28 Havoc Pennington * configure.in: add --enable-docs which by default is auto yes if doxygen and db2html found, no otherwise; but can be forced on/off * doc/Makefile.am: conditionalize whether to build docs on --enable-docs --- configure.in | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 6c4982f7..abb309c5 100644 --- a/configure.in +++ b/configure.in @@ -30,6 +30,7 @@ AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],ena AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) AC_ARG_ENABLE(asserts, [ --enable-asserts include assertion checks],enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE) AC_ARG_ENABLE(checks, [ --enable-checks include sanity checks on public API],enable_checks=$enableval,enable_checks=yes) +AC_ARG_ENABLE(docs, [ --enable-docs build documentation (requires Doxygen and jade)],enable_docs=$enableval,enable_docs=auto) AC_ARG_ENABLE(gcov, [ --enable-gcov compile with coverage profiling instrumentation (gcc only)],enable_gcov=$enableval,enable_gcov=no) AC_ARG_WITH(xml, [ --with-xml=[libxml/expat] XML library to use]) @@ -431,6 +432,36 @@ dnl Qt flags AC_SUBST(DBUS_QT_CXXFLAGS) AC_SUBST(DBUS_QT_LIBS) +### Documentation + +AC_PATH_PROG(DOXYGEN, doxygen, no) +AC_PATH_PROG(DB2HTML, db2html, no) + +AC_MSG_CHECKING([whether to build documentation]) + +if test x$DOXYGEN = xno -o x$DB2HTML = xno ; then + have_docs_tools=no +else + have_docs_tools=yes +fi + +if test x$enable_docs = xauto ; then + if test x$have_docs_tools = xno ; then + enable_docs=no + else + enable_docs=yes + fi +fi + +if test x$enable_docs = xyes; then + if test x$have_docs_tools = xno; then + AC_MSG_ERROR([Building docs explicitly required, but Doxygen or db2html not found]) + fi +fi + +AM_CONDITIONAL(DBUS_DOCS_ENABLED, test x$enable_docs = xyes) +AC_MSG_RESULT(yes) + #### find the actual value for $prefix that we'll end up with ## (I know this is broken and should be done in the Makefile, but ## that's a major pain and almost nobody actually seems to care) @@ -576,6 +607,8 @@ echo " source code location: ${srcdir} compiler: ${CC} cflags: ${CFLAGS} + Doxygen: ${DOXYGEN} + db2html: ${DB2HTML} Maintainer mode: ${USE_MAINTAINER_MODE} gcc coverage profiling: ${enable_gcov} @@ -585,6 +618,7 @@ echo " Building checks: ${enable_checks} Building Qt bindings: ${have_qt} Building GLib bindings: ${have_glib} + Building documentation: ${enable_docs} Using XML parser: ${with_xml} Init scripts style: ${with_init_scripts} System bus socket: ${DBUS_SYSTEM_SOCKET} -- cgit