gbranden pushed a commit to branch master
in repository groff.
commit 0e827c01b9896271a65054d2a6903bfd949b5eaf
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat May 21 01:24:02 2022 -0500
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.
---
ChangeLog | 5 +++++
m4/groff.m4 | 55 ++++++++++++++++++++++++++++++++-----------------------
2 files changed, 37 insertions(+), 23 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 10c22cbe..9cdf93c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-05-21 G. Branden Robinson <[email protected]>
+
+ * m4/groff.m4 (GROFF_PNMTOOLS_CAN_BE_QUIET,
+ GROFF_PNMTOPS_NOSETPAGE): Skip check if prerequisite not met.
+
2022-05-21 G. Branden Robinson <[email protected]>
* m4/groff.m4 (GROFF_URW_FONTS_CHECK): Rename this...
diff --git a/m4/groff.m4 b/m4/groff.m4
index e858bb2b..183f1310 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.
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit