From e4a1acd396785675bfc25c7cd5c66304ec40f38f Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 6 Sep 2013 16:04:09 +0200 Subject: Check for FT_Face_GetCharVariantIndex at build time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No more dlsym() hacks. The downside is that LibreOffice built on systems with old FreeType will not be able to use FT_Face_GetCharVariantIndex() on newer systems, but most Linux users use their distribution builds anyway. This only affects the use of Unicode Variation Selectors which is an exotic feature that wasn't even supported on Linux before 4.1. Change-Id: I674822ef5bc8d7940a821a01cc85ae7a6d39a80e Reviewed-on: https://gerrit.libreoffice.org/5844 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2f20dd1de6a8..22807cb08aae 100644 --- a/configure.ac +++ b/configure.ac @@ -608,6 +608,7 @@ linux-android*) AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK]) fi + AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX) BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE" ;; @@ -7686,6 +7687,13 @@ if test "$test_freetype" = "yes"; then PKG_CHECK_MODULES(FREETYPE, freetype2 >= 9.9.3) FREETYPE_CFLAGS=$(printf '%s' "$FREETYPE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") SYSTEM_FREETYPE=YES + _save_libs="$LIBS" + _save_cflags="$CFLAGS" + LIBS="$LIBS $FREETYPE_LIBS" + CFLAGS="$CFLAGS $FREETYPE_CFLAGS" + AC_CHECK_FUNC(FT_Face_GetCharVariantIndex, AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX), []) + LIBS="$_save_libs" + CFLAGS="$_save_cflags" fi AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) -- cgit v1.2.3