From 31f64af693b077b846ac2540f4ea2baf95c4ef10 Mon Sep 17 00:00:00 2001 From: "G. Branden Robinson" Date: Thu, 9 Jun 2022 16:45:42 -0500 Subject: Weaken build dependency on TeX. [build]: Weaken dependency on TeX, instead using it (to generate the DVI and PDF forms of our Texinfo manual) only if it is available. * m4/groff.m4 (GROFF_USE_TEX_CHECK): Check for presence of 'tex' executable in path. Set shell variable `groff_use_tex` to "yes" if present, and "no" otherwise. This check runs only if the 'makeinfo' and 'texi2dvi' version checks have already passed. * configure.ac: Run the new check. Set Automake conditional `USE_TEX` only if shell variable `groff_use_tex` is "yes". Report whether "groff.dvi" and "groff.pdf" are (re-)buildable. * doc/doc.am: Parameterize names of groff.{dvi,pdf} targets as Make macros `GROFF_DVI` and `GROFF_PDF`. Define them only if `USE_TEX`. Do _not_ update `EXTRA_DIST` macro; leave the literal file names there because we require that distribution archives contain these files. (.texi.dvi, .texi.pdf): Update suffix rules to check `USE_TEX` and fail, complaining of missing 'tex' program, if these targets are attempted without it being true. Only manually specifying the file names as targets to 'make' or attempting to generate a distribution archive without TeX present should cause these errors. * INSTALL.REPO: Update dependency information. Fixes . Thanks to Deri James for the report. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b2d6df94c..ef06727a2 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,7 @@ GROFF_PROG_YACC GROFF_PROG_M4 GROFF_PROG_MAKEINFO GROFF_PROG_TEXI2DVI +GROFF_USE_TEX_CHECK AC_PROG_RANLIB GROFF_INSTALL_SH GROFF_INSTALL_INFO @@ -207,6 +208,7 @@ AM_CONDITIONAL([USE_GROFF_ALLOCATOR], AM_CONDITIONAL([HAVE_URW_FONTS], [test "$groff_have_urw_fonts" = yes ]) AM_CONDITIONAL([HAVE_PDFTOOLS], [test "$groff_have_pdftools" = yes ]) AM_CONDITIONAL([HAVE_TEXI2DVI], [test "$groff_have_texi2dvi" = yes ]) +AM_CONDITIONAL([USE_TEX], [test "$groff_use_tex" = yes ]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([test-groff], [chmod +x test-groff]) @@ -244,6 +246,7 @@ echo "\ 'groff -l' uses print spooler : $groff_have_spooler use URW fonts for PDF output : $groff_have_urw_fonts preconv can use uchardet library : $groff_have_uchardet + can build groff.dvi, groff.pdf : $groff_use_tex tests can use poppler PDF tools : $groff_have_pdftools ----------------------------------------------------------------------" -- cgit v1.2.1