[PATCH] Unbreak cross-compilation: avoid AC_CHECK_FILE

Mikhail Gusarov dottedmag at dottedmag.net
Wed Jan 6 05:50:14 PST 2010


If --default-font-path is passed to configure, then there is no
need to call AC_CHECK_FILE (which fails during cross-compilation)
to figure out default font path.

Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
---
 configure.ac |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index e0ddd48..9301646 100644
--- a/configure.ac
+++ b/configure.ac
@@ -504,17 +504,15 @@ XORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi)
 
 dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
 dnl otherwise uses standard subdirectories of FONTROOTDIR
-AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
-	[DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
-	[
-		DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
-		case $host_os in
-			darwin*)    DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
-		esac
-	])
 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_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
+					[DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
+					[DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
+					  case $host_os in
+					    darwin*)    DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
+					  esac
+				  FONTPATH="${DEFAULT_FONT_PATH}" ])])
 
 AC_ARG_WITH(xkb-path,         AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
 				[ XKBPATH="$withval" ],
-- 
1.6.3.3



More information about the xorg-devel mailing list