Control: tag -1 patch Hi,
greetings from the BSP in Karlsruhe. Here's a patch that uses the proper Autoconf mechanism for calling pkg-config. I have successfully tested building in a clean sid chroot. Cheers, -Hilko
From: Hilko Bengen <ben...@debian.org> Date: Sat, 27 Oct 2018 00:53:35 +0200 Subject: Use pkg-config for freetype --- configure.ac | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 5cbcc8b..a1b35d6 100644 --- a/configure.ac +++ b/configure.ac @@ -48,27 +48,14 @@ AM_CONDITIONAL([X11_UNAVAILABLE], [test x$no_x = xyes]) AC_FUNC_ALLOCA AC_FUNC_MALLOC -# Check for Freetype2 usability. -AC_CHECK_PROG(HAVE_FREETYPE_CONFIG, freetype-config, yes) -if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then - FREETYPE_INC=`freetype-config --cflags` - CPPFLAGS="$CPPFLAGS $FREETYPE_INC" - AC_CHECK_HEADER(ft2build.h, HAVE_FREETYPE=yes, - HAVE_FREETYPE=no CPPFLAGS=$save_CPPFLAGS) - if test "x$HAVE_FREETYPE" = "xyes" ; then - FREETYPE_LD_FLAGS=`freetype-config --libs`; - LIBS="$LIBS $FREETYPE_LD_FLAGS" - AC_CHECK_LIB(freetype, FT_Init_FreeType, HAVE_FREETYPE=yes, - HAVE_FREETYPE=no) - fi -fi - -if test "x$HAVE_FREETYPE" != "xyes" ; then - echo "Freetype library wan't found in your system!" - exit 1 -fi -AC_SUBST(FREETYPE_INC) -AC_SUBST(FREETYPE_LD_FLAGS) +PKG_CHECK_MODULES( + [FREETYPE], + [freetype2], + [ + CFLAGS="$CFLAGS $FREETYPE_CFLAGS" + LIBS="$LIBS $FREETYPE_LIBS" + ], + [AC_MSG_ERROR([Can't find Freetype library])]) if test "x$no_x" != "xyes"; then X11_XT_XAW_XMU="-lX11 -lXt -lXaw -lXmu"