$OpenBSD: patch-configure_in,v 1.2 2011/11/07 12:11:55 sthen Exp $
--- configure.in.orig	Wed Oct 26 03:29:42 2011
+++ configure.in	Wed Oct 26 18:58:44 2011
@@ -238,9 +238,6 @@ if test x"$LIBTOOL" = x; then
 	AC_MSG_ERROR([could not detect libtool, bailing out])
 fi
 
-dnl Check if the X libraries are installed (needed for libungif on at least Solaris)
-AC_CHECK_LIB(X11, XGetImage, XLIB="-lX11", XLIB="")
-
 AC_ARG_ENABLE(
 [freetype],
 [  --enable-freetype       Enable freetype support (default: enabled)],
@@ -279,13 +276,12 @@ dnl Check for the gif or ungif libraries
 AC_CHECK_LIB(gif, PrintGifError, GIFLIB="-lgif", GIFLIB="")
 dnl MinGW check for libungif
 AC_CHECK_LIB(ungif, DGifOpen, GIFLIB="-lungif")
-dnl Solaris needs -lX11 on the linker line for ungif to work
-AC_CHECK_LIB(ungif, PrintGifError, GIFLIB="-lungif",, "-lX11")
+AC_CHECK_LIB(ungif, PrintGifError, GIFLIB="-lungif")
 AC_CHECK_HEADERS([gif_lib.h], GIFINC="true", GIFINC="")
 
 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(png, png_read_image, PNGLIB="-lpng", PNGLIB="", [-lm -lz])
 
 dnl Check for the zlib library
 AC_CHECK_LIB(z, compress2,
@@ -338,24 +334,6 @@ if test -n "${PNGLIB}"; then
 fi
 
 CFLAGS="$CFLAGS -Wall"
-MACHINE=`uname -m`
-case "$MACHINE" in
-"x86_64")
-	CFLAGS="$CFLAGS -fPIC"
-	;;
-"alpha")
-	CFLAGS="$CFLAGS -fPIC"
-	;;
-"ia64")
-	CFLAGS="$CFLAGS -fPIC"
-	;;
-"hppa")
-	CFLAGS="$CFLAGS -fPIC"
-	;;
-*)
-	;;
-esac
-	
 
 dnl -------------------------------------------
 dnl Byteorder check
