summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-18 02:58:41 -0600
committerG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-18 11:47:58 -0600
commitec001d2a23a3b1740e8d004006c0fc0d7fb6e288 (patch)
treee8c2d2c921ffb269a9bcc38b234cc93cc312e980 /m4
parent03640de878b4b362bce18af6bea008bd4d2bb3be (diff)
downloadgroff-git-ec001d2a23a3b1740e8d004006c0fc0d7fb6e288.tar.gz
[build]: Detangle pdfroff, gropdf config (1/2).
* m4/groff.m4 (GROFF_GROPDF_DEPENDENCIES_CHECK): Add `AC_REQUIRE`ment on `GROFF_URW_FONTS_CHECK`. Per discussion with Deri James, if _either_ Ghostscript or the URW fonts are avilable, gropdf will be fully functional, consequent to commit d5515, 22 June. Drop dependency on awk; it is used only at configuration time (in an Autoconf macro) and since Savannah #62775 was resolved (19 September), it has not been strictly necessary. (It is useful for searching more locations for URW fonts, but several others are searched even if it is absent.) Stop populating notice text here, instead moving it... (GROFF_GROPDF_PROGRAM_NOTICE): ...here, since it no longer needs to be dynamically constructed. Continues <https://savannah.gnu.org/bugs/?63808>. Thanks to Deri James for the continued discussion.
Diffstat (limited to 'm4')
-rw-r--r--m4/groff.m438
1 files changed, 14 insertions, 24 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4
index 1e0e7aae9..a99691e41 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -239,8 +239,7 @@ AC_DEFUN([GROFF_GROHTML_PROGRAM_NOTICE], [
fi
])
-# gropdf needs awk and Ghostscript to have produced (a full set of) its
-# font description files.
+dnl pdfroff uses awk, and we use it in GROFF_URW_FONTS_CHECK.
AC_DEFUN([GROFF_AWK_NOTICE], [
AC_REQUIRE([GROFF_AWK_PATH])
@@ -262,44 +261,35 @@ AC_DEFUN([GROFF_AWK_NOTICE], [
AC_DEFUN([GROFF_GROPDF_DEPENDENCIES_CHECK], [
AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
+ AC_REQUIRE([GROFF_URW_FONTS_CHECK])
use_gropdf=no
gropdf_missing_deps=
- test "$AWK" = missing && gropdf_missing_deps="awk"
-
- if test "$GHOSTSCRIPT" = missing
+ if test "$GHOSTSCRIPT" != missing \
+ || test "$groff_have_urw_fonts" = yes
then
- if test -n "$gropdf_missing_deps"
- then
- gropdf_missing_deps="$gropdf_missing_deps and "
- fi
- gropdf_missing_deps="${gropdf_missing_deps}Ghostscript"
+ use_gropdf=yes
fi
- if test -z "$gropdf_missing_deps"
+ AC_SUBST([use_gropdf])
+])
+
+AC_DEFUN([GROFF_GROPDF_PROGRAM_NOTICE], [
+ AC_REQUIRE([GROFF_GROPDF_DEPENDENCIES_CHECK])
+
+ if test "$use_gropdf" = no
then
- use_gropdf=yes
- else
- gropdf_notice="'gropdf' will have reduced function.
+ AC_MSG_NOTICE(['gropdf' will have reduced function.
- Due to the missing $gropdf_missing_deps described above, groff
+ Because neither Ghostscript nor URW fonts are available, groff
documentation will not be available in PDF.
'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])
])
-
-AC_DEFUN([GROFF_GROPDF_PROGRAM_NOTICE], [
- if test "$use_gropdf" = no
- then
- AC_MSG_NOTICE([$gropdf_notice])
fi
])