[Xcb-commit] 2 commits - acinclude.m4 configure.ac
Vincent Torri
doursse at kemper.freedesktop.org
Sun Nov 5 09:22:23 PST 2006
acinclude.m4 | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 4 ++
2 files changed, 82 insertions(+), 1 deletion(-)
New commits:
diff-tree e3b7009dc0be6515d23fbda9c744082506df4cb0 (from parents)
Merge: 0262cd63a2c10e52daa3bd71cb21a6a37017f234 32cd2d20477ab17704f0a2696c2b3bc2ff8f42de
Author: TORRI Vincent <torri at alf94-3-82-66-248-160.fbx.proxad.net>
Date: Sun Nov 5 18:21:34 2006 +0100
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb/libxcb
diff-tree 0262cd63a2c10e52daa3bd71cb21a6a37017f234 (from 8eba8690adac2c4425f4cac490c77f9f3b1da6f7)
Author: TORRI Vincent <torri at alf94-3-82-66-248-160.fbx.proxad.net>
Date: Sun Nov 5 18:20:45 2006 +0100
add AM_CHECK_DOXYGEN macro
diff --git a/acinclude.m4 b/acinclude.m4
index 5a6993d..27fda42 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -27,3 +27,82 @@ extern void f(int);
AC_MSG_RESULT(no)])
CFLAGS=${save_CFLAGS}
])
+dnl Configure script for doxygen
+dnl Vincent Torri 2006-05-11
+dnl
+dnl AM_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for the doxygen program, and define BUILD_DOCS and DOXYGEN.
+dnl
+AC_DEFUN([AM_CHECK_DOXYGEN],
+ [
+ DOXYGEN="doxygen"
+ dnl
+ dnl Disable the build of the documentation
+ dnl
+ AC_ARG_ENABLE(
+ [build_docs],
+ AC_HELP_STRING(
+ [--disable-build-docs],
+ [Disable the build of the documentation]),
+ [if test "${disable_build_docs}" = "yes" ; then
+ enable_build_docs="no"
+ else
+ enable_build_docs="yes"
+ fi],
+ [enable_build_docs="yes"])
+ dnl
+ dnl Get the prefix where doxygen is installed.
+ dnl
+ AC_ARG_WITH(
+ [doxygen],
+ AC_HELP_STRING(
+ [--with-doxygen=FILE],
+ [doxygen program to use (eg /usr/bin/doxygen)]),
+ dnl
+ dnl Check the given doxygen program.
+ dnl
+ [DOXYGEN=${withval}
+ AC_CHECK_PROG(
+ [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],
+ [AC_CHECK_PROG(
+ [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's 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_MSG_CHECKING([whether documentation is built])
+ AC_MSG_RESULT([${BUILD_DOCS}])
+ dnl
+ dnl Substitution
+ dnl
+ AC_SUBST([DOXYGEN])
+ dnl according to the autoconf doc, htmldir == docdir == ${prefix}/share/doc/${PACKAGE_NAME}
+ dnl I tried to use docdir, without success
+ htmldir=${prefix}/share/doc/${PACKAGE_NAME}
+ AC_SUBST(htmldir)
+ AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
+ ])
+dnl End of acinclude.m4
diff --git a/configure.ac b/configure.ac
index 72136cf..9cc8bca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,7 +118,9 @@ AC_SUBST(CWARNFLAGS)
GCC_CHECK_VISIBILITY()
-AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
+AM_CHECK_DOXYGEN()
+
+AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile doc/Makefile])
AC_CONFIG_FILES([xcb.pc xcb-xlib.pc xcb-composite.pc xcb-damage.pc xcb-dpms.pc xcb-glx.pc xcb-randr.pc xcb-record.pc xcb-render.pc xcb-res.pc xcb-screensaver.pc xcb-shape.pc xcb-shm.pc xcb-sync.pc xcb-xevie.pc xcb-xf86dri.pc xcb-xfixes.pc xcb-xinerama.pc xcb-xprint.pc xcb-xtest.pc xcb-xv.pc xcb-xvmc.pc])
AC_OUTPUT
More information about the xcb-commit
mailing list