configure: Make the DJVU_FONT_SOURCE configurable with --with-dejavufont=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: Richard Marko <srk@48.io>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Richard Marko authored and Daniel Kiper committed 2023-10-30 18:19:07 +01:00
1 parent 2d6631d2af
commit 85e40b36ed
1 file changed
+10 -3
+10 -3
View File
@@ -1796,8 +1796,6 @@ CPPFLAGS="$SAVED_CPPFLAGS"
LDFLAGS="$SAVED_LDFLAGS" LDFLAGS="$SAVED_LDFLAGS"
DJVU_FONT_SOURCE=
starfield_excuse= starfield_excuse=
AC_ARG_ENABLE([grub-themes], AC_ARG_ENABLE([grub-themes],
@@ -1811,7 +1809,13 @@ if test x"$starfield_excuse" = x && test x"$enable_build_grub_mkfont" = xno ; th
starfield_excuse="No build-time grub-mkfont" starfield_excuse="No build-time grub-mkfont"
fi fi
if test x"$starfield_excuse" = x; then AC_ARG_WITH([dejavufont],
AS_HELP_STRING([--with-dejavufont=FILE],
[set the DejeVu source [[guessed]]]))
if test "x$with_dejavufont" = x; then
# search in well-known directories
if test x"$starfield_excuse" = x; then
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do 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/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
if test -f "$dir/DejaVuSans.$ext"; then if test -f "$dir/DejaVuSans.$ext"; then
@@ -1824,6 +1828,9 @@ if test x"$starfield_excuse" = x; then
if test "x$DJVU_FONT_SOURCE" = x; then if test "x$DJVU_FONT_SOURCE" = x; then
starfield_excuse="No DejaVu found" starfield_excuse="No DejaVu found"
fi fi
fi
else
DJVU_FONT_SOURCE="$with_dejavufont"
fi fi
if test x"$enable_grub_themes" = xyes && test x"$starfield_excuse" != x; then if test x"$enable_grub_themes" = xyes && test x"$starfield_excuse" != x; then