diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-10-09 21:27:01 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-10-09 22:33:06 -0500 |
commit | 57cf998eae20fe7c886ec2fbda24248dcafa8209 (patch) | |
tree | b1a923894ed62bdf54c1aab16225b0ce0150fbec /m4 | |
parent | ac0ed2d49c773ad8dc40ef573d23d8ec5b3afc70 (diff) | |
download | groff-git-57cf998eae20fe7c886ec2fbda24248dcafa8209.tar.gz |
[m4]: Try to make URW font search deterministic.
* m4/groff.m4: Try to make gropdf's search for URW font files more
deterministic. To disambiguate cases where multiple--not necessarily
identical--copies may be found on the system, search _only_ in the
directory given to the `--with-urw-fonts-dir` configure option, if
present. This populates the "Foundry" file generated by the build,
causing gropdf to search there first.
(GROFF_URW_FONTS_PATH): Stop `AC_SUBST`ing `urwfontsdir` here.
(GROFF_URW_FONTS_CHECK): `AC_REQUIRE` `GROFF_URW_FONTS_CHECK` to be
run first. If `urwfontsdir` is not null, search only there for URW
fonts. Assign `urwfontsdir` the value of the directory in which the
fonts are found. Assign it an empty value if none are found. Either
way, `AC_SUBST` the variable.
Attempts to fix <https://savannah.gnu.org/bugs/?62860> (1/2).
Diffstat (limited to 'm4')
-rw-r--r-- | m4/groff.m4 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4 index b9ead007d..a3238dee8 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -284,14 +284,15 @@ AC_DEFUN([GROFF_URW_FONTS_PATH], [ [AS_HELP_STRING([--with-urw-fonts-dir=DIR], [search for URW PostScript Type 1 fonts in DIR])], [urwfontsdir="$withval"]) - AC_SUBST(urwfontsdir)]) ]) -# Check availability of URW fonts in the search path given by 'gs -h' -# supplemented with the paths where font/devpdf/Foundry.in expects them, -# or in the custom directory passed to 'configure'. +# Check for availability of URW fonts in the directory specified by the +# user (see GROFF_URW_FONTS_PATH above); alternatively, use the search +# path given by 'gs -h' (if possible) supplemented with the paths where +# font/devpdf/Foundry.in expects them. AC_DEFUN([GROFF_URW_FONTS_CHECK], [ + AC_REQUIRE([GROFF_URW_FONTS_PATH]) AC_REQUIRE([GROFF_AWK_PATH]) AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) groff_have_urw_fonts=no @@ -313,7 +314,7 @@ AC_DEFUN([GROFF_URW_FONTS_CHECK], [ if test -n "$urwfontsdir" then - _list_paths="$ _list_paths $urwfontsdir" + _list_paths="$urwfontsdir" fi for k in $_list_paths @@ -328,6 +329,7 @@ AC_DEFUN([GROFF_URW_FONTS_CHECK], [ then AC_MSG_RESULT([found in $k]) groff_have_urw_fonts=yes + urwfontsdir=$k break 2 fi done @@ -336,9 +338,11 @@ AC_DEFUN([GROFF_URW_FONTS_CHECK], [ if test $groff_have_urw_fonts = no then AC_MSG_RESULT([none found]) + urwfontsdir= fi AC_SUBST([groff_have_urw_fonts]) + AC_SUBST(urwfontsdir) ]) AC_DEFUN([GROFF_URW_FONTS_NOTICE], [ |