[PATCH:font/bh-ttf] Replace common font checks with new font-utils 1.1 macros

Alan Coopersmith alan.coopersmith at sun.com
Mon Oct 5 19:51:36 PDT 2009


Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
---

A sample scalable font module updated to use the new proposed font-utils macros

 Makefile.am  |   11 +----------
 configure.ac |   17 ++---------------
 2 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 54f9047..6dc2eb6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,16 +43,7 @@ install-data-hook:
 	$(MKFONTSCALE) $(DESTDIR)$(fontdir)
 	@rm -f $(DESTDIR)$(fontdir)/font.dir
 	$(MKFONTDIR) $(DESTDIR)$(fontdir)
-	@(if `test -z '$(DESTDIR)'`; then \
-		echo $(FCCACHE) $(fontdir); \
-		$(FCCACHE) $(fontdir); \
-	else \
-		echo "***"; \
-		echo "*** Warning: fonts.cache not built"; \
-		echo "***"; \
-		echo "*** Generate this file manually on host system using fc-cache"; \
-		echo "***"; \
-	fi)
+	@RUN_FCCACHE@
 
 distuninstallcheck:
 	@:
diff --git a/configure.ac b/configure.ac
index d854157..1e3a2db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,21 +31,8 @@ m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or late
 XORG_MACROS_VERSION(1.2)
 AC_PROG_INSTALL
 
-AC_PATH_PROG(MKFONTSCALE, mkfontscale)
-if test x"$MKFONTSCALE" = x; then
-	AC_MSG_ERROR([mkfontscale is required to build bh-ttf fonts.])
-fi
-AC_PATH_PROG(MKFONTDIR, mkfontdir)
-if test x"$MKFONTDIR" = x; then
-	AC_MSG_ERROR([mkfontdir is required to build bh-ttf fonts.])
-fi
-AC_PATH_PROG(FCCACHE, fc-cache)
-
-fontdir=${libdir}/X11/fonts/TTF
-AC_ARG_WITH(fontdir, AC_HELP_STRING([--with-fontdir=<pathname>],
-	[Path to install fonts]), [fontdir="$withval"])
-FONTDIR="$fontdir"
-AC_SUBST(FONTDIR)
+XORG_FONT_SCALED_UTILS
+XORG_FONTDIR([TTF])
 
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
-- 
1.5.6.5



More information about the xorg-devel mailing list