mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 763242 - Fix freetype detection on Non X11 linux builds. r=glandium
This commit is contained in:
parent
4249f5fd38
commit
76e784e6c7
95
configure.in
95
configure.in
@ -3161,42 +3161,6 @@ else
|
||||
AC_DEFINE(HAVE_LIBXSS)],, $XEXT_LIBS $XLIBS))
|
||||
|
||||
LDFLAGS="$_SAVE_LDFLAGS"
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Check for freetype2 and its functionality
|
||||
dnl ========================================================
|
||||
PKG_CHECK_MODULES(FT2, freetype2 >= 6.1.0, _HAVE_FREETYPE2=1, _HAVE_FREETYPE2=)
|
||||
|
||||
if test "$_HAVE_FREETYPE2"; then
|
||||
_SAVE_LIBS="$LIBS"
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
LIBS="$LIBS $FT2_LIBS"
|
||||
CFLAGS="$CFLAGS $FT2_CFLAGS"
|
||||
|
||||
AC_CACHE_CHECK(for FT_Bitmap_Size.y_ppem,
|
||||
ac_cv_member_FT_Bitmap_Size_y_ppem,
|
||||
[AC_TRY_COMPILE([#include <ft2build.h>
|
||||
#include FT_FREETYPE_H],
|
||||
[FT_Bitmap_Size s;
|
||||
if (sizeof s.y_ppem) return 0;
|
||||
return 1],
|
||||
ac_cv_member_FT_Bitmap_Size_y_ppem=yes,
|
||||
ac_cv_member_FT_Bitmap_Size_y_ppem=no)])
|
||||
if test "$ac_cv_member_FT_Bitmap_Size_y_ppem" = yes; then
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=1
|
||||
else
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,
|
||||
$HAVE_FT_BITMAP_SIZE_Y_PPEM,
|
||||
[FT_Bitmap_Size structure includes y_ppem field])
|
||||
|
||||
AC_CHECK_FUNCS(FT_GlyphSlot_Embolden FT_Load_Sfnt_Table FT_Select_Size)
|
||||
|
||||
LIBS="$_SAVE_LIBS"
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
fi
|
||||
|
||||
fi # $no_x
|
||||
|
||||
AC_SUBST(XCFLAGS)
|
||||
@ -7899,6 +7863,53 @@ MOZ_ARG_ENABLE_BOOL(skia,
|
||||
MOZ_ENABLE_SKIA=1,
|
||||
MOZ_ENABLE_SKIA=)
|
||||
|
||||
if test "$USE_FC_FREETYPE"; then
|
||||
if test "$COMPILE_ENVIRONMENT"; then
|
||||
dnl ========================================================
|
||||
dnl = Check for freetype2 and its functionality
|
||||
dnl ========================================================
|
||||
PKG_CHECK_MODULES(FT2, freetype2 >= 6.1.0, _HAVE_FREETYPE2=1, _HAVE_FREETYPE2=)
|
||||
|
||||
if test "$_HAVE_FREETYPE2"; then
|
||||
_SAVE_LIBS="$LIBS"
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
LIBS="$LIBS $FT2_LIBS"
|
||||
CFLAGS="$CFLAGS $FT2_CFLAGS"
|
||||
|
||||
AC_CACHE_CHECK(for FT_Bitmap_Size.y_ppem,
|
||||
ac_cv_member_FT_Bitmap_Size_y_ppem,
|
||||
[AC_TRY_COMPILE([#include <ft2build.h>
|
||||
#include FT_FREETYPE_H],
|
||||
[FT_Bitmap_Size s;
|
||||
if (sizeof s.y_ppem) return 0;
|
||||
return 1],
|
||||
ac_cv_member_FT_Bitmap_Size_y_ppem=yes,
|
||||
ac_cv_member_FT_Bitmap_Size_y_ppem=no)])
|
||||
if test "$ac_cv_member_FT_Bitmap_Size_y_ppem" = yes; then
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=1
|
||||
else
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,
|
||||
$HAVE_FT_BITMAP_SIZE_Y_PPEM,
|
||||
[FT_Bitmap_Size structure includes y_ppem field])
|
||||
|
||||
AC_CHECK_FUNCS(FT_GlyphSlot_Embolden FT_Load_Sfnt_Table FT_Select_Size)
|
||||
|
||||
LIBS="$_SAVE_LIBS"
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
fi
|
||||
|
||||
_SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
|
||||
MOZ_CHECK_HEADERS([fontconfig/fcfreetype.h], ,
|
||||
[AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)], [#include <fontconfig/fontconfig.h>])
|
||||
CPPFLAGS="$_SAVE_CPPFLAGS"
|
||||
else
|
||||
AC_DEFINE(HAVE_FONTCONFIG_FCFREETYPE_H)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Check for pixman and cairo
|
||||
dnl ========================================================
|
||||
@ -8683,18 +8694,6 @@ if test "$MOZ_GL_DEFAULT_PROVIDER" = "GLX"; then
|
||||
fi # MOZ_GL_DEFAULT_PROVIDER=GLX
|
||||
fi # COMPILE_ENVIRONMENT
|
||||
|
||||
if test "$USE_FC_FREETYPE"; then
|
||||
if test "$COMPILE_ENVIRONMENT"; then
|
||||
_SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
|
||||
MOZ_CHECK_HEADERS([fontconfig/fcfreetype.h], ,
|
||||
[AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)], [#include <fontconfig/fontconfig.h>])
|
||||
CPPFLAGS="$_SAVE_CPPFLAGS"
|
||||
else
|
||||
AC_DEFINE(HAVE_FONTCONFIG_FCFREETYPE_H)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Set various defines and substitutions
|
||||
dnl ========================================================
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user