$NetBSD: patch-configure.in,v 1.2 2022/07/27 18:49:45 wiz Exp $ First chunk: From ef3719d39e8bb7e96c6ec57d60261f1516353460 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Fri, 4 May 2018 17:40:04 +0200 Subject: [PATCH] Use pkg-config to find freetype As of freetype-2.9.1 the freetype-config script has been deprecated and is no longer shipped by default. Second chunk: Fix png library name. --- configure.in.orig 2017-04-07 08:12:56.000000000 +0000 +++ configure.in @@ -257,26 +257,8 @@ freetype_support=yes) if test "$freetype_support" = "yes"; then dnl Check for the freetype library - AC_ARG_WITH(freetype-config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes) - if test "$freetype_config" = "yes"; then - AC_PATH_PROG(ft_config,freetype-config,no) - if test "$ft_config" = "no"; then - echo "To compile ming please install freetype:" - echo " as .deb user: sudo apt-get install libfreetype6 libfreetype6-dev" - echo "" - echo "or disable the freetype configuration option:" - echo " --disable-freetype" - AC_MSG_ERROR([Could not detect freetype-config!]) - fi - else - ft_config="$freetype_config" - fi - - FREETYPE_CFLAGS="`$ft_config --cflags`" - FREETYPE_LIBS="`$ft_config --libs`" - - AC_SUBST(FREETYPE_LIBS) - AC_SUBST(FREETYPE_CFLAGS) + PKG_PROG_PKG_CONFIG + PKG_CHECK_MODULES(FREETYPE, freetype2,, AC_MSG_ERROR([Could not find freetype])) fi dnl Check for the ungif or gif (new or old) libraries @@ -297,7 +279,7 @@ AC_CHECK_HEADERS([gif_lib.h], GIFINC="tr dnl Check for the png library dnl Solaris needs -lm on the linker line, and other platforms aren't bothered having it there. :) -AC_CHECK_LIB(png, png_read_image, PNGLIB="-lpng", PNGLIB="", "-lm") +AC_CHECK_LIB(png16, png_read_image, PNGLIB="-lpng16", PNGLIB="", "-lm") dnl Check for the zlib library AC_CHECK_LIB(z, compress2,