[PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir
Jeremy Huddleston
jeremyhu at apple.com
Tue Sep 13 16:09:49 PDT 2011
This is confusing to me. Why do you add the extra " ; echo '** mkfontdir'"?
On Sep 12, 2011, at 9:18 AM, Jon TURNEY wrote:
> If cross-compiling, we can run the build 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
>
> (Unfortunately jhbuild doesn't really know much about cross-compiling and
> always sets PATH including the configured bindir, which isn't a good idea
> when cross-compiling as it causes target binaries to appear in the PATH, so
> jhbuild needs to be patched to remove that behaviour, or MKFONTDIR explicitly
> set to the build host mkfontdir, otherwise configure may find the target
> mkfontdir and we end up trying to run that.)
>
> Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
> ---
> fontutil.m4.in | 27 ++++++++++++++++++++++++++-
> 1 files changed, 26 insertions(+), 1 deletions(-)
>
> diff --git a/fontutil.m4.in b/fontutil.m4.in
> index f040e19..d3c79d1 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.1.1
> +#
> +# 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.4
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
---
Jeremy Huddleston
Rebuild Sudan
- Board of Directors
- http://www.rebuildsudan.org
Berkeley Foundation for Opportunities in Information Technology
- Advisory Board
- http://www.bfoit.org
More information about the xorg-devel
mailing list