configure: Make the Unifont FONT_SOURCE configurable with --with-unifont=FILE

Font might be located in different location, the default font might
not be available on all systems or other font might be preferred.

Signed-off-by: Mads Kiilerich <mads@kiilerich.com>
Signed-off-by: Richard Marko <srk@48.io>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Mads Kiilerich authored and Daniel Kiper committed 2023-10-30 18:08:59 +01:00
1 parent 07318ee7e1
commit 2d6631d2af
1 file changed
+10 -3
+10 -3
View File
@@ -1832,9 +1832,13 @@ fi
AC_SUBST([DJVU_FONT_SOURCE]) AC_SUBST([DJVU_FONT_SOURCE])
FONT_SOURCE= AC_ARG_WITH([unifont],
AS_HELP_STRING([--with-unifont=FILE],
[set the unifont source [[guessed]]]))
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do if test "x$with_unifont" = x; then
# search in well-known directories
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do
if test -f "$dir/unifont.$ext"; then if test -f "$dir/unifont.$ext"; then
md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')" md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')"
@@ -1846,7 +1850,10 @@ for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
break 2 break 2
fi fi
done done
done done
else
FONT_SOURCE="$with_unifont"
fi
if test x"$enable_build_grub_mkfont" = xno ; then if test x"$enable_build_grub_mkfont" = xno ; then
FONT_SOURCE= FONT_SOURCE=