diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-05-25 19:09:16 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-05-25 19:57:05 -0500 |
commit | a11aeca5c41ae8eb1bc77d01b308813a3974b570 (patch) | |
tree | 859bd226969f6167afa4b8882f4d9d8330162b2a /m4 | |
parent | 0dfe2305d54a61a7a8fc6bb6b08f6ec329a953f9 (diff) | |
download | groff-git-a11aeca5c41ae8eb1bc77d01b308813a3974b570.tar.gz |
m4/groff.m4 (GROFF_PRINT): Refactor.
* m4/groff.m4 (GROFF_PRINT): Refactor. Stop performing checks for
spooler options if none is available. Stop redundantly reporting
command name used for spooling PostScript files. If an option is
required for spooling DVI files, report it alone instead of repeating
the command name as well.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/groff.m4 | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4 index 2bb1554bc..37e0da2a7 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -44,25 +44,23 @@ AC_DEFUN([GROFF_PRINT], [ if test -n "$PSPRINT" then groff_have_spooler="$PSPRINT" - fi - - AC_SUBST([PSPRINT]) - AC_MSG_CHECKING([for command to use for spooling PostScript files]) - AC_MSG_RESULT([$PSPRINT]) - - # Figure out DVIPRINT from PSPRINT. - AC_MSG_CHECKING([for command to use for spooling DVI files]) - if test -n "$PSPRINT" && test -z "$DVIPRINT" - then - if test "$PSPRINT" = lpr + AC_SUBST([PSPRINT]) + # Figure out DVIPRINT from PSPRINT. + AC_MSG_CHECKING([option to use when spooling DVI files]) + spooler_option=none + if test -n "$PSPRINT" && test -z "$DVIPRINT" then - DVIPRINT="lpr -d" - else - DVIPRINT="$PSPRINT" + if test "$PSPRINT" = lpr + then + spooler_option=-d + DVIPRINT="$PSPRINT $spooler_option" + else + DVIPRINT="$PSPRINT" + fi fi + AC_SUBST([DVIPRINT]) + AC_MSG_RESULT([$spooler_option]) fi - AC_SUBST([DVIPRINT]) - AC_MSG_RESULT([$DVIPRINT]) ]) # Bison-generated parsers have problems with C++ compilers other than |