Require fontconfig >= 2.8 and change its guard macro name

FcConfigAppFontAddFile() that we use is only available since 2.8, so
check for at least this version of the library in configure.

Also change the macro guarding its use to the more semantically
appropriate "wxHAVE" rather than "wxUSE" and make it more precise by
adding "2_8_0" suffix to it.
This commit is contained in:
Vadim Zeitlin
2017-11-13 21:29:38 +01:00
parent ed655bfcde
commit 3158a46ce7
5 changed files with 8 additions and 8 deletions

View File

@@ -2963,13 +2963,13 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
dnl fi
fi
PKG_CHECK_MODULES(FONTCONFIG, [fontconfig],
PKG_CHECK_MODULES(FONTCONFIG, [fontconfig >= 2.8.0],
[
AC_DEFINE(wxUSE_FONTCONFIG)
AC_DEFINE(wxHAVE_FONTCONFIG_2_8_0)
CXXFLAGS="$FONTCONFIG_CFLAGS $CXXFLAGS"
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $FONTCONFIG_LIBS"
],
[AC_MSG_WARN([fontconfig library not found, run-time font loading won't be supported by wxFont])])
[AC_MSG_WARN([fontconfig library not found or too old, run-time font loading won't be supported by wxFont])])
fi
if test "$wxUSE_DFB" = 1; then