summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2010-11-20 08:47:06 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-11-24 23:52:02 -0800
commitea30eb37f4402cf09db8e1dc8b999d3bf7b7d66f (patch)
tree51a8a906a21e6518ba95f04c60251b61f7a48ac7 /configure.ac
parent070fc985a8048e3a126690c5e64f0dca6418806b (diff)
config: look for fontpath.d only if --with-default-font-path wasn't specified #31290
* AC_CHECK_FILE doesn't work when cross compiling * Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31290 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 13 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 99a1ce3..375b30f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,18 +83,20 @@ XORG_FONTROOTDIR
# 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_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
- [DEFAULT_FONT_PATH='catalogue:$(sysconfdir)/X11/fontpath.d'],
- [
- DEFAULT_FONT_PATH='$(FONTROOTDIR)/misc/,$(FONTROOTDIR)/TTF/,$(FONTROOTDIR)/OTF/,$(FONTROOTDIR)/Type1/,$(FONTROOTDIR)/100dpi/,$(FONTROOTDIR)/75dpi/'
- 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 path entries]),
- [ FONTPATH="$withval" ],
- [ FONTPATH="${DEFAULT_FONT_PATH}" ])
+ [ FONTPATH="$withval" ], [])
+
+if test "x$FONTPATH" = "x"; 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
+ ])
+fi
+
AC_SUBST([FONTPATH])
# Option to enable support for starting from inetd