* configure.ac: Check for freetype library usability.

This commit is contained in:
Vladimir Serbinenko 2013-12-08 10:50:59 +01:00
parent c311ced5d7
commit b75db69ac1
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2013-12-08 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Check for freetype library usability.
2013-12-08 Vladimir Serbinenko <phcoder@gmail.com> 2013-12-08 Vladimir Serbinenko <phcoder@gmail.com>
Make arm-emu work. Make arm-emu work.

View file

@ -1201,10 +1201,14 @@ if test x"$grub_mkfont_excuse" = x ; then
freetype_cflags=`$FREETYPE --cflags` freetype_cflags=`$FREETYPE --cflags`
freetype_libs=`$FREETYPE --libs` freetype_libs=`$FREETYPE --libs`
SAVED_CPPFLAGS="$CPPFLAGS" SAVED_CPPFLAGS="$CPPFLAGS"
SAVED_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $freetype_cflags" CPPFLAGS="$CPPFLAGS $freetype_cflags"
LIBS="$LIBS $freetype_libs"
AC_CHECK_HEADERS([ft2build.h], [], AC_CHECK_HEADERS([ft2build.h], [],
[grub_mkfont_excuse=["need freetype2 headers"]]) [grub_mkfont_excuse=["need freetype2 headers"]])
AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_mkfont_excuse=["freetype2 library unusable"]])
CPPFLAGS="$SAVED_CPPFLAGS" CPPFLAGS="$SAVED_CPPFLAGS"
LIBS="$SAVED_LIBS"
fi fi
if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
@ -1256,9 +1260,13 @@ if test x"$grub_build_mkfont_excuse" = x ; then
build_freetype_cflags=`$BUILD_FREETYPE --cflags` build_freetype_cflags=`$BUILD_FREETYPE --cflags`
build_freetype_libs=`$BUILD_FREETYPE --libs` build_freetype_libs=`$BUILD_FREETYPE --libs`
SAVED_CPPFLAGS_2="$CPPFLAGS" SAVED_CPPFLAGS_2="$CPPFLAGS"
SAVED_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $build_freetype_cflags" CPPFLAGS="$CPPFLAGS $build_freetype_cflags"
LIBS="$LIBS $build_freetype_libs"
AC_CHECK_HEADERS([ft2build.h], [], AC_CHECK_HEADERS([ft2build.h], [],
[grub_build_mkfont_excuse=["need freetype2 headers"]]) [grub_build_mkfont_excuse=["need freetype2 headers"]])
AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_build_mkfont_excuse=["freetype2 library unusable"]])
LIBS="$SAVED_LIBS"
CPPFLAGS="$SAVED_CPPFLAGS_2" CPPFLAGS="$SAVED_CPPFLAGS_2"
fi fi