Index: config/mkmainlib.inc.in
--- config/mkmainlib.inc.in.orig	2008-02-28 10:42:52 +0100
+++ config/mkmainlib.inc.in	2008-02-29 19:09:25 +0100
@@ -29,7 +29,7 @@
 	@-if test "$(WITH_SHARED)" = "no"; then	\
 	    cp .libs/$(MAINLIBNAME) .libs/$(MAINLIBNAME)i;\
 	fi
-	$(LIBTOOL) $(INSTALL_DATA) $(MAINLIBNAME) $(DESTDIR)$(libdir);
+	$(LIBTOOL) --mode=install $(INSTALL_DATA) $(MAINLIBNAME) $(DESTDIR)$(libdir);
 	@-if test "$(WITH_SHARED)" = "yes"; then	\
 	    $(LIBTOOL) -n --finish $(DESTDIR)$(libdir);\
 	else\
Index: configure
--- configure.orig	2008-02-28 10:42:52 +0100
+++ configure	2008-02-29 18:46:33 +0100
@@ -9320,6 +9320,7 @@
 
 
 # zlib
+if [ ".$FLATELIBINC" = . -a ".$FLATELIBLINK" = . ]; then
 if test -d libs/flate ; then
     FLATELIBINC="-I\$(top_builddir)/libs/flate"
     FLATELIBLINK="\$(top_builddir)/libs/flate/libz\$(LA)"
@@ -9328,10 +9329,12 @@
     FLATELIBINC=""
     FLATELIBLINK=""
 fi
+fi
 
 
 
 # pnglib
+if [ ".$PNGLIBINC" = . -a ".$PNGLIBLINK" = . ]; then
 if test -d libs/png ; then
     PNGLIBINC="-I\$(top_builddir)/libs/png"
     PNGLIBLINK="\$(top_builddir)/libs/png/libpng\$(LA)"
@@ -9340,10 +9343,12 @@
     PNGLIBINC=""
     PNGLIBLINK=""
 fi
+fi
 
 
 
 # tifflib
+if [ ".$TIFFLIBINC" = . -a ".$TIFFLIBLINK" = . ]; then
 if test -d libs/tiff ; then
     TIFFLIBINC="-I\$(top_builddir)/libs/tiff"
     TIFFLIBLINK="\$(top_builddir)/libs/tiff/libtiff\$(LA)"
@@ -9352,10 +9357,12 @@
     TIFFLIBINC=""
     TIFFLIBLINK=""
 fi
+fi
 
 
 
 # jpeglib
+if [ ".$JPEGLIBINC" = . -a ".$JPEGLIBLINK" = . ]; then
 if test -d libs/jpeg ; then
     JPEGLIBINC="-I\$(top_builddir)/libs/jpeg"
     JPEGLIBLINK="\$(top_builddir)/libs/jpeg/libjpeg\$(LA)"
@@ -9364,6 +9371,7 @@
     JPEGLIBINC=""
     JPEGLIBLINK=""
 fi
+fi
 
 
 
Index: libs/tiff/tif_ojpeg.c
--- libs/tiff/tif_ojpeg.c.orig	2008-02-28 10:42:58 +0100
+++ libs/tiff/tif_ojpeg.c	2008-02-29 18:46:33 +0100
@@ -141,7 +141,9 @@
 #undef JPEG_INTERNALS
 
 /* Hack for files produced by Wang Imaging application on Microsoft Windows */
+#if 0
 extern void jpeg_reset_huff_decode(j_decompress_ptr);
+#endif
 
 /* PDFlib GmbH */
 #if defined(__ia64__) && defined (__linux__)
@@ -1110,7 +1112,9 @@
     "jdshuff.c", if Ken Murchison's lossless-Huffman patch is applied), and we
     invoke that interface here after decoding each "strip".
  */
+#if 0
     if (sp->is_WANG) jpeg_reset_huff_decode(&sp->cinfo.d);
+#endif
     return 1;
   }
 
@@ -1209,7 +1213,9 @@
     "jdshuff.c", if Ken Murchison's lossless-Huffman patch is applied), and we
     invoke that interface here after decoding each "strip".
  */
+#if 0
     if (sp->is_WANG) jpeg_reset_huff_decode(&sp->cinfo.d);
+#endif
     return 1;
   }
 
