diff options
-rw-r--r-- | ChangeLog | 21 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | m4/groff.m4 | 84 |
3 files changed, 85 insertions, 24 deletions
@@ -1,8 +1,23 @@ 2023-02-15 G. Branden Robinson <g.branden.robinson@gmail.com> - * m4/groff.m4 (GROFF_CHECK_GROPDF_PROGRAMS): Better characterize - gropdf's reduced function, pointing out the ways in which it - would be more useful if the dependencies were met. + * configure.ac: Call new macro + `GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE`. Call + `GROFF_GHOSTSCRIPT_VERSION_NOTICE` after it, but before + `GROFF_URW_FONTS_NOTICE`. + * m4/groff.m4 (GROFF_AWK_NOTICE): New macro produces warning if + no awk could be found. This reduces gropdf functionality, but + so do missing URW fonts, so we report this problem separately. + Report the names under which we sought it, since there's + configure script option for that. + (GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE): New macro explains + consequences of missing optional dependency on Ghostscript + program: reduced grohtml functionality, nonfunctional pdfroff. + Report the names under which we sought it, since there's + configure script option for that. + (GROFF_CHECK_GROPDF_PROGRAMS): Better characterize gropdf's + reduced function, pointing out the ways in which it would be + more useful if the dependencies were met. Also simplify the + computational grammar. (GROFF_URW_FONTS_NOTICE): Identify 'U' as the foundry name gropdf uses for the URW fonts. Confirm continuing availability of most recent URW fonts release; bump date. diff --git a/configure.ac b/configure.ac index c30d4ac4b..6cd11fdda 100644 --- a/configure.ac +++ b/configure.ac @@ -256,8 +256,10 @@ echo "\ ----------------------------------------------------------------------" GROFF_APPDEFDIR_NOTICE +GROFF_AWK_NOTICE +GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE +GROFF_GHOSTSCRIPT_VERSION_NOTICE GROFF_URW_FONTS_NOTICE GROFF_UCHARDET_NOTICE -GROFF_GHOSTSCRIPT_VERSION_NOTICE GROFF_GROHTML_PROGRAM_NOTICE GROFF_GROPDF_PROGRAM_NOTICE diff --git a/m4/groff.m4 b/m4/groff.m4 index a36c3c341..d3ee543e6 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -242,39 +242,58 @@ AC_DEFUN([GROFF_GROHTML_PROGRAM_NOTICE], [ # gropdf needs awk and Ghostscript to have produced (a full set of) its # font description files. +AC_DEFUN([GROFF_AWK_NOTICE], [ + AC_REQUIRE([GROFF_AWK_PATH]) + + awk_names=awk + if test -n "$ALT_AWK_PROGS" + then + awk_names="$ALT_AWK_PROGS" + fi + + if test "$AWK" = missing + then + AC_MSG_NOTICE([No awk program was found in \$PATH. + + It was sought under the name(s) "$awk_names". + ]) + fi +]) + AC_DEFUN([GROFF_CHECK_GROPDF_PROGRAMS], [ AC_REQUIRE([GROFF_AWK_PATH]) AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) use_gropdf=no - missing= - test "$AWK" = missing && missing="'awk'" - test "$GHOSTSCRIPT" = missing && missing="$missing 'gs'" - if test -z "$missing" + gropdf_missing_deps= + + test "$AWK" = missing && gropdf_missing_deps="awk" + + if test "$GHOSTSCRIPT" = missing then - use_gropdf=yes - else - plural=`set $missing; test $[#] -eq 2 && echo s` - if test "$plural" = s + if test -n "$gropdf_missing_deps" then - missing=`set $missing; echo "$[1] and $[2]"` - verb=were - else - missing=`echo $missing` - verb=was + gropdf_missing_deps="$gropdf_missing_deps and " fi + gropdf_missing_deps="${gropdf_missing_deps}Ghostscript" + fi - gropdf_notice="The program$plural $missing $verb not found in \ -\$PATH. + if test -z "$gropdf_missing_deps" + then + use_gropdf=yes + else + gropdf_notice="'gropdf' will have reduced function. - groff documentation will not be available in PDF. + Due to the missing $gropdf_missing_deps described above, groff + documentation will not be available in PDF. - 'gropdf' will have reduced function. Only the standard PDF base 14 - fonts, plus the 'EURO' font groff supplies, will be available, and - font embedding with its '-e' option (accessed via the 'groff' command - with the option '-P -e') will not be possible. + 'gropdf' will be able to handle only documents using the standard PDF + base 14 fonts, plus the 'EURO' font groff supplies, and font embedding + with its '-e' option (accessed via the 'groff' command with the option + '-P -e') will not be possible. " fi + AC_SUBST([use_gropdf]) ]) @@ -460,6 +479,31 @@ AC_DEFUN([GROFF_GHOSTSCRIPT_PREFS], [ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2"]) AC_SUBST([ALT_GHOSTSCRIPT_PROGS])]) +AC_DEFUN([GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE], [ + AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) + + gs_names=gs + if test -n "$ALT_GHOSTSCRIPT_PROGS" + then + gs_names="$ALT_GHOSTSCRIPT_PROGS" + fi + + if test "$GHOSTSCRIPT" = missing + then + AC_MSG_NOTICE([No Ghostscript program was found in \$PATH. + + It was sought under the name(s) "$gs_names". + + groff documentation will not be available in HTML. + + 'grohtml' will have reduced function, being unable to produce + documents using the 'tbl' preprocessor. + + Further, 'pdroff' will not work. + ]) + fi +]) + # Ghostscript version check. Versions 9.00 <= x < 9.54 suffer from a # rendering glitch that affects the AT&T troff (and groff) special # character \(lh; see |