$OpenBSD: patch-configure_in,v 1.1 2009/08/12 21:03:56 sthen Exp $
--- configure.in.orig	Sun May 27 22:05:57 2007
+++ configure.in	Mon Aug 10 21:35:43 2009
@@ -445,7 +445,7 @@ hastif=
 dnl Check if we have libtiff
 SAVE_LDFLAGS="$LDFLAGS"
 LDFLAGS="$all_libraries $LDFLAGS"
-AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no],[-lm])
+AC_CHECK_LIB(tiff, TIFFOpen, [LIBTIFF="-ltiff";hastif=yes],[LIBTIFF="";hastif=no],[-lm -ljpeg -lz -lm])
 LDFLAGS="$SAVE_LDFLAGS"
 if test $hastif = yes; then
 	dnl Check for tiffvers.h
@@ -550,9 +550,9 @@ else
 	GS_VER_MAJOR=`gs --version | cut -d . -f 1`
 	GS_VER_MINOR=`gs --version | cut -d . -f 2`
 	AC_MSG_RESULT([${GS_VER_MAJOR}.${GS_VER_MINOR}])
-	if (( "${GS_VER_MAJOR}" < 7 )) ; then
+	if test "${GS_VER_MAJOR}" -lt 7 ; then
 		AC_MSG_WARN("GhostScript found, but older than v7. v8 recommended.")
-	elif (( "${GS_VER_MAJOR}" < 8 )) ; then
+	elif test "${GS_VER_MAJOR}" -lt 8 ; then
 		AC_MSG_WARN("GhostScript v7 found. v8 recommended.")
 	fi
 fi
@@ -873,9 +873,9 @@ if test -z "${GS_PATH}" ; then
 	echo "***GhostScript could not be found. See README.***"
 else
 	echo "GhostScript ${GS_VER_MAJOR}.${GS_VER_MINOR} was found at ${GS_PATH}"
-	if (( "${GS_VER_MAJOR}" < 7 )) ; then
+	if test "${GS_VER_MAJOR}" -lt 7 ; then
 		echo "    *** GhostScript versions older than 7 MAY NOT WORK; v8 recommended ***"
-	elif (( "${GS_VER_MAJOR}" < 8 )) ; then
+	elif test "${GS_VER_MAJOR}" -lt 8 ; then
 		echo "    *** GhostScript 8 is STRONGLY recommended ***"
 	fi
 fi
