$OpenBSD: patch-configure_in,v 1.5 2005/11/03 14:46:01 espie Exp $
--- configure.in.orig	Tue May 22 08:09:42 2001
+++ configure.in	Thu Nov  3 15:00:38 2005
@@ -103,6 +103,8 @@ if test "$mgp_use_freetype" = "yes"; the
  			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"; the
  	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)
@@ -244,7 +246,7 @@ if test "$mgp_use_freetype" = "yes"; the
 fi
 
 for i in /usr/pkg /usr/local /usr; do
-	if test -f $i/include/png.h; then 
+	if test -f $i/include/libpng/png.h; then 
 		if test -f $i/lib/libpng.a ; then
 			DEPLIBS="$DEPLIBS $i/lib/libpng.a"
 		elif test -f $i/lib/libpng.so ; then
@@ -253,7 +255,7 @@ for i in /usr/pkg /usr/local /usr; do
 			break;
 		fi
 		LIBS="$LIBS -L$i/lib"
-		OPTFLAGS="$OPTFLAGS -I$i/include"
+		OPTFLAGS="$OPTFLAGS -I$i/include/libpng"
 		AC_CHECK_LIB(png, png_read_image, 
 			[LIBS="$LIBS -lpng"
 			 AC_DEFINE(USE_PNG)], 
@@ -274,7 +276,7 @@ for i in /usr/pkg /usr/local /usr; do
 		else
 			break;
 		fi
-		LIBS="$LIBS -L$i/lib"
+		LIBS="$LIBS -L$i/lib -ljpeg -llcms"
 		OPTFLAGS="$OPTFLAGS -I$i/include"
 		AC_CHECK_LIB(mng, mng_initialize, 
 			[LIBS="$LIBS -Wl,-rpath,$i/lib -lmng"
