[PATCH:xfs] resync font-path checking with xserver's configure.ac
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Jan 7 18:24:13 PST 2011
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
configure.ac | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/configure.ac b/configure.ac
index 375b30f..473f399 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,23 +79,31 @@ m4_ifndef([XORG_FONT_MACROS_VERSION],
XORG_FONT_MACROS_VERSION(1.1)
XORG_FONTROOTDIR
+XORG_FONTSUBDIR(FONTMISCDIR, fontmiscdir, misc)
+XORG_FONTSUBDIR(FONTOTFDIR, fontotfdir, OTF)
+XORG_FONTSUBDIR(FONTTTFDIR, fontttfdir, TTF)
+XORG_FONTSUBDIR(FONTTYPE1DIR, fonttype1dir, Type1)
+XORG_FONTSUBDIR(FONT75DPIDIR, font75dpidir, 75dpi)
+XORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi)
# Determine font path to put in config file
# Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
-# otherwise uses default path copied from xserver configure.ac
-AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font path entries]),
- [ FONTPATH="$withval" ], [])
-
-if test "x$FONTPATH" = "x"; then
+# otherwise uses standard subdirectories of FONTROOTDIR. When cross
+# compiling, assume default font path uses standard FONTROOTDIR directories.
+DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
+if test "$cross_compiling" != yes; then
AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
- [FONT_PATH='catalogue:$(sysconfdir)/X11/fontpath.d'],
- [
- FONT_PATH='$(FONTROOTDIR)/misc/,$(FONTROOTDIR)/TTF/,$(FONTROOTDIR)/OTF/,$(FONTROOTDIR)/Type1/,$(FONTROOTDIR)/100dpi/,$(FONTROOTDIR)/75dpi/'
- case $host_os in
- darwin*) FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
- esac
- ])
+ [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
+ [case $host_os in
+ darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
+ esac])
fi
+AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
+ [ FONTPATH="$withval" ],
+ [ FONTPATH="${DEFAULT_FONT_PATH}" ])
+
+AC_MSG_CHECKING([for default font path])
+AC_MSG_RESULT([$FONTPATH])
AC_SUBST([FONTPATH])
--
1.7.3.2
More information about the xorg-devel
mailing list