$OpenBSD: patch-configure_in,v 1.8 2014/11/20 09:11:22 brad Exp $
--- configure.in.orig	Tue May 22 02:09:42 2001
+++ configure.in	Tue Jun  4 11:22:03 2013
@@ -103,6 +103,8 @@ if test "$mgp_use_freetype" = "yes"; then
  			ac_cv_ft_include="$dir/include"
  		elif test -d $dir/include/freetype -a -f $dir/include/freetype/freetype.h; then
  			ac_cv_ft_include="$dir/include/freetype"
+ 		elif test -d $dir/include/freetype1/freetype -a -f $dir/include/freetype1/freetype/freetype.h; then
+ 			ac_cv_ft_include="$dir/include/freetype1/freetype"
 		fi
  		if test "$ac_cv_ft_lib" != "no" -a "$ac_cv_ft_include" != "no"; then
  			LIBS="-L$ac_cv_ft_lib $LIBS"
@@ -118,7 +120,7 @@ if test "$mgp_use_freetype" = "yes"; then
  	fi
 fi
 if test "$mgp_use_freetype" = "yes"; then
-	LIBS="-L$ac_cv_ft_lib $LIBS"
+	LIBS="-L$ac_cv_ft_lib $LIBS -liconv"
 	OPTFLAGS="-I$ac_cv_ft_include $OPTFLAGS"
 	DEPLIBS="$ac_cv_ft_lib/$ac_cv_ft_libpath $DEPLIBS"
 	AC_CHECK_LIB(intl, dgettext)
@@ -257,7 +259,7 @@ for i in /usr/pkg /usr/local /usr; do
 		AC_CHECK_LIB(png, png_read_image, 
 			[LIBS="$LIBS -lpng"
 			 AC_DEFINE(USE_PNG)], 
-		[AC_CHECK_LIB(png, png_set_gray_1_2_4_to_8,
+		[AC_CHECK_LIB(png, png_set_expand_gray_1_2_4_to_8,
 			[LIBS="$LIBS -lpng -lz"
 			 AC_DEFINE(USE_PNG)],
 			[], [-lz])])
