From: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date: Sat, 27 Feb 2021 17:03:09 -0500
Subject: Disable building docs for jitter

We exclude the documentation from jitter because of DFSG compliance,
so we have to patch its build systems to not build anything under
docs/.

Forwarded: not-needed
---
 jitter/Makefile.am  | 284 ++++++++++++++++++++++++++--------------------------
 jitter/configure.ac | 214 +++++++++++++++++++--------------------
 2 files changed, 249 insertions(+), 249 deletions(-)

diff --git a/jitter/Makefile.am b/jitter/Makefile.am
index 62594ee..1101ce2 100644
--- a/jitter/Makefile.am
+++ b/jitter/Makefile.am
@@ -1447,32 +1447,32 @@ EXTRA_DIST += \
 # Distribute the GNU Libtextstyle default style for Structured and the Structured VM.  FIXME: install.
 EXTRA_DIST += example-vms/structured/structured-style.css
 
-# Man page for the main Structured executable.  We currently generate only
-# one man page instead of one per each of the up to four functionally
-# indentical executables.
-if JITTER_CAN_REBUILD_MAN_PAGES
-  # See the comment about doc/jitter.1 and its conditional generation.
-  $(srcdir)/example-vms/structured/doc/structured.1: bin/structured$(EXEEXT)
-	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
-          --info-page='structured' \
-          "$(JITTER_EMULATOR) bin/structured$(EXEEXT)" || true
-else # ! JITTER_CAN_REBUILD_MAN_PAGES
-  $(srcdir)/example-vms/structured/doc/structured.1: doc/missing-man-page.1
-	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
-endif
-dist_man1_MANS += $(srcdir)/example-vms/structured/doc/structured.1
-
-# Structured documentation.
-info_TEXINFOS += \
-  example-vms/structured/doc/structured.texi
-example_vms_structured_doc_structured_TEXINFOS = \
-  $(srcdir)/example-vms/structured/doc/gpl.texi \
-  $(srcdir)/example-vms/structured/doc/fdl.texi
-# This is an easy way of not distributing two copies of the same two files.
-$(srcdir)/example-vms/structured/doc/gpl.texi: doc/gpl.texi
-	cp "$<" "$@"
-$(srcdir)/example-vms/structured/doc/fdl.texi: doc/fdl.texi
-	cp "$<" "$@"
+# # Man page for the main Structured executable.  We currently generate only
+# # one man page instead of one per each of the up to four functionally
+# # indentical executables.
+# if JITTER_CAN_REBUILD_MAN_PAGES
+#   # See the comment about doc/jitter.1 and its conditional generation.
+#   $(srcdir)/example-vms/structured/doc/structured.1: bin/structured$(EXEEXT)
+# 	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
+#           --info-page='structured' \
+#           "$(JITTER_EMULATOR) bin/structured$(EXEEXT)" || true
+# else # ! JITTER_CAN_REBUILD_MAN_PAGES
+#   $(srcdir)/example-vms/structured/doc/structured.1: doc/missing-man-page.1
+# 	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
+# endif
+# dist_man1_MANS += $(srcdir)/example-vms/structured/doc/structured.1
+
+# # Structured documentation.
+# info_TEXINFOS += \
+#   example-vms/structured/doc/structured.texi
+# example_vms_structured_doc_structured_TEXINFOS = \
+#   $(srcdir)/example-vms/structured/doc/gpl.texi \
+#   $(srcdir)/example-vms/structured/doc/fdl.texi
+# # This is an easy way of not distributing two copies of the same two files.
+# $(srcdir)/example-vms/structured/doc/gpl.texi: doc/gpl.texi
+# 	cp "$<" "$@"
+# $(srcdir)/example-vms/structured/doc/fdl.texi: doc/fdl.texi
+# 	cp "$<" "$@"
 
 
 # Jittery Lisp example.
@@ -1627,17 +1627,17 @@ endif # JITTER_HAVE_BOEHM_GC
 # Man page for the main JitterLisp executable.  We currently generate only
 # one man page instead of one per each of the up to sixteen functionally
 # indentical executables.
-if JITTER_CAN_REBUILD_MAN_PAGES
-  # See the comment about doc/jitter.1 and its conditional generation.
-  $(srcdir)/example-vms/jitterlisp/doc/jitterlisp.1: bin/jitterlisp$(EXEEXT)
-	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
-          --info-page='jitterlisp'\
-	  "$(JITTER_EMULATOR) bin/jitterlisp$(EXEEXT)" || true
-else # ! JITTER_CAN_REBUILD_MAN_PAGES
-  $(srcdir)/example-vms/jitterlisp/doc/jitterlisp.1: doc/missing-man-page.1
-	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
-endif
-dist_man1_MANS += $(srcdir)/example-vms/jitterlisp/doc/jitterlisp.1
+# if JITTER_CAN_REBUILD_MAN_PAGES
+#   # See the comment about doc/jitter.1 and its conditional generation.
+#   $(srcdir)/example-vms/jitterlisp/doc/jitterlisp.1: bin/jitterlisp$(EXEEXT)
+# 	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
+#           --info-page='jitterlisp'\
+# 	  "$(JITTER_EMULATOR) bin/jitterlisp$(EXEEXT)" || true
+# else # ! JITTER_CAN_REBUILD_MAN_PAGES
+#   $(srcdir)/example-vms/jitterlisp/doc/jitterlisp.1: doc/missing-man-page.1
+# 	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
+# endif
+# dist_man1_MANS += $(srcdir)/example-vms/jitterlisp/doc/jitterlisp.1
 
 
 if JITTER_ENABLE_DISPATCH_SWITCH
@@ -1904,16 +1904,16 @@ EXTRA_DIST += \
 EXTRA_DIST += example-vms/jitterlisp/THANKS
 
 # JitterLisp documentation.
-info_TEXINFOS += \
-  example-vms/jitterlisp/doc/jitterlisp.texi
-example_vms_jitterlisp_doc_jitterlisp_TEXINFOS = \
-  $(srcdir)/example-vms/jitterlisp/doc/gpl.texi \
-  $(srcdir)/example-vms/jitterlisp/doc/fdl.texi
-# This is an easy way of not distributing two copies of the same two files.
-$(srcdir)/example-vms/jitterlisp/doc/gpl.texi: doc/gpl.texi
-	cp "$<" "$@"
-$(srcdir)/example-vms/jitterlisp/doc/fdl.texi: doc/fdl.texi
-	cp "$<" "$@"
+# info_TEXINFOS += \
+#   example-vms/jitterlisp/doc/jitterlisp.texi
+# example_vms_jitterlisp_doc_jitterlisp_TEXINFOS = \
+#   $(srcdir)/example-vms/jitterlisp/doc/gpl.texi \
+#   $(srcdir)/example-vms/jitterlisp/doc/fdl.texi
+# # This is an easy way of not distributing two copies of the same two files.
+# $(srcdir)/example-vms/jitterlisp/doc/gpl.texi: doc/gpl.texi
+# 	cp "$<" "$@"
+# $(srcdir)/example-vms/jitterlisp/doc/fdl.texi: doc/fdl.texi
+# 	cp "$<" "$@"
 
 
 # Build examples
@@ -1978,19 +1978,19 @@ EXTRA_DIST += \
 # Texinfo documentation, or lack thereof.
 # ################################################################
 
-MAKEINFO = $(JITTER_MAKEINFO)
-TEXI2DVI = $(JITTER_TEXI2DVI)
+# MAKEINFO = $(JITTER_MAKEINFO)
+# TEXI2DVI = $(JITTER_TEXI2DVI)
 
-TEXIINFO_OPTIONS = -I $(abs_top_builddir)/doc
-AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --number-sections --fill-column=100
+# TEXIINFO_OPTIONS = -I $(abs_top_builddir)/doc
+# AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --number-sections --fill-column=100
 
-info_TEXINFOS += \
-  doc/jitter.texi
-doc_jitter_TEXINFOS = \
-  doc/gpl.texi doc/fdl.texi
+# info_TEXINFOS += \
+#   doc/jitter.texi
+# doc_jitter_TEXINFOS = \
+#   doc/gpl.texi doc/fdl.texi
 
-EXTRA_DIST += \
-  doc/COPYING.DOC
+# EXTRA_DIST += \
+#   doc/COPYING.DOC
 
 # Fail cleanly when attempting to generate hardcopy documentation by using the
 # format name as a target if configure did not find the necessary tools.
@@ -1998,53 +1998,53 @@ EXTRA_DIST += \
 # It would be too messy to do this for every possible manual target, but the
 # format target should cover most practical cases where users are likely to
 # get surprised.
-if ! JITTER_HAVE_TEXI2DVI
-missinghardcopytools:
-	@echo 'You are missing the tools to generate hardcopy documentation.'
-	@exit 0
-dvi: missinghardcopytools
-ps: missinghardcopytools
-pdf: missinghardcopytools
-endif # ! JITTER_HAVE_TEXI2DVI
-
-# Avoid building Jitter's documentation on --disable-texinfo.
-if ! JITTER_HAVE_TEXINFO
-# Unfortunately it does not seem to be possible to disable TEXINFOS from
-# Automake conditionals, but this workaround is easy.
-# It is not completely clean: this is a redefinition of a rule generated by
-# Automake.
-warn-on-disable-texinfo:
-	@echo 'Not building Texinfo documentation: disabled at configure time.'
-info: warn-on-disable-texinfo \
-  "$(srcdir)"/doc/jitter.info \
-  "$(srcdir)"/example-vms/jitterlisp/doc/jitterlisp.info \
-  "$(srcdir)"/example-vms/structured/doc/structured.info
-html: warn-on-disable-texinfo
-dvi: warn-on-disable-texinfo
-ps: warn-on-disable-texinfo
-pdf: warn-on-disable-texinfo
-"$(srcdir)"/doc/jitter.info: warn-on-disable-texinfo
-	$(MKDIR_P) `dirname "$@"` && touch "$@"
-"$(srcdir)"/example-vms/jitterlisp/doc/jitterlisp.info: warn-on-disable-texinfo
-	$(MKDIR_P) `dirname "$@"` && touch "$@"
-"$(srcdir)"/example-vms/structured/doc/structured.info: warn-on-disable-texinfo
-	$(MKDIR_P) `dirname "$@"` && touch "$@"
-endif # ! JITTER_HAVE_TEXINFO
+# if ! JITTER_HAVE_TEXI2DVI
+# missinghardcopytools:
+# 	@echo 'You are missing the tools to generate hardcopy documentation.'
+# 	@exit 0
+# dvi: missinghardcopytools
+# ps: missinghardcopytools
+# pdf: missinghardcopytools
+# endif # ! JITTER_HAVE_TEXI2DVI
+
+# # Avoid building Jitter's documentation on --disable-texinfo.
+# if ! JITTER_HAVE_TEXINFO
+# # Unfortunately it does not seem to be possible to disable TEXINFOS from
+# # Automake conditionals, but this workaround is easy.
+# # It is not completely clean: this is a redefinition of a rule generated by
+# # Automake.
+# warn-on-disable-texinfo:
+# 	@echo 'Not building Texinfo documentation: disabled at configure time.'
+# info: warn-on-disable-texinfo \
+#   "$(srcdir)"/doc/jitter.info \
+#   "$(srcdir)"/example-vms/jitterlisp/doc/jitterlisp.info \
+#   "$(srcdir)"/example-vms/structured/doc/structured.info
+# html: warn-on-disable-texinfo
+# dvi: warn-on-disable-texinfo
+# ps: warn-on-disable-texinfo
+# pdf: warn-on-disable-texinfo
+# "$(srcdir)"/doc/jitter.info: warn-on-disable-texinfo
+# 	$(MKDIR_P) `dirname "$@"` && touch "$@"
+# "$(srcdir)"/example-vms/jitterlisp/doc/jitterlisp.info: warn-on-disable-texinfo
+# 	$(MKDIR_P) `dirname "$@"` && touch "$@"
+# "$(srcdir)"/example-vms/structured/doc/structured.info: warn-on-disable-texinfo
+# 	$(MKDIR_P) `dirname "$@"` && touch "$@"
+# endif # ! JITTER_HAVE_TEXINFO
 
 
 # Web site manuals
 # ################################################################
 
 # This is never built as a dependency.
-web-manuals:
-	(cd "$(abs_builddir)/doc" && \
-           mkdir -p web-manuals && \
-	   cp "$(abs_srcdir)/build-aux/gendocs.sh" . && \
-	   cp "$(abs_srcdir)/gnulib-local-doc/gendocs_template" . && \
-           ./gendocs.sh --email "$(JITTER_PACKAGE_BUGREPORT)" \
-                        -s "$(abs_srcdir)/doc/jitter.texi" \
-                        -o "web-manuals" \
-                        jitter "The Jitter manual")
+# web-manuals:
+# 	(cd "$(abs_builddir)/doc" && \
+#            mkdir -p web-manuals && \
+# 	   cp "$(abs_srcdir)/build-aux/gendocs.sh" . && \
+# 	   cp "$(abs_srcdir)/gnulib-local-doc/gendocs_template" . && \
+#            ./gendocs.sh --email "$(JITTER_PACKAGE_BUGREPORT)" \
+#                         -s "$(abs_srcdir)/doc/jitter.texi" \
+#                         -o "web-manuals" \
+#                         jitter "The Jitter manual")
 
 
 # Man pages
@@ -2057,59 +2057,59 @@ web-manuals:
 # Here I use the environment variable ARGP_HELP_FMT to override argp's default
 # look in --help , which make section headers start at the second column; that
 # does not play well with help2man .
-HELP2MAN_WITH_OPTIONS = \
-  ARGP_HELP_FMT='header-col=0'; export ARGP_HELP_FMT; \
-    $(HELP2MAN) \
-      --info-page='jitter' \
-      --section=1 \
-      --source='Luca Saiu - GNU Project' \
-      --name='@JITTER_PACKAGE_NAME@' --manual='Programming'
+# HELP2MAN_WITH_OPTIONS = \
+#   ARGP_HELP_FMT='header-col=0'; export ARGP_HELP_FMT; \
+#     $(HELP2MAN) \
+#       --info-page='jitter' \
+#       --section=1 \
+#       --source='Luca Saiu - GNU Project' \
+#       --name='@JITTER_PACKAGE_NAME@' --manual='Programming'
 
 # If we have no help2man or we are cross-compiling without an emulator, then we
 # cannot actually rebuild man pages; in this case we will make copies from a
 # stub.  The stub has to be distributed even if it's not needed in the current
 # configuration.
-EXTRA_DIST += doc/missing-man-page.1
+# EXTRA_DIST += doc/missing-man-page.1
 
 # The actual man pages.
-dist_man1_MANS += \
-  $(srcdir)/doc/jitter-config.1 \
-  $(srcdir)/doc/jitter.1
-
-# Rules for always-installed programs.
-if JITTER_CAN_REBUILD_MAN_PAGES
-  # Man pages are built from executables, but help2man's documentation
-  # recommends to express a dependency from the *source* file instead, so as not
-  # to force the user to have help2man installed.  This is sensible, but this
-  # solution based on an Automake conditional is even better and allows for more
-  # precise control and, importantly, parallel building.
-  # The  || true  part at the end is a kludge to avoid failure on distcheck,
-  # where man page are generated in a directory which is artificially made
-  # read-only; in theory the source directory could be on a read-only filesystem
-  # and this might support that use case as well.
-  $(srcdir)/doc/jitter.1: bin/jitter$(EXEEXT)
-	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
-	  "$(JITTER_EMULATOR) bin/jitter$(EXEEXT)" || true
-  $(srcdir)/doc/jitter-config.1: bin/jitter-config
-	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
-	  bin/jitter-config || true
-else # ! JITTER_CAN_REBUILD_MAN_PAGES
-  # We can't build real man pages on this system, so we just distribute copies
-  # of a single stub page.
-  # Notice that these rule don't fire for users building from a distributed
-  # source tarball, unless they modify the stub page: source tarballs already
-  # contain pre-generated man pages (presumably not copied from the stub), and
-  # an actual man pages never becomes older than the stub unless the user
-  # touches the stub.
-  # About  || true  see the comment in the other conditional branch.
-  $(srcdir)/doc/jitter.1: doc/missing-man-page.1
-	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
-  $(srcdir)/doc/jitter-config.1: doc/missing-man-page.1
-	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
-endif # JITTER_CAN_REBUILD_MAN_PAGES
+# dist_man1_MANS += \
+#   $(srcdir)/doc/jitter-config.1 \
+#   $(srcdir)/doc/jitter.1
+
+# # Rules for always-installed programs.
+# if JITTER_CAN_REBUILD_MAN_PAGES
+#   # Man pages are built from executables, but help2man's documentation
+#   # recommends to express a dependency from the *source* file instead, so as not
+#   # to force the user to have help2man installed.  This is sensible, but this
+#   # solution based on an Automake conditional is even better and allows for more
+#   # precise control and, importantly, parallel building.
+#   # The  || true  part at the end is a kludge to avoid failure on distcheck,
+#   # where man page are generated in a directory which is artificially made
+#   # read-only; in theory the source directory could be on a read-only filesystem
+#   # and this might support that use case as well.
+#   $(srcdir)/doc/jitter.1: bin/jitter$(EXEEXT)
+# 	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
+# 	  "$(JITTER_EMULATOR) bin/jitter$(EXEEXT)" || true
+#   $(srcdir)/doc/jitter-config.1: bin/jitter-config
+# 	$(HELP2MAN_WITH_OPTIONS) --output="$@" \
+# 	  bin/jitter-config || true
+# else # ! JITTER_CAN_REBUILD_MAN_PAGES
+#   # We can't build real man pages on this system, so we just distribute copies
+#   # of a single stub page.
+#   # Notice that these rule don't fire for users building from a distributed
+#   # source tarball, unless they modify the stub page: source tarballs already
+#   # contain pre-generated man pages (presumably not copied from the stub), and
+#   # an actual man pages never becomes older than the stub unless the user
+#   # touches the stub.
+#   # About  || true  see the comment in the other conditional branch.
+#   $(srcdir)/doc/jitter.1: doc/missing-man-page.1
+# 	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
+#   $(srcdir)/doc/jitter-config.1: doc/missing-man-page.1
+# 	cp "$(srcdir)/doc/missing-man-page.1" "$@" || true
+# endif # JITTER_CAN_REBUILD_MAN_PAGES
 
 # A user target to build man pages.
-mans: $(dist_man1_MANS)
+# mans: $(dist_man1_MANS)
 
 
 # Emacs Lisp support.
diff --git a/jitter/configure.ac b/jitter/configure.ac
index 1f9fa8a..6199f44 100644
--- a/jitter/configure.ac
+++ b/jitter/configure.ac
@@ -648,116 +648,116 @@ if test "x$YACC" = 'x'; then
 fi
 
 # Allow the user to disable Texinfo tools from the configure command line.
-AC_MSG_CHECKING([if Texinfo documentation should be generated])
-AC_ARG_ENABLE([texinfo],
-              AS_HELP_STRING([--enable-texinfo],
-                 [Build documentation from Texinfo (default: auto)]),
-              jitter_enable_texinfo="$enableval",
-              jitter_enable_texinfo="auto")
-if test "x$jitter_enable_texinfo" != 'xno' \
-   && test "x$jitter_enable_texinfo" != 'xyes' \
-   && test "x$jitter_enable_texinfo" != 'xauto'; then
-  AC_MSG_RESULT([invalid: $jitter_enable_texinfo])
-  AC_MSG_ERROR([--enable-texinfo: parameter different from yes, no, auto])
-fi
-AC_MSG_RESULT([$jitter_enable_texinfo])
-AC_MSG_CHECKING([if we can build hardcopy documentation])
-AC_ARG_ENABLE([hardcopy],
-              AS_HELP_STRING([--enable-hardcopy],
-                 [Enable generation of the manual in hardcopy formats (default:
-                 auto) (ignored on --disable-texinfo)]),
-              jitter_enable_hardcopy="$enableval",
-              jitter_enable_hardcopy="auto")
-AC_MSG_RESULT([$jitter_enable_hardcopy])
+dnl AC_MSG_CHECKING([if Texinfo documentation should be generated])
+dnl AC_ARG_ENABLE([texinfo],
+dnl               AS_HELP_STRING([--enable-texinfo],
+dnl                  [Build documentation from Texinfo (default: auto)]),
+dnl               jitter_enable_texinfo="$enableval",
+dnl               jitter_enable_texinfo="auto")
+dnl if test "x$jitter_enable_texinfo" != 'xno' \
+dnl    && test "x$jitter_enable_texinfo" != 'xyes' \
+dnl    && test "x$jitter_enable_texinfo" != 'xauto'; then
+dnl   AC_MSG_RESULT([invalid: $jitter_enable_texinfo])
+dnl   AC_MSG_ERROR([--enable-texinfo: parameter different from yes, no, auto])
+dnl fi
+dnl AC_MSG_RESULT([$jitter_enable_texinfo])
+dnl AC_MSG_CHECKING([if we can build hardcopy documentation])
+dnl AC_ARG_ENABLE([hardcopy],
+dnl               AS_HELP_STRING([--enable-hardcopy],
+dnl                  [Enable generation of the manual in hardcopy formats (default:
+dnl                  auto) (ignored on --disable-texinfo)]),
+dnl               jitter_enable_hardcopy="$enableval",
+dnl               jitter_enable_hardcopy="auto")
+dnl AC_MSG_RESULT([$jitter_enable_hardcopy])
 
 # Check for Texinfo commands.  In practice makeinfo is more important than
 # texi2dvi, as Info is the default format.
-AC_PATH_PROG([JITTER_MAKEINFO], [makeinfo])
-if test "x$jitter_enable_texinfo" = 'xno'; then
-  AC_MSG_WARN([Texinfo support was disabled from the command line])
-elif test "x$JITTER_MAKEINFO" != 'x'; then
-  # Check that makeinfo understands a sufficiently recent dialect of Texinfo.
-  # I have had prolems on some BSD system shipping with a version of makeinfo
-  # which was too old to recognise @part.
-  # I want to detect such problems and prevent build failures but I will not
-  # make the manuals uglier just to support such systems...
-  AC_MSG_CHECKING([that the available Texinfo tools are recent enough])
-  mkdir "${jitter_abs_top_builddir}/build-aux" 2> /dev/null || true
-  cat > "${jitter_abs_top_builddir}/build-aux/foo.texi" <<EOF
-@node Top
-@top foo
-@menu
-* bar::.
-@end menu
-@part foo
-@node bar
-@chapter bar
-EOF
-  # ...If makeinfo is too old just disable it and behave as if it were not
-  # present at all.
-  if "$JITTER_MAKEINFO" \
-       --output "${jitter_abs_top_builddir}/build-aux/foo.info" \
-       "${jitter_abs_top_builddir}/build-aux/foo.texi" \
-       > /dev/null 2> /dev/null; then
-    AC_MSG_RESULT([yes])
-  else
-    AC_MSG_RESULT([no: some feature, likely @part, is not supported])
-    AC_MSG_WARN([disabling Texinfo support, ignoring $JITTER_MAKEINFO])
-    JITTER_MAKEINFO=''
-  fi
-  rm -f \
-    ${jitter_abs_top_builddir}/build-aux/foo.texi \
-    ${jitter_abs_top_builddir}/build-aux/foo.info
-fi
-if test "x$JITTER_MAKEINFO" = "x"; then
-  if test -e "$srcdir/doc/jitter.info"; then
-    AC_MSG_WARN([you will need a reasonably recent GNU Texinfo to regenerate \
-the Info documentation, in case you change the Texinfo source])
-  else
-    AC_MSG_ERROR([you need a reasonably recent GNU Texinfo to generate the \
-Info documentation, if you compile from git; release tarballs contain the \
-documentation pre-generated])
-  fi
-fi
-AC_PATH_PROG([JITTER_TEX], [tex])
-if test "x$JITTER_TEX" = "x"; then
-  AC_MSG_WARN([you will need a TeX executable (tex) for building the manual
-in hardcopy formats such as DVI, PostScript and PDF])
-fi
-AC_PATH_PROG([JITTER_TEXI2DVI], [texi2dvi])
-if test "x$JITTER_TEXI2DVI" = "x"; then
-  AC_MSG_WARN([you will need texi2dvi, from GNU Texinfo, if you want to \
-generate DVI, PostScript or PDF documentation])
-fi
-# Define an Automake conditional saying whether it is possible to generate Info
-# documentation.  Notice that (when building from git without a usable makeinfo)
-# we may have alraedy failed fatally before arriving here: the value of this
-# conditionsl is only decided by the command-line option.
-AM_CONDITIONAL([JITTER_HAVE_TEXINFO],
-               [test "x$jitter_enable_texinfo" != 'xno'])
-# Define an Automake conditional saying whether it is possible to generate
-# hardcopy documentation.  This way failures will be cleaner.
-AM_CONDITIONAL([JITTER_HAVE_TEXI2DVI],
-               [test "x$jitter_enable_texinfo" != 'xno' \
-                && test "x$jitter_enable_hardcopy" != 'x' \
-                && test "x$JITTER_TEX" != 'x' \
-                && test "x$JITTER_TEXI2DVI" != 'x'])
-
-# Check for GNU help2man.  That is not required for the user: pre-generated man
-# pages are included in the distribution.
-AC_CHECK_PROG(HAS_HELP2MAN, help2man, yes, no)
-if test "x$HAS_HELP2MAN" != "xyes"; then
-  jitter_has_help2man="no"
-  if test -e "$srcdir/jitterc/jitterc.1"; then
-    AC_MSG_WARN([You need GNU help2man if you want to rebuild manual pages])
-  else
-    AC_MSG_WARN([You need GNU help2man to build manual pages if you compile
-                 from git and you are not content with just man page stubs])
-  fi
-else
-  jitter_has_help2man="yes"
-fi
-AM_MISSING_PROG(HELP2MAN, help2man)
+dnl AC_PATH_PROG([JITTER_MAKEINFO], [makeinfo])
+dnl if test "x$jitter_enable_texinfo" = 'xno'; then
+dnl   AC_MSG_WARN([Texinfo support was disabled from the command line])
+dnl elif test "x$JITTER_MAKEINFO" != 'x'; then
+dnl   # Check that makeinfo understands a sufficiently recent dialect of Texinfo.
+dnl   # I have had prolems on some BSD system shipping with a version of makeinfo
+dnl   # which was too old to recognise @part.
+dnl   # I want to detect such problems and prevent build failures but I will not
+dnl   # make the manuals uglier just to support such systems...
+dnl   AC_MSG_CHECKING([that the available Texinfo tools are recent enough])
+dnl   mkdir "${jitter_abs_top_builddir}/build-aux" 2> /dev/null || true
+dnl   cat > "${jitter_abs_top_builddir}/build-aux/foo.texi" <<EOF
+dnl @node Top
+dnl @top foo
+dnl @menu
+dnl * bar::.
+dnl @end menu
+dnl @part foo
+dnl @node bar
+dnl @chapter bar
+dnl EOF
+dnl   # ...If makeinfo is too old just disable it and behave as if it were not
+dnl   # present at all.
+dnl   if "$JITTER_MAKEINFO" \
+dnl        --output "${jitter_abs_top_builddir}/build-aux/foo.info" \
+dnl        "${jitter_abs_top_builddir}/build-aux/foo.texi" \
+dnl        > /dev/null 2> /dev/null; then
+dnl     AC_MSG_RESULT([yes])
+dnl   else
+dnl     AC_MSG_RESULT([no: some feature, likely @part, is not supported])
+dnl     AC_MSG_WARN([disabling Texinfo support, ignoring $JITTER_MAKEINFO])
+dnl     JITTER_MAKEINFO=''
+dnl   fi
+dnl   rm -f \
+dnl     ${jitter_abs_top_builddir}/build-aux/foo.texi \
+dnl     ${jitter_abs_top_builddir}/build-aux/foo.info
+dnl fi
+dnl if test "x$JITTER_MAKEINFO" = "x"; then
+dnl   if test -e "$srcdir/doc/jitter.info"; then
+dnl     AC_MSG_WARN([you will need a reasonably recent GNU Texinfo to regenerate \
+dnl the Info documentation, in case you change the Texinfo source])
+dnl   else
+dnl     AC_MSG_ERROR([you need a reasonably recent GNU Texinfo to generate the \
+dnl Info documentation, if you compile from git; release tarballs contain the \
+dnl documentation pre-generated])
+dnl   fi
+dnl fi
+dnl AC_PATH_PROG([JITTER_TEX], [tex])
+dnl if test "x$JITTER_TEX" = "x"; then
+dnl   AC_MSG_WARN([you will need a TeX executable (tex) for building the manual
+dnl in hardcopy formats such as DVI, PostScript and PDF])
+dnl fi
+dnl AC_PATH_PROG([JITTER_TEXI2DVI], [texi2dvi])
+dnl if test "x$JITTER_TEXI2DVI" = "x"; then
+dnl   AC_MSG_WARN([you will need texi2dvi, from GNU Texinfo, if you want to \
+dnl generate DVI, PostScript or PDF documentation])
+dnl fi
+dnl # Define an Automake conditional saying whether it is possible to generate Info
+dnl # documentation.  Notice that (when building from git without a usable makeinfo)
+dnl # we may have alraedy failed fatally before arriving here: the value of this
+dnl # conditionsl is only decided by the command-line option.
+dnl AM_CONDITIONAL([JITTER_HAVE_TEXINFO],
+dnl                [test "x$jitter_enable_texinfo" != 'xno'])
+dnl # Define an Automake conditional saying whether it is possible to generate
+dnl # hardcopy documentation.  This way failures will be cleaner.
+dnl AM_CONDITIONAL([JITTER_HAVE_TEXI2DVI],
+dnl                [test "x$jitter_enable_texinfo" != 'xno' \
+dnl                 && test "x$jitter_enable_hardcopy" != 'x' \
+dnl                 && test "x$JITTER_TEX" != 'x' \
+dnl                 && test "x$JITTER_TEXI2DVI" != 'x'])
+
+dnl # Check for GNU help2man.  That is not required for the user: pre-generated man
+dnl # pages are included in the distribution.
+dnl AC_CHECK_PROG(HAS_HELP2MAN, help2man, yes, no)
+dnl if test "x$HAS_HELP2MAN" != "xyes"; then
+dnl   jitter_has_help2man="no"
+dnl   if test -e "$srcdir/jitterc/jitterc.1"; then
+dnl     AC_MSG_WARN([You need GNU help2man if you want to rebuild manual pages])
+dnl   else
+dnl     AC_MSG_WARN([You need GNU help2man to build manual pages if you compile
+dnl                  from git and you are not content with just man page stubs])
+dnl   fi
+dnl else
+dnl   jitter_has_help2man="yes"
+dnl fi
+dnl AM_MISSING_PROG(HELP2MAN, help2man)
 
 
 # Check for programs only used in the test suite.
