7f332c
https://bugs.gentoo.org/654758
7f332c
7f332c
--- SDL_ttf-2.0.11/configure.in
7f332c
+++ SDL_ttf-2.0.11/configure.in
7f332c
@@ -64,6 +64,7 @@
7f332c
 	;;
7f332c
 esac
7f332c
 
7f332c
+PKG_PROG_PKG_CONFIG
7f332c
 
7f332c
 dnl Check for iconv (character conversion library; see iconv.m4)
7f332c
 dnl This isn't available on many systems
7f332c
@@ -94,6 +95,17 @@
7f332c
 dnl
7f332c
 dnl Get the cflags and libraries from the freetype-config script
7f332c
 dnl
7f332c
+PKG_CHECK_MODULES(
7f332c
+	FREETYPE2,
7f332c
+	freetype2,
7f332c
+	[
7f332c
+		ft_found=yes
7f332c
+		CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
7f332c
+		LIBS="$LIBS $FREETYPE2_LIBS"
7f332c
+	],
7f332c
+	ft_found=no
7f332c
+)
7f332c
+
7f332c
 AC_ARG_WITH(freetype-prefix,[  --with-freetype-prefix=PFX   Prefix where FREETYPE is 
7f332c
 installed (optional)],
7f332c
             freetype_prefix="$withval", freetype_prefix="")
7f332c
@@ -101,6 +113,7 @@
7f332c
 where FREETYPE is installed (optional)],
7f332c
             freetype_exec_prefix="$withval", freetype_exec_prefix="")
7f332c
 
7f332c
+if test "x$ft_found" != "xyes" ; then
7f332c
 if test x$freetype_exec_prefix != x ; then
7f332c
      freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix"
7f332c
      if test x${FREETYPE_CONFIG+set} != xset ; then
7f332c
@@ -123,6 +136,7 @@
7f332c
     CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
7f332c
     LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
7f332c
 fi
7f332c
+fi
7f332c
 
7f332c
 dnl Check for SDL
7f332c
 SDL_VERSION=1.2.4