From 80cde5d8bb59a50ba1e98b5947f2fe0c8f38ef84 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 26 Apr 2011 15:03:42 +0100 Subject: 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 (Also, bump version number to 1.2.90 as the next release must be 1.3.0 as this change adds a macro) Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Reviewed-by: Alan Coopersmith --- configure.ac | 2 +- fontutil.m4.in | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 471a527..217dd91 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) -AC_INIT([font-util], [1.2.0], +AC_INIT([font-util], [1.2.90], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [font-util]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE 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() -- cgit v1.2.1