summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-09-06 16:04:09 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-09-06 19:16:21 +0000
commite4a1acd396785675bfc25c7cd5c66304ec40f38f (patch)
tree0ffe8998efc17cba7dc6cab2e1ad9cd518a1da1b /configure.ac
parent1d223fa1ec3724b291a7d46de7e38e32c03c5235 (diff)
Check for FT_Face_GetCharVariantIndex at build time
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
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)