diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2010-10-06 16:59:20 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2010-10-07 23:19:27 -0700 |
commit | 5cad514d15c61cdf73a7dbd6d88f3e823a0d2d99 (patch) | |
tree | b47f2936402ac0fbee1b3fbd7a050b0de291b8bc | |
parent | 62529733e57b6d6c775b1bcf584260b1cff6af5c (diff) |
fontutil.m4: Add XORG_FONT_FC_CONFDIR to find fontconfig's confdir
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | fontutil.m4.in | 34 |
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 |