Skip to content

Fail configure if tex is unavailable - #243

Merged
jrincayc merged 2 commits into
jrincayc:masterfrom
benjaminpjones:missing-tex-error
Sep 4, 2026
Merged

Fail configure if tex is unavailable#243
jrincayc merged 2 commits into
jrincayc:masterfrom
benjaminpjones:missing-tex-error

Conversation

@benjaminpjones

@benjaminpjones benjaminpjones commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

#239

Background

configure will finish successfully if the documentation toolchain is missing, but make will fail. Two issues:

  • The missing dependency would ideally manifest at the configure step
  • Many devs may not need the docs, so nudging them towards --disable-docs could save a somewhat heavy installation (mactex requires ~10GB)

Building the manual needs three programs:

  • makeinfo builds ucblogo.info and ucblogo.html
  • texi2dvi builds ucblogo.pdf
  • pdftex (or pdfetex) is what texi2dvi --pdf actually runs

Proposed change

Fail at the configure step, reporting every missing tool in one message, with a hint to install them or skip the documentation build (--disable-docs).

Tested

no Texinfo, no TeX (configure fails, lists all three)

$ ./configure
    ...
checking enable_docs... yes
checking for makeinfo... no
checking for texi2dvi... no
checking for pdfetex... no
checking for pdftex... no
configure: error: missing tools required to build the manual: makeinfo texi2dvi pdftex
makeinfo and texi2dvi come from GNU Texinfo; pdftex comes from a TeX
distribution such as TeX Live or MacTeX.
Install them, or pass --disable-docs to skip documentation.

Texinfo installed, no TeX (configure fails, names only pdftex)

$ brew install texinfo
$ ./configure
    ...
checking enable_docs... yes
checking for makeinfo... yes
checking for texi2dvi... yes
checking for pdfetex... no
checking for pdftex... no
configure: error: missing tools required to build the manual: pdftex
makeinfo and texi2dvi come from GNU Texinfo; pdftex comes from a TeX
distribution such as TeX Live or MacTeX.
Install them, or pass --disable-docs to skip documentation.

TeX installed, no Texinfo (configure fails, names the Texinfo tools)

$ ./configure
    ...
checking enable_docs... yes
checking for makeinfo... no
checking for texi2dvi... no
checking for pdfetex... no
checking for pdftex... pdftex
configure: error: missing tools required to build the manual: makeinfo texi2dvi
makeinfo and texi2dvi come from GNU Texinfo; pdftex comes from a TeX
distribution such as TeX Live or MacTeX.
Install them, or pass --disable-docs to skip documentation.

docs disabled, nothing installed (configure passes, no tool checks run)

$ ./configure --disable-docs
   ...
checking enable_docs... no
   ... success ...
$ make
   ... success ...

everything installed (configure and make run successfully)

$ brew install texinfo
$ brew install --cask mactex
   ...
$ ./configure
   ...
checking enable_docs... yes
checking for makeinfo... yes
checking for texi2dvi... yes
checking for pdfetex... pdfetex
   ... success ...
$ make
   ... success ...
$ ls docs
   ... ucblogo.pdf ...

Before this commit, configure will finish successfully if tex is missing,
but make will still fail.  Now we fail during configure with a hint
to install TeX or skip the documentation build.
Comment thread configure.ac Outdated
Checking for tex was not enough to guarantee the manual builds:

- texi2dvi, which builds the PDF, comes from GNU Texinfo rather than
  from a TeX distribution, so it can be absent on a machine that has
  tex.  Automake hardcodes TEXI2DVI = texi2dvi with no configure probe.
- makeinfo builds ucblogo.info and ucblogo.html.  Neither is checked
  in and ucblogo.html is in doc_DATA, so make needs it.
- texi2dvi --pdf runs pdfetex or pdftex.  Plain tex is only used for
  DVI output, so it is not the binary this build invokes.

Check all three and report every missing one in a single error.  The
variables are named HAVE_MAKEINFO, HAVE_TEXI2DVI and DOCS_PDFTEX
because automake sets MAKEINFO to its missing wrapper, and TEX is an
environment variable texi2dvi reads to choose an engine.

@jrincayc jrincayc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested (example output from test:

checking enable_docs... yes
checking for makeinfo... yes
checking for texi2dvi... no
checking for pdfetex... pdfetex
configure: error: missing tools required to build the manual: texi2dvi
makeinfo and texi2dvi come from GNU Texinfo; pdftex comes from a TeX
distribution such as TeX Live or MacTeX.
Install them, or pass --disable-docs to skip documentation.
```
Approved.

@jrincayc
jrincayc merged commit 70184a6 into jrincayc:master Sep 4, 2026
1 check passed
@benjaminpjones
benjaminpjones deleted the missing-tex-error branch September 4, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants