Index: ext/libtiff.jam
===================================================================
--- ext/libtiff.jam	(revision 66346)
+++ ext/libtiff.jam	(working copy)
@@ -137,6 +137,10 @@
 #define PACKAGE_VERSION "$(VERSION)"
 #define SIZEOF_INT (sizeof(int))
 #define SIZEOF_LOG (sizeof(long))
+/* Manual hack used on Linux 64-bit OS. It should be determined automatically. */
+#define TIFF_INT64_T long long
+#define TIFF_UINT64_T unsigned long long
+#define TIFF_INT64_FORMAT "%lld"
 $(CONFIG:J=$(NL))
 
 #endif // LIBTIFF_CONFIG_H
@@ -150,7 +154,7 @@
     
     make tif_config.h : : @config_h
         :   <libtiff-version>$(version)
-            <location-prefix>src
+            <location-prefix>libtiff
         ;
         explicit tif_config.h ;
     
@@ -206,6 +210,7 @@
             $(location)/libtiff/tif_write.c
             $(location)/libtiff/tif_zip.c
         :   <target-os>unix:<source>$(location)/libtiff/tif_unix.c
+            <target-os>linux:<source>$(location)/libtiff/tif_unix.c
             <target-os>windows:<source>$(location)/libtiff/tif_win32.c
             <target-os>windows,<link>shared,<toolset>msvc:<def-file>$(location)/libtiff/libtiff.def
             <target-os>windows,<link>shared,<toolset>msvc:<linkflags>/EXPORT:_TIFFDataSize
@@ -229,4 +234,24 @@
             <dependency>tif_config.h
             $(common-requirements)
         ;
+
+    lib tiffxx
+        :   $(location)/libtiff/tif_stream.cxx
+            /ext/libtiff//tiff
+        :   $(requirements)
+            <libtiff-version>$(version)
+            <libtiff-location>$(location)
+            <include>$(location)/libtiff
+            <location-prefix>libtiff
+            <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+            <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+            <warnings>off
+            $(common-requirements)
+        :
+        :   <include>$(location)/libtiff
+            <implicit-dependency>tif_config.h
+            <dependency>tif_config.h
+            $(common-requirements)
+        ;
+
 }
Index: ext/jpeg.jam
===================================================================
--- ext/jpeg.jam	(revision 66346)
+++ ext/jpeg.jam	(working copy)
@@ -91,6 +91,9 @@
             $(location)/jccoefct.c
             $(location)/jccolor.c
             $(location)/jcdctmgr.c
+            $(location)/jaricom.c
+            $(location)/jcarith.c
+            $(location)/jdarith.c
             $(location)/jchuff.c
             $(location)/jcinit.c
             $(location)/jcmainct.c
@@ -98,7 +101,6 @@
             $(location)/jcmaster.c
             $(location)/jcomapi.c
             $(location)/jcparam.c
-            $(location)/jcphuff.c
             $(location)/jcprepct.c
             $(location)/jcsample.c
             $(location)/jctrans.c
@@ -115,7 +117,6 @@
             $(location)/jdmarker.c
             $(location)/jdmaster.c
             $(location)/jdmerge.c
-            $(location)/jdphuff.c
             $(location)/jdpostct.c
             $(location)/jdsample.c
             $(location)/jdtrans.c
@@ -126,7 +127,6 @@
             $(location)/jidctflt.c
             $(location)/jidctfst.c
             $(location)/jidctint.c
-            $(location)/jidctred.c
             $(location)/jquant1.c
             $(location)/jquant2.c
             $(location)/jutils.c
Index: ext/zlib.jam
===================================================================
--- ext/zlib.jam	(revision 66346)
+++ ext/zlib.jam	(working copy)
@@ -27,7 +27,11 @@
             $(location)/compress.c
             $(location)/crc32.c
             $(location)/deflate.c
-            $(location)/gzio.c
+            $(location)/gzclose.c
+            $(location)/gzlib.c
+            $(location)/gzread.c
+            $(location)/gzwrite.c
+            $(location)/infback.c
             $(location)/inffast.c
             $(location)/inflate.c
             $(location)/inftrees.c
