$OpenBSD: patch-configure,v 1.11 2012/04/14 15:13:30 naddy Exp $
--- configure.orig	Wed Sep 15 16:42:36 2010
+++ configure	Fri Apr 13 16:05:41 2012
@@ -73,13 +73,13 @@ NLS=auto
 OPTIMIZER="-O"
 LIBCRYPT=
 LIBPAM=
-LIBTIFF="-ltiff"
-TIFFINC=
+LIBTIFF="-L${LOCALBASE}/lib -ltiff"
+TIFFINC="-I${LOCALBASE}/include"
 TIFFBIN=
 LIBUTIL=
 LIBZ=-lz
 ZLIBINC=
-LIBINTL=
+LIBINTL="-L${LOCALBASE}/lib -I${LOCALBASE}/include -lintl -liconv"
 INTLINC=
 REGEX=yes
 LIBREGEX='-L${DEPTH}/regex -lregex'
@@ -1559,7 +1559,7 @@ int t() { $f(); return 0; }
 int main(){ t(); return 0; }
 EOF
     capture cat t.c
-    runMake t "t:; \${CCF} t.c $libs"
+    runMake t "t:; \${CCF} t.c -I${LOCALBASE}/include -L${LOCALBASE}/lib $libs"
 }
 
 #
@@ -1587,7 +1587,7 @@ CheckForIncludeFile()
 	echo "#include \"$i\""
      done)>t.c++
     capture cat t.c++
-    runMake t "t:; \${C++F} \${C++FILE} -E t.c++${MAKECXXOVERRIDE}"
+    runMake t "t:; \${C++F} \${C++FILE} -E t.c++${MAKECXXOVERRIDE} -I${LOCALBASE}/include"
 }
 
 if [ "$SGI2FAX" = auto ]; then
@@ -2552,6 +2552,7 @@ EOF
 	    case ${lib_ver} in
 		3.4)		tiff_runlen_t="uint16" ;;
 		3.[56789])	tiff_runlen_t="uint32" ;;
+		4.[0-9])	tiff_runlen_t="uint32" ;;
 	    esac
 	fi
     else
@@ -3383,19 +3384,8 @@ fi
 HAVE_JBIGTIFF="/*#define HAVE_JBIGTIFF 1*/"
 if [ "$DISABLE_JBIG" != "yes" ]; then
     Note "Checking JBIG-in-TIFF conversion support."
-    $TIFFBIN/tiffcp -c g4 misc/jbig.tif misc/foo.tif > /dev/null 2>&1
-    if [ $? = 0 ]; then
-	$TIFFBIN/tiffcp misc/jbig.tif misc/foo.tif > /dev/null
-	if [ -n "`$TIFFBIN/tiffinfo misc/foo.tif | grep 'Fax DCS'`" ]; then
-	    HAVE_JBIGTIFF="#define HAVE_JBIGTIFF 1"
-	    Note "JBIG-in-TIFF conversion support found."
-	else
-	    Note "JBIG-in-TIFF fax support not found."
-	fi
-    else
-	Note "JBIG-in-TIFF conversion support not found."
-    fi
-    rm -f misc/foo.tif
+    # OpenBSD does not have JBIG-in-TIFF support
+    Note "JBIG-in-TIFF conversion support not found."
 fi
 
 Note "Done checking TIFF support."
@@ -4659,10 +4649,10 @@ case $MANSCHEME in
 *-0|*-0.gz|*-0.Z|*-gz|*-Z|*-z)
     suf=`echo $MANSCHEME | $SED 's/.*-/./'`
     A='`echo $$i | sed' B='`'		# workaround shell bugs
-    MANCAPPNAME="$A s/\\\\.1\$\$/$suf/$B"
-    MANCFILENAME="$A s/\\\\.4f\$\$/$suf/$B"
-    MANSAPPNAME="$A s/\\\\.1m\$\$/$suf/$B"
-    MANSFILENAME="$A s/\\\\.4f\$\$/$suf/$B"
+    MANCAPPNAME="$A s/\\\\.1\$$/$suf/$B"
+    MANCFILENAME="$A s/\\\\.4f\$$/$suf/$B"
+    MANSAPPNAME="$A s/\\\\.1m\$$/$suf/$B"
+    MANSFILENAME="$A s/\\\\.4f\$$/$suf/$B"
     ;;
 bsd-*-strip)
     MANCAPPNAME='$$i'
