3 # Configuration for the docbook-based manpages.
5 # We require XSLTPROC, as well as specific versions of Docbook and the
8 AC_DEFUN([AMANDA_SETUP_DOCUMENTATION],
10 AC_ARG_ENABLE(manpage-build,
11 AS_HELP_STRING([--enable-manpage-build],
12 [Build the manpages from their XML source (shipped manpages are usually sufficient)]),
13 [ ENABLE_MANPAGE_BUILD=$enableval ],
14 [ ENABLE_MANPAGE_BUILD=no ])
16 # and ensure that everything docbook-related is OK if we'll be using it
17 if test "x$ENABLE_MANPAGE_BUILD" = "xyes"; then
18 DOC_BUILD_DATE=`date '+%d-%m-%Y'`
20 AC_PROG_XSLTPROC([--nonet])
21 AC_CHECK_DOCBOOK_XSLT([1.72.0])
22 AC_CHECK_DOCBOOK_XSLT_MIN([1.72.0])
23 AC_CHECK_DOCBOOK_DTD([4.1.2])
24 AC_CHECK_DOCBOOK_DTD([4.2])
26 if test -z "$XSLTPROC"; then
27 AC_MSG_ERROR([Cannot build manpages: 'xsltproc' was not found.])
30 # if the 'current' Docbook revision is good enough, use that; otherwise,
31 # if 1.72.0 is available, use that.
33 if test "x$DOCBOOK_XSLT_CURRENT_VERSION" = "xno"; then
34 if test "x$HAVE_DOCBOOK_XSLT_1_72_0" = "xno"; then
35 AC_MSG_ERROR([Cannot build manpages: docbook version 1.72.0 or higher required.])
41 # disable validation if the correct DTDs are not available
42 if test "x$HAVE_DOCBOOK_DTD_4_1_2" = "xno" || test "x$HAVE_DOCBOOK_DTD_4_2" = "xno"; then
43 AMANDA_MSG_WARN([Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation])
44 XSLTPROC_FLAGS="$XSLTPROC_FLAGS --novalid"
48 AM_CONDITIONAL(ENABLE_MANPAGE_BUILD, test "x$ENABLE_MANPAGE_BUILD" = "xyes")
50 AC_SUBST(DOC_BUILD_DATE)
55 # AMANDA_SHOW_DOCUMENTATION_SUMMARY
59 # Show a summary of the settings from this file.
61 AC_DEFUN([AMANDA_SHOW_DOCUMENTATION_SUMMARY],
63 echo "Build documentation:" $ENABLE_MANPAGE_BUILD