From d601587880ec1089da5a43f650b4c0bf8fe4a4c4 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 26 Apr 2011 15:03:42 +0100 Subject: [PATCH fonts-util] If cross-compiling, we don't have to run mkfontdir If cross-compiling, we can run the host mkfontdir on the font directory, since the output is arch independent (I think) If cross-compiling and we can't find mkfontdir, just warn that mkfontdir needs to be run on the target. When not cross-compiling, the behaviour remains unchanged: mkfontdir must be found and is run Signed-off-by: Jon TURNEY --- fontutil.m4.in | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/fontutil.m4.in b/fontutil.m4.in index f040e19..98f4781 100644 --- a/fontutil.m4.in +++ b/fontutil.m4.in @@ -178,6 +178,31 @@ AC_DEFUN([XORG_FONT_FCCACHE],[ AC_SUBST([RUN_FCCACHE]) ]) +# XORG_FONT_MKFONTDIR() +# ------------------- +# Minimum version: 1.3.0 +# +# Set MKFONTDIR to path to mkfontdir. +# +# If cross-compiling, and if mkdir is not found, use a shell command +# which warns mkfontdir needs to be run on the target +# +# If not cross-compiling, mkfontdir must be found +# +AC_DEFUN([XORG_FONT_MKFONTDIR],[ + if test x"$cross_compiling" != x"no" ; then + AC_PATH_PROG(MKFONTDIR, mkfontdir, "") + MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"' + + if test x"$MKFONTDIR" = x; then + MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'" + fi + else + XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) + fi + + AC_SUBST([MKFONTDIR]) +]) # XORG_FONT_COMMON_UTILS() # ------------------------ @@ -187,7 +212,7 @@ AC_DEFUN([XORG_FONT_FCCACHE],[ AC_DEFUN([XORG_FONT_COMMON_UTILS],[ XORG_FONT_FCCACHE - XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) + XORG_FONT_MKFONTDIR ]) # XORG_FONT_SCALED_UTILS() -- 1.7.5.1