summaryrefslogtreecommitdiff
path: root/fontutil.m4.in
diff options
context:
space:
mode:
Diffstat (limited to 'fontutil.m4.in')
-rw-r--r--fontutil.m4.in34
1 files changed, 34 insertions, 0 deletions
diff --git a/fontutil.m4.in b/fontutil.m4.in
index 6c0d132..b2b9bd8 100644
--- a/fontutil.m4.in
+++ b/fontutil.m4.in
@@ -266,6 +266,40 @@ AC_DEFUN([XORG_FONT_UCS2ANY],[
+# XORG_FONT_FC_CONFDIR()
+# --------------------
+# Minimum version: 1.2.0
+#
+# Sets FC_CONFDIR to the fontconfig config directory
+# (which should be --with-confdir=... when building fontconfig)
+# found from:
+# --with-fc-confdir=...
+# pkg-config --variable=confdir fontconfig
+# ${sysconfdir}/fonts
+
+AC_DEFUN([XORG_FONT_FC_CONFDIR],[
+ dnl Ensure $PKG_CONFIG is set first
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+
+ AC_MSG_CHECKING([for fontconfig's configuration directory])
+ AC_ARG_WITH(fc-confdir,
+ AS_HELP_STRING([--with-fc-confdir=DIR],
+ [Path to fontconfig's configuration directory]),
+ [FC_CONFDIR="$withval"])
+ # if --with-fc-confdir was not specified
+ if test "x${FC_CONFDIR}" = "x"; then
+ FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
+ fi
+ # ...and if pkg-config didn't find confdir in fontconfig.pc...
+ if test "x${FC_CONFDIR}" = "x"; then
+ FC_CONFDIR="${sysconfdir}/fonts"
+ fi
+ AC_SUBST(FC_CONFDIR)
+ AC_MSG_RESULT([${FC_CONFDIR}])
+])
+
+
+
# XORG_FONTROOTDIR()
# --------------------
# Minimum version: 1.1.0