diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-05-21 01:24:02 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-05-21 11:13:09 -0500 |
commit | 0e827c01b9896271a65054d2a6903bfd949b5eaf (patch) | |
tree | 9c1d36047b0f963326b035fad5c2309b7b93cb3b /m4 | |
parent | 9512080bf5b4822cfee7a84d9432f01fae036e65 (diff) | |
download | groff-git-0e827c01b9896271a65054d2a6903bfd949b5eaf.tar.gz |
m4/groff.m4: Skip checks if prereqs not met.
* m4/groff.m4 (GROFF_PNMTOOLS_CAN_BE_QUIET, GROFF_PNMTOPS_NOSETPAGE):
Skip check if prerequisite not met.
Also make code style more readable.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/groff.m4 | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4 index e858bb2b5..183f1310d 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -330,33 +330,42 @@ AC_DEFUN([GROFF_URW_FONTS_NOTICE], [ # Check whether the pnm tools accept the -quiet option. -AC_DEFUN([GROFF_PNMTOOLS_CAN_BE_QUIET], - [AC_MSG_CHECKING([whether PNM tools accept the -quiet option]) - if echo P2 2 2 255 0 1 2 0 | pnmtops -quiet > /dev/null 2>&1 - then - AC_MSG_RESULT([yes]) - pnmtools_quiet=-quiet - else - AC_MSG_RESULT([no]) - pnmtools_quiet= - fi - AC_SUBST([pnmtools_quiet])]) +AC_DEFUN([GROFF_PNMTOOLS_CAN_BE_QUIET], [ + pnmtools_quiet= + AC_REQUIRE([GROFF_CHECK_GROHTML_PROGRAMS]) + if test "$make_htmldoc" = yes + then + AC_MSG_CHECKING([whether PNM tools accept the '-quiet' option]) + if echo P2 2 2 255 0 1 2 0 | pnmtops -quiet > /dev/null 2>&1 + then + AC_MSG_RESULT([yes]) + pnmtools_quiet=-quiet + else + AC_MSG_RESULT([no]) + fi + fi + AC_SUBST([pnmtools_quiet]) +]) # Check whether pnmtops can handle the -nosetpage option. -AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE], - [AC_REQUIRE([GROFF_PNMTOOLS_CAN_BE_QUIET]) - AC_MSG_CHECKING([whether pnmtops accepts the -nosetpage option]) - if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 - then - AC_MSG_RESULT([yes]) - pnmtops_nosetpage="pnmtops $pnmtools_quiet -nosetpage" - else - AC_MSG_RESULT([no]) - pnmtops_nosetpage="pnmtops $pnmtools_quiet" - fi - AC_SUBST([pnmtops_nosetpage])]) +AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE], [ + pnmtops_nosetpage="pnmtops $pnmtools_quiet" + AC_REQUIRE([GROFF_CHECK_GROHTML_PROGRAMS]) + if test "$make_htmldoc" = yes + then + AC_MSG_CHECKING([whether pnmtops accepts the '-nosetpage' option]) + if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 + then + AC_MSG_RESULT([yes]) + pnmtops_nosetpage="pnmtops $pnmtools_quiet -nosetpage" + else + AC_MSG_RESULT([no]) + fi + fi + AC_SUBST([pnmtops_nosetpage]) +]) # Check location of 'gs'; allow '--with-gs=PROG' option to override. |