summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-06-09 16:45:42 -0500
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-06-09 19:33:52 -0500
commit31f64af693b077b846ac2540f4ea2baf95c4ef10 (patch)
tree4310ecab007e8ba25e94fd71a9f60c04190be45f /m4
parent04195f7e5d60c79bb6bf1a40b929a66aa8885ace (diff)
downloadgroff-git-31f64af693b077b846ac2540f4ea2baf95c4ef10.tar.gz
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 <https://savannah.gnu.org/bugs/?62592>. Thanks to Deri James for the report.
Diffstat (limited to 'm4')
-rw-r--r--m4/groff.m410
1 files changed, 10 insertions, 0 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4
index a72acb5f4..8740ce10c 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -161,6 +161,16 @@ AC_DEFUN([GROFF_PROG_TEXI2DVI], [
fi
])
+# 'texi2dvi' can be installed without TeX itself, so check for a 'tex'
+# executable independently.
+
+AC_DEFUN([GROFF_USE_TEX_CHECK], [
+ AC_REQUIRE([GROFF_PROG_TEXI2DVI])
+ AC_CHECK_PROG([PROG_TEX], [tex], [found], [missing])
+ groff_use_tex=no
+ test "$PROG_TEX" = found && groff_use_tex=yes
+])
+
# grohtml needs the following programs to produce images from tbl(1)
# tables and eqn(1) equations.