[PATCH 1/2] Use pkg-config to find FreeType

Evangelos Foutras evangelos at foutrelis.com
Sun Jun 10 22:38:31 CEST 2018


Starting with FreeType 2.9.1, freetype-config might not be available.
---
 acinclude.m4 | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 546e2fe..596917b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -52,23 +52,7 @@ if test x"$ac_tumbler_font_thumbnailer" = x"yes"; then
   PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.14], 
   [
     dnl Check for FreeType 2.x
-    FREETYPE_LIBS=""
-    FREETYPE_CFLAGS=""
-    AC_PATH_PROG([FREETYPE_CONFIG], [freetype-config], [no])
-    if test x"$FREETYPE_CONFIG" != x"no"; then
-      AC_MSG_CHECKING([FREETYPE_CFLAGS])
-      FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
-      AC_MSG_RESULT([$FREETYPE_CFLAGS])
-    
-      AC_MSG_CHECKING([FREETYPE_LIBS])
-      FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
-      AC_MSG_RESULT([$FREETYPE_LIBS])
-    else
-      dnl We can only build the font thumbnailer if FreeType 2.x is available
-      ac_tumbler_font_thumbnailer=no
-    fi
-    AC_SUBST([FREETYPE_CFLAGS])
-    AC_SUBST([FREETYPE_LIBS])
+    PKG_CHECK_MODULES([FREETYPE], [freetype2], [], [ac_tumbler_font_thumbnailer=no])
   ], [ac_tumbler_font_thumbnailer=no])
 fi
 
-- 
2.17.1



More information about the Xfce4-dev mailing list