[Xcb] [PATCH libxcb 7/7] autoconf: use default xorg configuration for doxygen documentation

Gaetan Nadon memsize at videotron.ca
Tue Dec 3 08:12:09 PST 2013

No content or form changes for the xcb manual or tutorial.
Only the configuration user visible bits change.

Xcb will now have the same configuration options as the 30 other
xorg modules.

Xorg classifies documentation as "user", "developer" or "specifications".
The xcb manual falls under the "developer" category. Developers docs
are never installed under $prefix.

A builder can selectively turn on/off any or all of the categories. He can
also selectively turn on/off any of the many tools used to generate
documentation such as doxygen, xmlto, etc... Each tool has an environment
variable defined such as DOXYGEN.

Other features are available, the user interface and the functionality
is the same on all modules.

--with-doxygen=FILE is replaced with DOXYGEN env variable
--disable-build-docs is replaced with --disable-devel-docs

The new interface displayed with ./configure --help:

  --enable-devel-docs     Enable building the developer documentation
                          (default: yes)
  --with-doxygen          Use doxygen to regenerate documentation (default:
  DOXYGEN     Path to doxygen command
  DOT         Path to the dot graphics utility

The dot tool checking has been added to util-macros in version 1.18.

Refer to the table of existing docs in xorg.
XCB will be added for the doxygen generated API manual.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
 configure.ac    |    9 ++++--
 doc/Makefile.am |    6 +++-
 m4/xcb.m4       |   89 -------------------------------------------------------
 3 files changed, 12 insertions(+), 92 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1fa750f..f048889 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,13 @@ m4_ifndef([XORG_MACROS_VERSION],
           [m4_fatal([must install xorg-macros 1.18 or later before running autoconf/autogen])])
+# The dot drawing tool is checked by XORG_WITH_DOXYGEN, needed for xcb manual
+if test x"$HAVE_DOT" = xno; then
+    AC_MSG_WARN([dot not found - doxygen targets will be skipped])
 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=yes], [HAVE_CHECK=no])
@@ -179,8 +186,6 @@ AC_SUBST(xcbincludedir)
 AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [getaddrinfo() function is available])], )
 case $host_os in
diff --git a/doc/Makefile.am b/doc/Makefile.am
index dbe2e0b..f3c934a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -8,7 +8,9 @@ xkb_issues
 docdirs = $(srcdir)/tutorial
 docdirs += manual
@@ -21,6 +23,8 @@ clean-local:
 	rm -rf manual/
 all-local: $(docdirs)
diff --git a/m4/xcb.m4 b/m4/xcb.m4
index ad24bc2..32e852d 100644
--- a/m4/xcb.m4
+++ b/m4/xcb.m4
@@ -31,95 +31,6 @@ extern void f(int);
-dnl Configure script for doxygen
-dnl Vincent Torri 2006-05-11
-dnl Test for the doxygen program, and define BUILD_DOCS and DOXYGEN.
-dnl Disable the build of the documentation
-   [build_docs],
-      [--disable-build-docs],
-      [Disable the build of the documentation]),
-   [if test x"$enableval" != x"yes" ; then
-       enable_build_docs="no"
-    else
-       enable_build_docs="yes"
-    fi],
-   [enable_build_docs="yes"])
-if test "$enable_build_docs" = "no" ; then
-    BUILD_DOCS=no
-dnl Get the prefix where doxygen is installed.
-   [doxygen],
-      [--with-doxygen=FILE],
-      [doxygen program to use (eg /usr/bin/doxygen)]),
-   dnl
-   dnl Check the given doxygen program.
-   dnl
-   [DOXYGEN=${withval}
-       [BUILD_DOCS],
-       [${DOXYGEN}],
-       [yes],
-       [no])
-    if test $BUILD_DOCS = no; then
-       echo "WARNING:"
-       echo "The doxygen program you specified:"
-       echo "$DOXYGEN"
-       echo "was not found.  Please check the path and make sure "
-       echo "the program exists and is executable."
-       AC_MSG_WARN(
-          [Warning: no doxygen detected. Documentation will not be built])
-    fi],
-       [BUILD_DOCS],
-       [${DOXYGEN}],
-       [yes],
-       [no])
-    if test ${BUILD_DOCS} = no; then
-       echo "WARNING:"
-       echo "The doxygen program was not found in your execute"
-       echo "You may have doxygen installed somewhere not covered by your path."
-       echo ""
-       echo "If this is the case make sure you have the packages installed, AND"
-       echo "that the doxygen program is in your execute path (see your"
-       echo "shell manual page on setting the \$PATH environment variable), OR"
-       echo "alternatively, specify the program to use with --with-doxygen."
-       AC_MSG_WARN(
-          [Warning: no doxygen detected. Documentation will not be built])
-    fi])
-    AC_PATH_PROG(DOT, dot, no)
-    if test "$DOT" = "no"; then
-        AC_MSG_WARN([Warning: no dot detected. Documentation will not be built])
-    fi
-AC_MSG_CHECKING([whether documentation is built])
-dnl Substitution
 dnl Detection and configuration of the visibility feature of gcc
 dnl Vincent Torri 2006-02-11

More information about the Xcb mailing list