[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#504340: djvulibre-plugin/testing and #504340



Hi,

Thomas Viehmann wrote:
> What it seems to boil down to is that the handling of static variables
> (such as the instance Map) is, let's say, not ideal - it has no locking
> and apparently the SetWindow is called at some inopportune moment.
> The Debian release zars said off-list that they prefer a proper fix as
> well, so that is the new plan. I'll probably investigate removing the
> instance map first (and look at what the other static globals are and
> what to do with them.
> I hope to be back with more on the issue in a while.

Please find attached a patch liberally ladding locking to various uses
of global variables. The meat of the patch is the changes to nsdejavu.c,
with most of the other stuff a result of autoreconf -f -i after adding
pthreads to the NSDEJAVU_LIBS in configure.ac.
Of course, the patch is large enough to introduce some risks
(deadlocks), but it looks sane to me and it worked well in my testing.
As commented in the code, I think some stuff could be made nicer (e.g.
moving the pipe locking to callers), but the patch should achieve
consistency when accessing global variables except in place where I have
made mistakes.

Given that the default proposition in Lenny's djvulibre-plugin currently
is segmentation faults, I propose to introduce this via t-p-u despite
the above risk.

Leon, I'm not sure that pthread locking is what is most useful to you
for portability, but I'm sure it's not that hard to adapt it to whatever
mechanism you prefer.

Kind regards

T.
-- 
Thomas Viehmann, http://thomas.viehmann.net/
diff -u djvulibre-3.5.20/configure.ac djvulibre-3.5.20/configure.ac
--- djvulibre-3.5.20/configure.ac
+++ djvulibre-3.5.20/configure.ac
@@ -334,7 +334,7 @@
 
 
 NSDEJAVU_CFLAGS=
-NSDEJAVU_LIBS=
+NSDEJAVU_LIBS=-lpthread
 if test x$ac_enable_djview != xno 
 then
  NSDEJAVU_CFLAGS=${X_CFLAGS}
diff -u djvulibre-3.5.20/configure djvulibre-3.5.20/configure
--- djvulibre-3.5.20/configure
+++ djvulibre-3.5.20/configure
@@ -27339,7 +27339,7 @@
 
 
 NSDEJAVU_CFLAGS=
-NSDEJAVU_LIBS=
+NSDEJAVU_LIBS=-lpthread
 if test x$ac_enable_djview != xno
 then
  NSDEJAVU_CFLAGS=${X_CFLAGS}
diff -u djvulibre-3.5.20/debian/changelog djvulibre-3.5.20/debian/changelog
--- djvulibre-3.5.20/debian/changelog
+++ djvulibre-3.5.20/debian/changelog
@@ -1,3 +1,12 @@
+djvulibre (3.5.20-8+lenny1) testing; urgency=low
+
+  * Non-maintainer upload.
+  * djvulibre-plugin: use locking when accessing global static
+    variables.
+    Closes: #504340, #507972
+
+ -- Thomas Viehmann <tv@ramanujan>  Tue, 16 Dec 2008 22:38:06 +0100
+
 djvulibre (3.5.20-8+lenny0) testing; urgency=low
 
   * Non-maintainer upload to testing.
diff -u djvulibre-3.5.20/libdjvu/Makefile.dep djvulibre-3.5.20/libdjvu/Makefile.dep
--- djvulibre-3.5.20/libdjvu/Makefile.dep
+++ djvulibre-3.5.20/libdjvu/Makefile.dep
@@ -1,7 +1,5 @@
 Arrays.lo Arrays.o: Arrays.cpp ../config.h Arrays.h GException.h DjVuGlobal.h \
   GSmartPointer.h atomic.h ByteStream.h
-atomic.lo atomic.o: atomic.cpp ../config.h atomic.h GThreads.h DjVuGlobal.h \
-  GException.h
 BSByteStream.lo BSByteStream.o: BSByteStream.cpp ../config.h BSByteStream.h ByteStream.h \
   Arrays.h GException.h DjVuGlobal.h GSmartPointer.h atomic.h ZPCodec.h \
   GContainer.h
@@ -14,21 +12,12 @@
 DataPool.lo DataPool.o: DataPool.cpp ../config.h DataPool.h GThreads.h DjVuGlobal.h \
   GException.h GString.h GContainer.h GSmartPointer.h atomic.h GURL.h \
   Arrays.h IFFByteStream.h ByteStream.h GOS.h debug.h
-ddjvuapi.lo ddjvuapi.o: ddjvuapi.cpp ../config.h GException.h DjVuGlobal.h \
-  GSmartPointer.h atomic.h GThreads.h GContainer.h ByteStream.h Arrays.h \
-  IFFByteStream.h GString.h BSByteStream.h ZPCodec.h GBitmap.h GPixmap.h \
-  GScaler.h GRect.h DjVuPort.h GURL.h DataPool.h DjVuInfo.h IW44Image.h \
-  DjVuImage.h DjVuFile.h DjVuPalette.h DjVuAnno.h DjVuFileCache.h \
-  DjVuDocument.h DjVuDumpHelper.h DjVuMessageLite.h DjVuMessage.h \
-  DjVmNav.h DjVuText.h GMapAreas.h DjVuToPS.h DjVmDir.h DjVmDir0.h \
-  DjVuNavDir.h DjVmDoc.h miniexp.h ddjvuapi.h
-debug.lo debug.o: debug.cpp ../config.h debug.h
-DjVmDir0.lo DjVmDir0.o: DjVmDir0.cpp ../config.h DjVmDir0.h GString.h DjVuGlobal.h \
-  GContainer.h GException.h GSmartPointer.h atomic.h ByteStream.h \
-  Arrays.h debug.h
 DjVmDir.lo DjVmDir.o: DjVmDir.cpp ../config.h DjVmDir.h GString.h DjVuGlobal.h \
   GContainer.h GException.h GSmartPointer.h atomic.h GThreads.h \
   BSByteStream.h ByteStream.h Arrays.h ZPCodec.h GURL.h debug.h
+DjVmDir0.lo DjVmDir0.o: DjVmDir0.cpp ../config.h DjVmDir0.h GString.h DjVuGlobal.h \
+  GContainer.h GException.h GSmartPointer.h atomic.h ByteStream.h \
+  Arrays.h debug.h
 DjVmDoc.lo DjVmDoc.o: DjVmDoc.cpp ../config.h DjVmDoc.h DjVmDir.h GString.h \
   DjVuGlobal.h GContainer.h GException.h GSmartPointer.h atomic.h \
   GThreads.h DjVmNav.h DataPool.h GURL.h Arrays.h IFFByteStream.h \
@@ -60,16 +49,16 @@
 DjVuErrorList.lo DjVuErrorList.o: DjVuErrorList.cpp ../config.h DjVuErrorList.h DjVuPort.h \
   GThreads.h DjVuGlobal.h GException.h GURL.h GString.h GContainer.h \
   GSmartPointer.h atomic.h Arrays.h DjVmDoc.h DjVmDir.h GOS.h DataPool.h
-DjVuFileCache.lo DjVuFileCache.o: DjVuFileCache.cpp ../config.h DjVuFileCache.h DjVuFile.h \
-  DjVuInfo.h GSmartPointer.h DjVuGlobal.h atomic.h GRect.h DjVuPalette.h \
-  GContainer.h GException.h GPixmap.h DjVuPort.h GThreads.h GURL.h \
-  GString.h Arrays.h debug.h
 DjVuFile.lo DjVuFile.o: DjVuFile.cpp ../config.h DjVuFile.h DjVuInfo.h \
   GSmartPointer.h DjVuGlobal.h atomic.h GRect.h DjVuPalette.h \
   GContainer.h GException.h GPixmap.h DjVuPort.h GThreads.h GURL.h \
   GString.h Arrays.h IFFByteStream.h ByteStream.h GOS.h MMRDecoder.h \
   JPEGDecoder.h DjVuAnno.h DjVuText.h GMapAreas.h DataPool.h JB2Image.h \
   ZPCodec.h IW44Image.h DjVuNavDir.h BSByteStream.h debug.h
+DjVuFileCache.lo DjVuFileCache.o: DjVuFileCache.cpp ../config.h DjVuFileCache.h DjVuFile.h \
+  DjVuInfo.h GSmartPointer.h DjVuGlobal.h atomic.h GRect.h DjVuPalette.h \
+  GContainer.h GException.h GPixmap.h DjVuPort.h GThreads.h GURL.h \
+  GString.h Arrays.h debug.h
 DjVuGlobal.lo DjVuGlobal.o: DjVuGlobal.cpp ../config.h
 DjVuGlobalMemory.lo DjVuGlobalMemory.o: DjVuGlobalMemory.cpp ../config.h
 DjVuImage.lo DjVuImage.o: DjVuImage.cpp ../config.h DjVuImage.h DjVuFile.h DjVuInfo.h \
@@ -110,7 +99,7 @@
   DjVuFile.h DjVuInfo.h DjVuPalette.h GPixmap.h DjVuAnno.h DataPool.h \
   IW44Image.h JB2Image.h GBitmap.h debug.h
 GBitmap.lo GBitmap.o: GBitmap.cpp ../config.h GBitmap.h GSmartPointer.h DjVuGlobal.h \
-  atomic.h ByteStream.h Arrays.h GException.h GRect.h GString.h \
+  atomic.h GException.h ByteStream.h Arrays.h GRect.h GString.h \
   GContainer.h GThreads.h
 GContainer.lo GContainer.o: GContainer.cpp ../config.h GContainer.h GException.h \
   DjVuGlobal.h GSmartPointer.h atomic.h
@@ -137,11 +126,11 @@
   GException.h GSmartPointer.h atomic.h GThreads.h debug.h
 GThreads.lo GThreads.o: GThreads.cpp ../config.h GThreads.h DjVuGlobal.h GException.h \
   DjVuMessageLite.h GString.h GContainer.h GSmartPointer.h atomic.h
-GUnicode.lo GUnicode.o: GUnicode.cpp ../config.h GString.h DjVuGlobal.h GContainer.h \
-  GException.h GSmartPointer.h atomic.h
 GURL.lo GURL.o: GURL.cpp ../config.h GException.h DjVuGlobal.h GOS.h GString.h \
   GContainer.h GSmartPointer.h atomic.h GURL.h Arrays.h GThreads.h \
   debug.h
+GUnicode.lo GUnicode.o: GUnicode.cpp ../config.h GString.h DjVuGlobal.h GContainer.h \
+  GException.h GSmartPointer.h atomic.h
 IFFByteStream.lo IFFByteStream.o: IFFByteStream.cpp ../config.h IFFByteStream.h \
   DjVuGlobal.h GException.h GString.h GContainer.h GSmartPointer.h \
   atomic.h ByteStream.h Arrays.h
@@ -160,7 +149,6 @@
   GRect.h GBitmap.h
 JPEGDecoder.lo JPEGDecoder.o: JPEGDecoder.cpp ../config.h JPEGDecoder.h GSmartPointer.h \
   DjVuGlobal.h atomic.h ByteStream.h Arrays.h GException.h GPixmap.h
-miniexp.lo miniexp.o: miniexp.cpp ../config.h miniexp.h
 MMRDecoder.lo MMRDecoder.o: MMRDecoder.cpp ../config.h MMRDecoder.h GSmartPointer.h \
   DjVuGlobal.h atomic.h JB2Image.h GString.h GContainer.h GException.h \
   ZPCodec.h ByteStream.h Arrays.h GBitmap.h
@@ -180,0 +169,12 @@
+atomic.lo atomic.o: atomic.cpp ../config.h atomic.h GThreads.h DjVuGlobal.h \
+  GException.h
+ddjvuapi.lo ddjvuapi.o: ddjvuapi.cpp ../config.h GException.h DjVuGlobal.h \
+  GSmartPointer.h atomic.h GThreads.h GContainer.h ByteStream.h Arrays.h \
+  IFFByteStream.h GString.h BSByteStream.h ZPCodec.h GBitmap.h GPixmap.h \
+  GScaler.h GRect.h DjVuPort.h GURL.h DataPool.h DjVuInfo.h IW44Image.h \
+  DjVuImage.h DjVuFile.h DjVuPalette.h DjVuAnno.h DjVuFileCache.h \
+  DjVuDocument.h DjVuDumpHelper.h DjVuMessageLite.h DjVuMessage.h \
+  DjVmNav.h DjVuText.h GMapAreas.h DjVuToPS.h DjVmDir.h DjVmDir0.h \
+  DjVuNavDir.h DjVmDoc.h miniexp.h ddjvuapi.h
+debug.lo debug.o: debug.cpp ../config.h debug.h
+miniexp.lo miniexp.o: miniexp.cpp ../config.h miniexp.h
diff -u djvulibre-3.5.20/tools/Makefile.dep djvulibre-3.5.20/tools/Makefile.dep
--- djvulibre-3.5.20/tools/Makefile.dep
+++ djvulibre-3.5.20/tools/Makefile.dep
@@ -1,22 +1,22 @@
-bzz.o: bzz.cpp ../config.h ../libdjvu/GException.h ../config.h \
+bzz.o: bzz.cpp ../config.h ../libdjvu/GException.h \
   ../libdjvu/DjVuGlobal.h ../libdjvu/ByteStream.h ../libdjvu/Arrays.h \
-  ../libdjvu/GException.h ../libdjvu/GSmartPointer.h \
+  ../libdjvu/GException.h ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h \
   ../libdjvu/BSByteStream.h ../libdjvu/ByteStream.h ../libdjvu/ZPCodec.h \
   ../libdjvu/GContainer.h ../libdjvu/GOS.h ../libdjvu/GString.h \
   ../libdjvu/GURL.h ../libdjvu/GThreads.h ../libdjvu/DjVuMessage.h \
   ../libdjvu/DjVuMessageLite.h
-c44.o: c44.cpp ../config.h ../libdjvu/GString.h ../config.h \
-  ../libdjvu/DjVuGlobal.h ../libdjvu/GContainer.h ../libdjvu/GException.h \
-  ../libdjvu/GSmartPointer.h ../libdjvu/GException.h \
+c44.o: c44.cpp ../config.h ../libdjvu/GString.h ../libdjvu/DjVuGlobal.h \
+  ../libdjvu/GContainer.h ../libdjvu/GException.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h ../libdjvu/GException.h \
   ../libdjvu/IW44Image.h ../libdjvu/ZPCodec.h ../libdjvu/DjVuInfo.h \
   ../libdjvu/GRect.h ../libdjvu/IFFByteStream.h ../libdjvu/GString.h \
   ../libdjvu/ByteStream.h ../libdjvu/Arrays.h ../libdjvu/GOS.h \
   ../libdjvu/GBitmap.h ../libdjvu/GPixmap.h ../libdjvu/GURL.h \
   ../libdjvu/GThreads.h ../libdjvu/DjVuMessage.h \
   ../libdjvu/DjVuMessageLite.h ../libdjvu/JPEGDecoder.h
-cjb2.o: cjb2.cpp ../config.h ../libdjvu/DjVuGlobal.h ../config.h \
+cjb2.o: cjb2.cpp ../config.h ../libdjvu/DjVuGlobal.h \
   ../libdjvu/GException.h ../libdjvu/DjVuGlobal.h \
-  ../libdjvu/GSmartPointer.h ../libdjvu/GContainer.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h ../libdjvu/GContainer.h \
   ../libdjvu/GException.h ../libdjvu/GSmartPointer.h \
   ../libdjvu/ByteStream.h ../libdjvu/Arrays.h ../libdjvu/IFFByteStream.h \
   ../libdjvu/GString.h ../libdjvu/GContainer.h ../libdjvu/ByteStream.h \
@@ -24,9 +24,9 @@
   ../libdjvu/ZPCodec.h ../libdjvu/DjVuInfo.h ../libdjvu/GRect.h \
   ../libdjvu/GOS.h ../libdjvu/GURL.h ../libdjvu/GThreads.h \
   ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h jb2tune.h
-cpaldjvu.o: cpaldjvu.cpp ../config.h ../libdjvu/DjVuGlobal.h ../config.h \
+cpaldjvu.o: cpaldjvu.cpp ../config.h ../libdjvu/DjVuGlobal.h \
   ../libdjvu/GException.h ../libdjvu/DjVuGlobal.h \
-  ../libdjvu/GSmartPointer.h ../libdjvu/GContainer.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h ../libdjvu/GContainer.h \
   ../libdjvu/GException.h ../libdjvu/GSmartPointer.h \
   ../libdjvu/ByteStream.h ../libdjvu/Arrays.h ../libdjvu/IFFByteStream.h \
   ../libdjvu/GString.h ../libdjvu/GContainer.h ../libdjvu/ByteStream.h \
@@ -35,9 +35,9 @@
   ../libdjvu/IW44Image.h ../libdjvu/DjVuInfo.h ../libdjvu/GRect.h \
   ../libdjvu/GOS.h ../libdjvu/GURL.h ../libdjvu/GThreads.h \
   ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h jb2tune.h
-csepdjvu.o: csepdjvu.cpp ../config.h ../libdjvu/DjVuGlobal.h ../config.h \
+csepdjvu.o: csepdjvu.cpp ../config.h ../libdjvu/DjVuGlobal.h \
   ../libdjvu/GException.h ../libdjvu/DjVuGlobal.h \
-  ../libdjvu/GSmartPointer.h ../libdjvu/GContainer.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h ../libdjvu/GContainer.h \
   ../libdjvu/GException.h ../libdjvu/GSmartPointer.h \
   ../libdjvu/ByteStream.h ../libdjvu/Arrays.h ../libdjvu/IFFByteStream.h \
   ../libdjvu/GString.h ../libdjvu/GContainer.h ../libdjvu/ByteStream.h \
@@ -45,44 +45,43 @@
   ../libdjvu/ZPCodec.h ../libdjvu/DjVuPalette.h ../libdjvu/GPixmap.h \
   ../libdjvu/IW44Image.h ../libdjvu/DjVuInfo.h ../libdjvu/GRect.h \
   ../libdjvu/DjVmDoc.h ../libdjvu/DjVmDir.h ../libdjvu/GThreads.h \
-  ../libdjvu/GOS.h ../libdjvu/GURL.h ../libdjvu/DjVuMessage.h \
-  ../libdjvu/DjVuMessageLite.h ../libdjvu/DjVuText.h ../libdjvu/DjVmNav.h \
-  ../libdjvu/GMapAreas.h ../libdjvu/GURL.h ../libdjvu/BSByteStream.h \
-  ../libdjvu/miniexp.h jb2tune.h
-ddjvu.o: ddjvu.cpp tiff2pdf.h ../config.h ../libdjvu/ddjvuapi.h
-tiff2pdf.o: tiff2pdf.c tiff2pdf.h ../config.h
-djvm.o: djvm.cpp ../config.h ../libdjvu/GException.h ../config.h \
+  ../libdjvu/DjVmNav.h ../libdjvu/GOS.h ../libdjvu/GURL.h \
+  ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h \
+  ../libdjvu/DjVuText.h ../libdjvu/GMapAreas.h ../libdjvu/GURL.h \
+  ../libdjvu/BSByteStream.h ../libdjvu/miniexp.h jb2tune.h
+ddjvu.o: ddjvu.cpp ../config.h ../libdjvu/ddjvuapi.h tiff2pdf.h
+djvm.o: djvm.cpp ../config.h ../libdjvu/GException.h \
   ../libdjvu/DjVuGlobal.h ../libdjvu/DjVuDocEditor.h \
   ../libdjvu/DjVuDocument.h ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h \
   ../libdjvu/GException.h ../libdjvu/GURL.h ../libdjvu/GString.h \
-  ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h ../libdjvu/Arrays.h \
-  ../libdjvu/DjVmDoc.h ../libdjvu/DjVmDir.h ../libdjvu/GOS.h \
-  ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h
-djvmcvt.o: djvmcvt.cpp ../config.h ../libdjvu/DjVuDocument.h ../config.h \
+  ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h \
+  ../libdjvu/Arrays.h ../libdjvu/DjVmDoc.h ../libdjvu/DjVmDir.h \
+  ../libdjvu/GOS.h ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h
+djvmcvt.o: djvmcvt.cpp ../config.h ../libdjvu/DjVuDocument.h \
   ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h ../libdjvu/DjVuGlobal.h \
   ../libdjvu/GException.h ../libdjvu/GURL.h ../libdjvu/GString.h \
-  ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h ../libdjvu/Arrays.h \
-  ../libdjvu/DjVmDoc.h ../libdjvu/DjVmDir.h ../libdjvu/ByteStream.h \
-  ../libdjvu/GOS.h ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h \
-  ../libdjvu/debug.h
+  ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h \
+  ../libdjvu/Arrays.h ../libdjvu/DjVmDoc.h ../libdjvu/DjVmDir.h \
+  ../libdjvu/ByteStream.h ../libdjvu/GOS.h ../libdjvu/DjVuMessage.h \
+  ../libdjvu/DjVuMessageLite.h ../libdjvu/debug.h
 djvudump.o: djvudump.cpp ../config.h ../libdjvu/DjVuDumpHelper.h \
-  ../config.h ../libdjvu/GSmartPointer.h ../libdjvu/DjVuGlobal.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/DjVuGlobal.h ../libdjvu/atomic.h \
   ../libdjvu/ByteStream.h ../libdjvu/Arrays.h ../libdjvu/GException.h \
   ../libdjvu/GException.h ../libdjvu/GOS.h ../libdjvu/GString.h \
   ../libdjvu/GContainer.h ../libdjvu/GURL.h ../libdjvu/GThreads.h \
   ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h
 djvuextract.o: djvuextract.cpp ../config.h ../libdjvu/GException.h \
-  ../config.h ../libdjvu/DjVuGlobal.h ../libdjvu/ByteStream.h \
-  ../libdjvu/Arrays.h ../libdjvu/GException.h ../libdjvu/GSmartPointer.h \
+  ../libdjvu/DjVuGlobal.h ../libdjvu/ByteStream.h ../libdjvu/Arrays.h \
+  ../libdjvu/GException.h ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h \
   ../libdjvu/IFFByteStream.h ../libdjvu/GString.h ../libdjvu/GContainer.h \
   ../libdjvu/ByteStream.h ../libdjvu/DjVuDocument.h ../libdjvu/DjVuPort.h \
   ../libdjvu/GThreads.h ../libdjvu/GURL.h ../libdjvu/DjVuFile.h \
   ../libdjvu/DjVuInfo.h ../libdjvu/GRect.h ../libdjvu/DjVuPalette.h \
   ../libdjvu/GPixmap.h ../libdjvu/GOS.h ../libdjvu/DjVuMessage.h \
   ../libdjvu/DjVuMessageLite.h
-djvumake.o: djvumake.cpp ../config.h ../libdjvu/GString.h ../config.h \
+djvumake.o: djvumake.cpp ../config.h ../libdjvu/GString.h \
   ../libdjvu/DjVuGlobal.h ../libdjvu/GContainer.h ../libdjvu/GException.h \
-  ../libdjvu/GSmartPointer.h ../libdjvu/GException.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h ../libdjvu/GException.h \
   ../libdjvu/DjVuImage.h ../libdjvu/DjVuFile.h ../libdjvu/DjVuInfo.h \
   ../libdjvu/GRect.h ../libdjvu/DjVuPalette.h ../libdjvu/GPixmap.h \
   ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h ../libdjvu/GURL.h \
@@ -92,22 +91,23 @@
   ../libdjvu/IW44Image.h ../libdjvu/GPixmap.h ../libdjvu/GBitmap.h \
   ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h
 djvups.o: djvups.cpp ../config.h ../libdjvu/ddjvuapi.h
-djvused.o: djvused.cpp ../config.h ../libdjvu/IW44Image.h ../config.h \
-  ../libdjvu/GSmartPointer.h ../libdjvu/DjVuGlobal.h ../libdjvu/ZPCodec.h \
-  ../libdjvu/GContainer.h ../libdjvu/GException.h ../libdjvu/GOS.h \
-  ../libdjvu/GString.h ../libdjvu/GString.h ../libdjvu/DjVuDocEditor.h \
-  ../libdjvu/DjVuDocument.h ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h \
-  ../libdjvu/GURL.h ../libdjvu/Arrays.h ../libdjvu/DjVmDoc.h \
-  ../libdjvu/DjVmDir.h ../libdjvu/DjVuDumpHelper.h \
-  ../libdjvu/BSByteStream.h ../libdjvu/ByteStream.h ../libdjvu/DjVuText.h \
-  ../libdjvu/GMapAreas.h ../libdjvu/GRect.h ../libdjvu/DjVuAnno.h \
-  ../libdjvu/DjVuInfo.h ../libdjvu/IFFByteStream.h ../libdjvu/DataPool.h \
-  ../libdjvu/DjVuPort.h ../libdjvu/DjVuFile.h ../libdjvu/DjVuInfo.h \
-  ../libdjvu/DjVuPalette.h ../libdjvu/GPixmap.h ../libdjvu/DjVmNav.h
+djvused.o: djvused.cpp ../config.h ../libdjvu/IW44Image.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/DjVuGlobal.h ../libdjvu/atomic.h \
+  ../libdjvu/ZPCodec.h ../libdjvu/GContainer.h ../libdjvu/GException.h \
+  ../libdjvu/GOS.h ../libdjvu/GString.h ../libdjvu/GString.h \
+  ../libdjvu/DjVuDocEditor.h ../libdjvu/DjVuDocument.h \
+  ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h ../libdjvu/GURL.h \
+  ../libdjvu/Arrays.h ../libdjvu/DjVmDoc.h ../libdjvu/DjVmDir.h \
+  ../libdjvu/DjVuDumpHelper.h ../libdjvu/BSByteStream.h \
+  ../libdjvu/ByteStream.h ../libdjvu/DjVuText.h ../libdjvu/GMapAreas.h \
+  ../libdjvu/GRect.h ../libdjvu/DjVuAnno.h ../libdjvu/DjVuInfo.h \
+  ../libdjvu/IFFByteStream.h ../libdjvu/DataPool.h ../libdjvu/DjVuPort.h \
+  ../libdjvu/DjVuFile.h ../libdjvu/DjVuInfo.h ../libdjvu/DjVuPalette.h \
+  ../libdjvu/GPixmap.h ../libdjvu/DjVmNav.h
 djvuserve.o: djvuserve.cpp ../config.h ../libdjvu/DjVuDocument.h \
-  ../config.h ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h \
-  ../libdjvu/DjVuGlobal.h ../libdjvu/GException.h ../libdjvu/GURL.h \
-  ../libdjvu/GString.h ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h \
+  ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h ../libdjvu/DjVuGlobal.h \
+  ../libdjvu/GException.h ../libdjvu/GURL.h ../libdjvu/GString.h \
+  ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h \
   ../libdjvu/Arrays.h ../libdjvu/DjVmDir.h ../libdjvu/ByteStream.h \
   ../libdjvu/IFFByteStream.h ../libdjvu/ByteStream.h \
   ../libdjvu/DjVuText.h ../libdjvu/GMapAreas.h ../libdjvu/GRect.h \
@@ -115,18 +115,11 @@
   ../libdjvu/DjVuPalette.h ../libdjvu/GPixmap.h ../libdjvu/DjVuAnno.h \
   ../libdjvu/GString.h ../libdjvu/GOS.h ../libdjvu/GURL.h \
   ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h
-djvutxt.o: djvutxt.cpp ../config.h ../libdjvu/DjVuDocument.h ../config.h \
-  ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h ../libdjvu/DjVuGlobal.h \
-  ../libdjvu/GException.h ../libdjvu/GURL.h ../libdjvu/GString.h \
-  ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h ../libdjvu/Arrays.h \
-  ../libdjvu/ByteStream.h ../libdjvu/DjVuText.h ../libdjvu/GMapAreas.h \
-  ../libdjvu/GRect.h ../libdjvu/DjVuImage.h ../libdjvu/DjVuFile.h \
-  ../libdjvu/DjVuInfo.h ../libdjvu/DjVuPalette.h ../libdjvu/GPixmap.h \
-  ../libdjvu/DjVuAnno.h ../libdjvu/GString.h ../libdjvu/GOS.h \
-  ../libdjvu/DjVuMessage.h ../libdjvu/DjVuMessageLite.h
-jb2tune.o: jb2tune.cpp ../config.h ../libdjvu/DjVuGlobal.h ../config.h \
+djvutxt.o: djvutxt.cpp ../config.h ../libdjvu/miniexp.h \
+  ../libdjvu/ddjvuapi.h
+jb2tune.o: jb2tune.cpp ../config.h ../libdjvu/DjVuGlobal.h \
   ../libdjvu/GException.h ../libdjvu/DjVuGlobal.h \
-  ../libdjvu/GSmartPointer.h ../libdjvu/GContainer.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h ../libdjvu/GContainer.h \
   ../libdjvu/GException.h ../libdjvu/GSmartPointer.h ../libdjvu/GRect.h \
   ../libdjvu/GBitmap.h ../libdjvu/JB2Image.h ../libdjvu/GString.h \
   ../libdjvu/GContainer.h ../libdjvu/ZPCodec.h jb2tune.h \
only in patch2:
unchanged:
--- djvulibre-3.5.20.orig/xmltools/Makefile.dep
+++ djvulibre-3.5.20/xmltools/Makefile.dep
@@ -1,7 +1,7 @@
 djvutoxml.o: djvutoxml.cpp ../config.h ../libdjvu/DjVuDocument.h \
-  ../config.h ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h \
-  ../libdjvu/DjVuGlobal.h ../libdjvu/GException.h ../libdjvu/GURL.h \
-  ../libdjvu/GString.h ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h \
+  ../libdjvu/DjVuPort.h ../libdjvu/GThreads.h ../libdjvu/DjVuGlobal.h \
+  ../libdjvu/GException.h ../libdjvu/GURL.h ../libdjvu/GString.h \
+  ../libdjvu/GContainer.h ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h \
   ../libdjvu/Arrays.h ../libdjvu/GOS.h ../libdjvu/DjVuMessage.h \
   ../libdjvu/DjVuMessageLite.h ../libdjvu/ByteStream.h \
   ../libdjvu/DjVuAnno.h ../libdjvu/DjVuText.h ../libdjvu/GMapAreas.h \
@@ -9,8 +9,8 @@
   ../libdjvu/DjVuInfo.h ../libdjvu/DjVuPalette.h ../libdjvu/GPixmap.h \
   ../libdjvu/DjVuAnno.h ../libdjvu/debug.h
 djvuxmlparser.o: djvuxmlparser.cpp ../config.h ../libdjvu/XMLParser.h \
-  ../config.h ../libdjvu/GContainer.h ../libdjvu/GException.h \
-  ../libdjvu/DjVuGlobal.h ../libdjvu/GSmartPointer.h ../libdjvu/GURL.h \
+  ../libdjvu/GContainer.h ../libdjvu/GException.h ../libdjvu/DjVuGlobal.h \
+  ../libdjvu/GSmartPointer.h ../libdjvu/atomic.h ../libdjvu/GURL.h \
   ../libdjvu/GString.h ../libdjvu/Arrays.h ../libdjvu/GThreads.h \
   ../libdjvu/XMLTags.h ../libdjvu/GOS.h ../libdjvu/GURL.h \
   ../libdjvu/DjVuDocument.h ../libdjvu/DjVuPort.h ../libdjvu/ByteStream.h \
only in patch2:
unchanged:
--- djvulibre-3.5.20.orig/libdjvu/ddjvuapi.pc
+++ djvulibre-3.5.20/libdjvu/ddjvuapi.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir = ${exec_prefix}/lib
+includedir = ${prefix}/include
+
+Name: ddjvuapi
+Description: DjVu decoding api.
+Version: 3.5.21
+Requires:
+Conflicts:
+Libs: -L${libdir} -ldjvulibre -ljpeg  -lpthread -lm 
+Cflags: -I${includedir}   -pthread
only in patch2:
unchanged:
--- djvulibre-3.5.20.orig/gui/djview/Makefile.dep
+++ djvulibre-3.5.20/gui/djview/Makefile.dep
@@ -1,161 +1,142 @@
 qx_imager.o: ../../gui/indep/QX/qx_imager.cpp ../../config.h \
   ../../gui/indep/QX/qx_imager.h ../../gui/indep/QT/qt_imager.h \
-  ../../config.h ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../libdjvu/GRect.h ../../config.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GException.h ../../gui/indep/QT/qt_painter.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/utils/col_db.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
   ../../gui/indep/utils/int_types.h \
-  ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h qx_imager_moc.inc \
+  ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/GContainer.h ../../gui/indep/QT/qt_painter.h \
+  ../../libdjvu/debug.h \
+  ../../gui/indep/utils/col_db.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h ../../gui/indep/utils/int_types.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
+  ../../libdjvu/Arrays.h \
+  qx_imager_moc.inc \
   
 qxlib.o: ../../gui/indep/QX/qxlib.cpp ../../config.h \
   ../../gui/indep/QX/qxlib.h \
-  ../../libdjvu/debug.h ../../config.h
+  ../../libdjvu/debug.h
 qt_imager.o: ../../gui/indep/QT/qt_imager.cpp ../../config.h \
   ../../gui/indep/QT/qt_imager.h ../../gui/indep/utils/int_types.h \
-  ../../config.h \
-  ../../libdjvu/debug.h ../../config.h
+  ../../libdjvu/debug.h
 qt_painter.o: ../../gui/indep/QT/qt_painter.cpp ../../config.h \
-  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GPixmap.h ../../config.h \
+  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GException.h ../../libdjvu/GRect.h \
-  ../../gui/indep/QX/qx_imager.h ../../config.h \
-  ../../gui/indep/QT/qt_imager.h ../../gui/indep/utils/int_types.h \
-  ../../config.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GBitmap.h \
+  ../../libdjvu/GException.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GRect.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h
+  ../../gui/indep/QX/qx_imager.h \
+  ../../gui/indep/QT/qt_imager.h ../../gui/indep/utils/int_types.h \
+  
 qlib.o: ../../gui/indep/QT/qlib.cpp ../../config.h \
-  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h ../../config.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
   ../../libdjvu/GContainer.h \
   ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
-  ../../libdjvu/DataPool.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/GString.h ../../libdjvu/GURL.h \
-  ../../libdjvu/Arrays.h \
-  ../../libdjvu/DjVuMessage.h \
-  ../../libdjvu/DjVuMessageLite.h ../../gui/indep/QX/qxlib.h \
-  ../../config.h 
+  ../../gui/indep/utils/int_types.h ../../gui/indep/QT/qt_painter.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/DataPool.h ../../libdjvu/GThreads.h \
+  ../../libdjvu/GString.h ../../libdjvu/GURL.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/DjVuMessage.h ../../libdjvu/DjVuMessageLite.h \
+  ../../gui/indep/QX/qxlib.h 
 col_db.o: ../../gui/indep/utils/col_db.cpp ../../config.h \
   ../../gui/indep/utils/col_db.h ../../libdjvu/GContainer.h \
-  ../../config.h ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GContainer.h ../../gui/indep/utils/int_types.h \
-  ../../libdjvu/GException.h
+  ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
+  ../../gui/indep/utils/int_types.h ../../libdjvu/GException.h
 execdir.o: ../../gui/indep/utils/execdir.cpp ../../config.h \
-  ../../libdjvu/DjVuMessageLite.h ../../config.h ../../libdjvu/GString.h \
+  ../../libdjvu/DjVuMessageLite.h ../../libdjvu/GString.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuMessage.h ../../libdjvu/DjVuMessageLite.h \
-  ../../gui/indep/utils/execdir.h ../../libdjvu/GString.h \
-  ../../libdjvu/GURL.h ../../libdjvu/Arrays.h ../../libdjvu/GThreads.h
+  ../../libdjvu/atomic.h ../../libdjvu/DjVuMessage.h \
+  ../../libdjvu/DjVuMessageLite.h ../../gui/indep/utils/execdir.h \
+  ../../libdjvu/GString.h ../../libdjvu/GURL.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GThreads.h
 cin_data.o: ../../gui/indep/utils/cin_data.cpp ../../config.h \
   ../../gui/indep/utils/cin_data.h ../../libdjvu/ByteStream.h \
-  ../../config.h ../../libdjvu/Arrays.h ../../libdjvu/GException.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/GException.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/BSByteStream.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/ZPCodec.h
+  ../../libdjvu/atomic.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/BSByteStream.h ../../libdjvu/ByteStream.h \
+  ../../libdjvu/ZPCodec.h
 qd_wpaper.o: ../../gui/shared/QT/qd_wpaper.cpp ../../config.h \
   ../../gui/shared/QT/qd_wpaper.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../config.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GException.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
   ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/Arrays.h ../../libdjvu/GString.h \
   ../../libdjvu/GContainer.h \
   ../../libdjvu/debug.h
 qd_prefs.o: ../../gui/shared/QT/qd_prefs.cpp ../../config.h \
-  ../../gui/shared/utils/djvu_file_cache.h ../../config.h \
-  ../../libdjvu/DjVuFileCache.h ../../config.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../gui/shared/utils/djvu_file_cache.h ../../libdjvu/DjVuFileCache.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h \
   ../../gui/shared/QT/qd_prefs.h \
   ../../gui/shared/utils/prefs.h \
-  ../../libdjvu/GString.h ../../gui/indep/QT/qlib.h ../../config.h \
+  ../../libdjvu/GString.h ../../gui/indep/QT/qlib.h \
   ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../libdjvu/debug.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GPixmap.h \
-  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
-  ../../gui/indep/QX/qx_imager.h \
-  ../../config.h ../../gui/indep/QT/qt_imager.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
+  ../../libdjvu/GPixmap.h \
+  ../../libdjvu/debug.h ../../gui/indep/QT/qt_painter.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
+  ../../gui/indep/QX/qx_imager.h ../../gui/indep/QT/qt_imager.h \
+  ../../gui/indep/utils/int_types.h \
   
 qd_welcome.o: ../../gui/shared/QT/qd_welcome.cpp ../../config.h \
   ../../gui/shared/QT/qd_welcome.h ../../gui/indep/QT/qlib.h \
-  ../../config.h ../../libdjvu/GException.h ../../config.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GException.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
   ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
   ../../libdjvu/GContainer.h \
   ../../libdjvu/debug.h \
-  ../../libdjvu/debug.h \
   
 qd_pane.o: ../../gui/shared/QT/qd_pane.cpp ../../config.h \
-  ../../gui/shared/QT/qd_pane.h ../../libdjvu/GRect.h ../../config.h \
+  ../../gui/shared/QT/qd_pane.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h
+  ../../libdjvu/atomic.h \
+  ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h \
+  
 qd_base.o: ../../gui/shared/QT/qd_base.cpp ../../config.h \
-  ../../libdjvu/DjVuGlobal.h ../../config.h ../../gui/shared/QT/qd_base.h \
+  ../../libdjvu/DjVuGlobal.h ../../gui/shared/QT/qd_base.h \
   ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GString.h ../../libdjvu/GBitmap.h \
   ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
   ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
+  ../../gui/shared/utils/prefs.h ../../gui/shared/QT/qd_pane.h \
   ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/debug.h ../../gui/shared/res/djvu_base_res.h \
-  ../../config.h ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../libdjvu/GOS.h \
+  ../../gui/shared/res/djvu_base_res.h ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/Arrays.h \
+  ../../libdjvu/GOS.h \
   ../../gui/indep/utils/cin_data.h ../../libdjvu/ByteStream.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
   ../../gui/shared/QT/qd_tbar_mode_piece.h \
   ../../gui/shared/QT/qd_toolbar.h \
   ../../gui/shared/QT/qd_tbar_rotate_piece.h ../../gui/shared/QT/wait.bm \
@@ -166,109 +147,88 @@
   
 qd_base_paint.o: ../../gui/shared/QT/qd_base_paint.cpp ../../config.h \
   ../../gui/shared/QT/qd_base_paint.h ../../gui/shared/QT/qd_base.h \
-  ../../libdjvu/DjVuImage.h ../../config.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GString.h ../../libdjvu/GBitmap.h \
   ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
   ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
+  ../../gui/shared/utils/prefs.h ../../gui/shared/QT/qd_pane.h \
   ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GOS.h ../../libdjvu/debug.h \
-  ../../gui/indep/QT/qt_imager.h \
-  ../../gui/shared/res/djvu_base_res.h ../../config.h \
+  ../../libdjvu/GOS.h ../../gui/indep/QT/qt_imager.h \
+  ../../gui/shared/res/djvu_base_res.h \
   ../../gui/shared/QT/qd_thr_yielder.h ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QX/qx_imager.h ../../config.h \
-  ../../gui/indep/QT/qt_imager.h ../../libdjvu/GRect.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../gui/indep/QX/qxlib.h
+  ../../libdjvu/Arrays.h \
+  ../../gui/indep/QX/qx_imager.h \
+  ../../gui/indep/QX/qxlib.h
 qd_base_events.o: ../../gui/shared/QT/qd_base_events.cpp ../../config.h \
   ../../gui/shared/QT/qd_base_events.h ../../gui/shared/QT/qd_base.h \
-  ../../libdjvu/DjVuImage.h ../../config.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GString.h ../../libdjvu/GBitmap.h \
   ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
   ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
+  ../../gui/shared/utils/prefs.h ../../gui/shared/QT/qd_pane.h \
   ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/djvu_base_res.h ../../config.h \
-  ../../gui/shared/QT/qd_toolbar.h \
+  ../../gui/shared/res/djvu_base_res.h ../../gui/shared/QT/qd_toolbar.h \
   ../../gui/indep/QT/qt_imager.h \
-  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
-  ../../libdjvu/debug.h
+  ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/Arrays.h \
+  
 qd_base_ant.o: ../../gui/shared/QT/qd_base_ant.cpp ../../config.h \
-  ../../libdjvu/ByteStream.h ../../config.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/ByteStream.h ../../libdjvu/Arrays.h \
   ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GSmartPointer.h ../../gui/shared/QT/qd_base_ant.h \
-  ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
-  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../gui/shared/QT/qd_base_ant.h ../../gui/shared/QT/qd_base.h \
+  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GPixmap.h ../../libdjvu/DjVuPort.h \
   ../../libdjvu/GThreads.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
   ../../libdjvu/DjVuAnno.h ../../gui/shared/utils/GMarginCache.h \
-  ../../config.h ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
-  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
-  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
-  ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/djvu_base_res.h ../../config.h \
-  ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h
+  ../../gui/indep/utils/int_types.h ../../gui/shared/QT/MapAreas.h \
+  ../../libdjvu/GMapAreas.h ../../libdjvu/GString.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/DjVuDocEditor.h \
+  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
+  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
+  ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/utils/prefs.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h \
+  ../../libdjvu/DjVuText.h ../../libdjvu/GMapAreas.h \
+  ../../gui/shared/res/djvu_base_res.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/Arrays.h \
+  
 MapAreas.o: ../../gui/shared/QT/MapAreas.cpp ../../config.h \
-  ../../libdjvu/DjVuGlobal.h ../../config.h \
-  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/DjVuGlobal.h ../../gui/shared/QT/MapAreas.h \
+  ../../libdjvu/GMapAreas.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h \
   ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
   ../../libdjvu/GString.h ../../libdjvu/GRect.h ../../libdjvu/GURL.h \
   ../../libdjvu/Arrays.h ../../libdjvu/GThreads.h \
@@ -280,116 +240,104 @@
   ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuDocEditor.h \
   ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
   ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
-  ../../gui/indep/QT/qt_painter.h ../../config.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GRect.h \
+  ../../gui/indep/QT/qt_painter.h \
   ../../gui/indep/utils/int_types.h \
-  ../../config.h ../../gui/shared/QT/MapDraw.h ../../libdjvu/debug.h \
+  ../../gui/shared/QT/MapDraw.h ../../libdjvu/debug.h \
   ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QX/qxlib.h ../../config.h \
-  ../../gui/indep/QT/qt_imager.h ../../gui/indep/utils/int_types.h \
+  ../../libdjvu/Arrays.h \
+  ../../gui/indep/QX/qxlib.h \
+  ../../gui/indep/QT/qt_imager.h \
   ../../gui/indep/QX/qx_imager.h \
-  ../../gui/indep/QT/qt_imager.h ../../libdjvu/GRect.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
   ../../gui/shared/QT/vertex.bm \
   ../../gui/shared/QT/vertex_mask.bm
 MapBorder.o: ../../gui/shared/QT/MapBorder.cpp ../../config.h \
-  ../../libdjvu/GContainer.h ../../config.h ../../libdjvu/GException.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GException.h \
-  ../../gui/shared/QT/MapBorder.h ../../gui/shared/QT/MapAreas.h \
-  ../../libdjvu/GMapAreas.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GString.h ../../libdjvu/GRect.h ../../libdjvu/GURL.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GThreads.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/atomic.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GException.h ../../gui/shared/QT/MapBorder.h \
+  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
+  ../../libdjvu/GRect.h ../../libdjvu/GURL.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GThreads.h ../../libdjvu/GString.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/DjVuPalette.h \
   ../../libdjvu/GPixmap.h ../../libdjvu/DjVuPort.h \
   ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuDocEditor.h \
   ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
   ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
-  ../../gui/indep/QT/qt_painter.h ../../config.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GRect.h \
+  ../../gui/indep/QT/qt_painter.h \
   ../../gui/indep/utils/int_types.h \
-  ../../config.h ../../libdjvu/debug.h
+  ../../libdjvu/debug.h
 MapDraw.o: ../../gui/shared/QT/MapDraw.cpp ../../config.h \
-  ../../gui/shared/QT/MapDraw.h ../../libdjvu/GPixmap.h ../../config.h \
+  ../../gui/shared/QT/MapDraw.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GMapAreas.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GException.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GURL.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GThreads.h ../../gui/indep/utils/int_types.h \
-  ../../config.h ../../libdjvu/debug.h
+  ../../libdjvu/atomic.h ../../libdjvu/GMapAreas.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
+  ../../libdjvu/GString.h ../../libdjvu/GRect.h ../../libdjvu/GURL.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/GThreads.h \
+  ../../gui/indep/utils/int_types.h ../../libdjvu/debug.h
 qd_painter.o: ../../gui/shared/QT/qd_painter.cpp ../../config.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../config.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GException.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
   ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
   ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
   ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h ../../gui/indep/utils/cin_data.h ../../config.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  
+  ../../gui/indep/utils/cin_data.h ../../libdjvu/ByteStream.h \
+  ../../libdjvu/Arrays.h 
 qd_doc_info.o: ../../gui/shared/QT/qd_doc_info.cpp ../../config.h \
   ../../gui/shared/QT/qd_doc_info.h ../../libdjvu/DjVuDocument.h \
-  ../../config.h ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
   ../../libdjvu/GURL.h ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/Arrays.h \
-  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
-  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/Arrays.h ../../gui/shared/QT/qd_port.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuFile.h \
   ../../gui/shared/QT/qd_messenger.h ../../libdjvu/GThreads.h \
   ../../libdjvu/GContainer.h ../../libdjvu/debug.h ../../libdjvu/GURL.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
-  ../../libdjvu/IFFByteStream.h ../../libdjvu/ByteStream.h \
-  ../../libdjvu/DjVuDumpHelper.h ../../libdjvu/DjVmDir.h \
-  ../../libdjvu/DjVmDir0.h ../../libdjvu/DjVuNavDir.h \
-  ../../libdjvu/DataPool.h \
+  ../../libdjvu/IFFByteStream.h \
+  ../../libdjvu/ByteStream.h ../../libdjvu/DjVuDumpHelper.h \
+  ../../libdjvu/DjVmDir.h ../../libdjvu/DjVmDir0.h \
+  ../../libdjvu/DjVuNavDir.h ../../libdjvu/DataPool.h \
   
 qd_nav_goto_page.o: ../../gui/shared/QT/qd_nav_goto_page.cpp \
-  ../../config.h ../../libdjvu/DjVuDocument.h ../../config.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
-  ../../libdjvu/GURL.h ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../config.h ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/GThreads.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GException.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/atomic.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVmDir.h \
   ../../gui/shared/QT/qd_nav_goto_page.h ../../gui/indep/QT/qlib.h \
-  ../../config.h ../../libdjvu/GException.h ../../libdjvu/GRect.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
   ../../libdjvu/debug.h \
   
 qd_set_zoom.o: ../../gui/shared/QT/qd_set_zoom.cpp ../../config.h \
-  ../../gui/shared/res/djvu_base_res.h ../../config.h \
-  ../../gui/shared/QT/qd_set_zoom.h ../../gui/indep/QT/qlib.h \
-  ../../config.h ../../libdjvu/GException.h ../../config.h \
+  ../../gui/shared/res/djvu_base_res.h ../../gui/shared/QT/qd_set_zoom.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
   ../../libdjvu/GContainer.h \
   ../../libdjvu/debug.h \
   
 qd_port.o: ../../gui/shared/QT/qd_port.cpp ../../config.h \
-  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h ../../config.h \
+  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
   ../../libdjvu/GThreads.h ../../libdjvu/DjVuGlobal.h \
   ../../libdjvu/GException.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
   ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/atomic.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuImage.h \
   ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuAnno.h \
@@ -399,322 +347,275 @@
   
 qd_decoder.o: ../../gui/shared/QT/qd_decoder.cpp ../../config.h \
   ../../gui/shared/QT/qd_decoder.h ../../libdjvu/DjVuDocument.h \
-  ../../config.h ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
   ../../libdjvu/GURL.h ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/Arrays.h \
-  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
-  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/Arrays.h ../../gui/shared/QT/qd_port.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuFile.h \
   ../../gui/shared/QT/qd_messenger.h ../../libdjvu/GThreads.h \
   ../../libdjvu/GContainer.h ../../libdjvu/debug.h ../../libdjvu/GURL.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h
+  
 qd_toolbutt.o: ../../gui/shared/QT/qd_toolbutt.cpp ../../config.h \
-  ../../libdjvu/GPixmap.h ../../config.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../gui/shared/QT/qd_toolbutt.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GException.h \
-  ../../gui/indep/QT/qt_painter.h ../../config.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h \
+  ../../gui/shared/QT/qd_toolbutt.h ../../libdjvu/ByteStream.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/GException.h \
+  ../../gui/indep/QT/qt_painter.h \
   ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GRect.h \
   ../../gui/indep/QX/qx_imager.h \
-  ../../config.h ../../gui/indep/QT/qt_imager.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/debug.h \
+  ../../gui/indep/QT/qt_imager.h ../../gui/indep/utils/int_types.h \
+  ../../libdjvu/debug.h \
   
 qd_doc_saver.o: ../../gui/shared/QT/qd_doc_saver.cpp ../../config.h \
   ../../gui/shared/QT/qd_doc_saver.h ../../libdjvu/DjVuDocument.h \
-  ../../config.h ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
   ../../libdjvu/GURL.h ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_port.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuImage.h \
-  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/DjVmDir.h \
+  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuFile.h \
   ../../gui/shared/QT/qd_messenger.h ../../libdjvu/GThreads.h \
   ../../libdjvu/GContainer.h ../../libdjvu/debug.h ../../libdjvu/GURL.h \
-  ../../gui/indep/QT/qlib.h ../../config.h \
+  ../../gui/indep/QT/qlib.h \
   ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
   ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
-  ../../libdjvu/GOS.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/DataPool.h \
+  ../../libdjvu/GOS.h ../../libdjvu/ByteStream.h ../../libdjvu/DataPool.h \
   qd_doc_saver_moc.inc \
   
 qd_thumb.o: ../../gui/shared/QT/qd_thumb.cpp ../../config.h \
   ../../gui/shared/QT/qd_thumb.h ../../gui/shared/QT/qd_port.h \
-  ../../libdjvu/DjVuPort.h ../../config.h ../../libdjvu/GThreads.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
   ../../libdjvu/GURL.h ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuAnno.h \
   ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuDocument.h \
   ../../gui/shared/QT/qd_messenger.h ../../libdjvu/GThreads.h \
   ../../libdjvu/GContainer.h ../../libdjvu/debug.h ../../libdjvu/GURL.h \
   ../../gui/shared/QT/qd_painter.h \
-  ../../gui/indep/QT/qt_painter.h ../../config.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GRect.h \
-  ../../gui/indep/QX/qx_imager.h \
-  ../../config.h ../../gui/indep/QT/qt_imager.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/Arrays.h \
+  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GRect.h \
+  ../../gui/indep/QX/qx_imager.h ../../gui/indep/QT/qt_imager.h \
+  ../../gui/indep/utils/int_types.h \
+  ../../libdjvu/Arrays.h \
   ../../libdjvu/IW44Image.h ../../libdjvu/ZPCodec.h \
   ../../libdjvu/GScaler.h ../../libdjvu/GBitmap.h \
   ../../libdjvu/ByteStream.h ../../libdjvu/DataPool.h \
   ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
+  ../../libdjvu/GString.h \
   
 qd_search_dialog.o: ../../gui/shared/QT/qd_search_dialog.cpp \
-  ../../config.h ../../libdjvu/DjVuAnno.h ../../config.h \
-  ../../libdjvu/GString.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuFile.h \
+  ../../config.h ../../libdjvu/DjVuAnno.h ../../libdjvu/GString.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/atomic.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/Arrays.h ../../libdjvu/DataPool.h \
   ../../libdjvu/ByteStream.h ../../gui/shared/QT/qd_search_dialog.h \
   ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVuText.h \
-  ../../libdjvu/GMapAreas.h ../../gui/indep/QT/qlib.h ../../config.h \
+  ../../libdjvu/GMapAreas.h ../../gui/indep/QT/qlib.h \
   ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
   ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../libdjvu/debug.h \
+  ../../libdjvu/debug.h \
   
 qd_print_dialog.o: ../../gui/shared/QT/qd_print_dialog.cpp ../../config.h \
   ../../gui/shared/QT/qd_print_dialog.h ../../libdjvu/DjVuImage.h \
-  ../../config.h ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
   ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GRect.h ../../libdjvu/DjVuPalette.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/DjVuPort.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
+  ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
   ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVuToPS.h \
   ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h ../../libdjvu/GRect.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
   ../../libdjvu/debug.h \
-  ../../gui/shared/utils/prefs.h ../../config.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../gui/shared/res/djvu_base_res.h \
-  ../../config.h ../../libdjvu/GOS.h ../../libdjvu/ByteStream.h \
+  ../../gui/shared/utils/prefs.h \
+  ../../gui/shared/res/djvu_base_res.h ../../libdjvu/GOS.h \
+  ../../libdjvu/ByteStream.h \
   
 init_qt.o: ../../gui/shared/QT/init_qt.cpp ../../config.h \
-  ../../libdjvu/debug.h ../../config.h ../../libdjvu/GString.h \
+  ../../libdjvu/debug.h ../../libdjvu/GString.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuMessage.h ../../libdjvu/DjVuMessageLite.h \
-  ../../libdjvu/GString.h ../../libdjvu/GURL.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GThreads.h \
-  ../../gui/indep/QT/qlib.h ../../config.h \
-  ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QX/qx_imager.h ../../config.h \
+  ../../libdjvu/atomic.h ../../libdjvu/DjVuMessage.h \
+  ../../libdjvu/DjVuMessageLite.h ../../libdjvu/GString.h \
+  ../../libdjvu/GURL.h ../../libdjvu/Arrays.h ../../libdjvu/GThreads.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
+  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
+  ../../gui/indep/QX/qx_imager.h \
   ../../gui/indep/QT/qt_imager.h ../../gui/indep/utils/int_types.h \
-  ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../gui/shared/utils/djvu_file_cache.h \
-  ../../config.h ../../libdjvu/DjVuFileCache.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
+  ../../gui/shared/utils/djvu_file_cache.h ../../libdjvu/DjVuFileCache.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GURL.h \
-  ../../gui/indep/utils/execdir.h ../../libdjvu/GString.h \
-  ../../libdjvu/GURL.h ../../gui/shared/QT/init_qt.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h
+  ../../gui/indep/utils/execdir.h ../../gui/shared/QT/init_qt.h \
+  ../../gui/shared/utils/prefs.h
 qd_messenger.o: ../../gui/shared/QT/qd_messenger.cpp ../../config.h \
   ../../gui/shared/QT/qd_messenger.h ../../libdjvu/GThreads.h \
-  ../../config.h ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
   ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/debug.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GThreads.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
+  ../../libdjvu/atomic.h ../../libdjvu/debug.h ../../libdjvu/GURL.h \
+  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/GThreads.h \
+  ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
   
 qd_toolbar.o: ../../gui/shared/QT/qd_toolbar.cpp ../../config.h \
   ../../gui/shared/QT/qd_toolbar.h ../../libdjvu/GContainer.h \
-  ../../config.h ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h \
+  ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h \
   qd_toolbar_moc.inc \
   
 qd_tbar_mode_piece.o: ../../gui/shared/QT/qd_tbar_mode_piece.cpp \
   ../../config.h ../../gui/shared/QT/qd_tbar_mode_piece.h \
   ../../gui/shared/QT/qd_toolbar.h ../../libdjvu/GContainer.h \
-  ../../config.h ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h \
+  ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h \
   ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
   ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GString.h ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/DjVuDocEditor.h \
-  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
-  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
-  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GSmartPointer.h \
+  ../../gui/indep/utils/int_types.h ../../gui/shared/QT/MapAreas.h \
+  ../../libdjvu/GMapAreas.h ../../libdjvu/GBitmap.h \
+  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
+  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
+  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/utils/prefs.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h \
+  ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
   ../../gui/shared/QT/qd_toolbutt.h \
   ../../libdjvu/ByteStream.h \
   ../../gui/shared/res/djvu_base_res.h \
-  ../../config.h ../../gui/indep/utils/cin_data.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GString.h \
+  ../../gui/indep/utils/cin_data.h \
   
 qd_tbar_nav_piece.o: ../../gui/shared/QT/qd_tbar_nav_piece.cpp \
-  ../../config.h ../../libdjvu/DjVuDocument.h ../../config.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GException.h \
-  ../../libdjvu/GURL.h ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_tbar_nav_piece.h \
+  ../../config.h ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/GThreads.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GException.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/atomic.h ../../libdjvu/Arrays.h ../../libdjvu/DjVmDir.h \
+  ../../gui/shared/QT/qd_tbar_nav_piece.h \
   ../../gui/shared/QT/qd_toolbar.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GSmartPointer.h ../../libdjvu/debug.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../gui/shared/QT/qd_base.h \
-  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuAnno.h ../../gui/shared/utils/GMarginCache.h \
-  ../../config.h ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GString.h ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/DjVuDocEditor.h \
-  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
-  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
-  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
+  ../../gui/indep/utils/int_types.h ../../gui/shared/QT/MapAreas.h \
+  ../../libdjvu/GMapAreas.h ../../libdjvu/GBitmap.h \
+  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
+  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
+  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/utils/prefs.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h \
+  ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
   ../../gui/shared/QT/qd_toolbutt.h \
   ../../libdjvu/ByteStream.h \
   ../../gui/shared/res/djvu_base_res.h \
-  ../../config.h ../../gui/indep/utils/cin_data.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GString.h \
+  ../../gui/indep/utils/cin_data.h \
   
 qd_tbar_print_piece.o: ../../gui/shared/QT/qd_tbar_print_piece.cpp \
   ../../config.h ../../gui/shared/QT/qd_tbar_print_piece.h \
   ../../gui/shared/QT/qd_toolbar.h ../../libdjvu/GContainer.h \
-  ../../config.h ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h \
+  ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h \
   ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
   ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GString.h ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/DjVuDocEditor.h \
-  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
-  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
-  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GSmartPointer.h \
+  ../../gui/indep/utils/int_types.h ../../gui/shared/QT/MapAreas.h \
+  ../../libdjvu/GMapAreas.h ../../libdjvu/GBitmap.h \
+  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
+  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
+  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/utils/prefs.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h \
+  ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
   ../../gui/shared/QT/qd_toolbutt.h \
   ../../libdjvu/ByteStream.h \
   ../../gui/shared/res/djvu_base_res.h \
-  ../../config.h ../../gui/indep/utils/cin_data.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GString.h
+  ../../gui/indep/utils/cin_data.h
 qd_tbar_rotate_piece.o: ../../gui/shared/QT/qd_tbar_rotate_piece.cpp \
   ../../config.h ../../gui/shared/QT/qd_tbar_rotate_piece.h \
   ../../gui/shared/QT/qd_toolbar.h ../../libdjvu/GContainer.h \
-  ../../config.h ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/debug.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h \
+  ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/GException.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h \
   ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
   ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GString.h ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/DjVuDocEditor.h \
-  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
-  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
-  ../../gui/indep/QT/qt_painter.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GSmartPointer.h \
+  ../../gui/indep/utils/int_types.h ../../gui/shared/QT/MapAreas.h \
+  ../../libdjvu/GMapAreas.h ../../libdjvu/GBitmap.h \
+  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
+  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
+  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/utils/prefs.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h \
+  ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
   ../../gui/shared/QT/qd_toolbutt.h \
   ../../libdjvu/ByteStream.h \
   ../../gui/shared/res/djvu_base_res.h \
-  ../../config.h ../../gui/indep/utils/cin_data.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GString.h
+  ../../gui/indep/utils/cin_data.h
 qd_page_saver.o: ../../gui/shared/QT/qd_page_saver.cpp ../../config.h \
   ../../gui/shared/QT/qd_page_saver.h ../../libdjvu/DjVuFile.h \
-  ../../config.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
@@ -722,79 +623,76 @@
   ../../libdjvu/DjVmDir.h \
   ../../libdjvu/GOS.h \
   ../../libdjvu/ByteStream.h ../../libdjvu/DataPool.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../libdjvu/debug.h \
+  ../../libdjvu/debug.h \
   qd_page_saver_moc.inc \
   
 qd_thr_yielder.o: ../../gui/shared/QT/qd_thr_yielder.cpp ../../config.h
 GMarginCache.o: ../../gui/shared/utils/GMarginCache.cpp ../../config.h \
   ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
-  ../../config.h ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h
+  ../../libdjvu/atomic.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h
 djvu_file_cache.o: ../../gui/shared/utils/djvu_file_cache.cpp \
   ../../config.h ../../gui/shared/utils/djvu_file_cache.h \
-  ../../libdjvu/DjVuFileCache.h ../../config.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/DjVuFileCache.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h
 io.o: ../../gui/shared/utils/io.cpp ../../config.h \
-  ../../gui/shared/utils/io.h ../../libdjvu/GString.h ../../config.h \
+  ../../gui/shared/utils/io.h ../../libdjvu/GString.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/debug.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/GException.h
+  ../../libdjvu/atomic.h ../../libdjvu/Arrays.h ../../libdjvu/debug.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GThreads.h \
+  ../../libdjvu/GException.h
 prefs.o: ../../gui/shared/utils/prefs.cpp ../../config.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h ../../config.h \
+  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/debug.h ../../gui/shared/res/djvu_base_res.h \
-  ../../config.h
+  ../../libdjvu/atomic.h ../../libdjvu/debug.h \
+  ../../gui/shared/res/djvu_base_res.h
 mime_utils.o: ../../gui/shared/utils/mime_utils.cpp ../../config.h \
-  ../../libdjvu/GContainer.h ../../config.h ../../libdjvu/GException.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
   ../../libdjvu/DjVuGlobal.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h
+  ../../libdjvu/atomic.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/debug.h
 saved_data.o: ../../gui/shared/res/saved_data.cpp ../../config.h \
   ../../gui/shared/res/saved_data.h
 netscape.o: netscape.cpp ../../config.h ../../libdjvu/ZPCodec.h \
-  ../../config.h ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GSmartPointer.h netscape.h \
-  ../../libdjvu/debug.h dispatch.h djvu_viewer.h qd_viewer.h \
-  ../../gui/shared/QT/qd_base.h ../../config.h ../../libdjvu/DjVuImage.h \
-  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/atomic.h netscape.h ../../libdjvu/debug.h dispatch.h \
+  djvu_viewer.h qd_viewer.h ../../gui/shared/QT/qd_base.h \
+  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
-  ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
-  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
-  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
-  ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/saved_data.h ../../config.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../gui/indep/utils/int_types.h ../../gui/shared/QT/MapAreas.h \
+  ../../libdjvu/GMapAreas.h ../../libdjvu/GString.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/DjVuDocEditor.h \
+  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
+  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
+  ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/utils/prefs.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h \
+  ../../libdjvu/DjVuText.h ../../libdjvu/GMapAreas.h \
+  ../../gui/shared/res/saved_data.h \
   ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_port.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_messenger.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/debug.h \
+  ../../gui/shared/QT/qd_messenger.h ../../libdjvu/GThreads.h \
   ../../gui/shared/res/djvu_base_res.h \
   ../../gui/shared/QT/qd_messenger.h ../../gui/shared/utils/io.h \
   ../../libdjvu/Arrays.h \
@@ -802,325 +700,268 @@
   netscape_moc.inc \
   
 dispatch.o: dispatch.cpp ../../config.h ../../libdjvu/DataPool.h \
-  ../../config.h ../../libdjvu/GThreads.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/GThreads.h ../../libdjvu/DjVuGlobal.h \
   ../../libdjvu/GException.h ../../libdjvu/GString.h \
   ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GURL.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuMessage.h \
-  ../../libdjvu/DjVuMessageLite.h ../../libdjvu/ZPCodec.h \
-  ../../gui/shared/utils/io.h ../../config.h ../../libdjvu/GString.h \
-  ../../libdjvu/Arrays.h ../../gui/shared/utils/prefs.h \
-  ../../gui/shared/QT/init_qt.h ../../config.h \
-  ../../gui/shared/res/names.h ../../config.h dispatch.h djvu_viewer.h \
-  qd_viewer.h ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GURL.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/DjVuMessage.h ../../libdjvu/DjVuMessageLite.h \
+  ../../libdjvu/ZPCodec.h ../../gui/shared/utils/io.h \
+  ../../libdjvu/GString.h ../../libdjvu/Arrays.h \
+  ../../gui/shared/utils/prefs.h ../../gui/shared/QT/init_qt.h \
+  ../../gui/shared/res/names.h dispatch.h djvu_viewer.h qd_viewer.h \
+  ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
   ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuAnno.h \
   ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
   ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
   ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
-  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
-  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
-  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h \
-  ../../libdjvu/DjVuText.h ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/saved_data.h ../../libdjvu/DjVuDocument.h \
-  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
-  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuDocument.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/DjVuDocEditor.h \
+  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
+  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
+  ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
+  ../../libdjvu/GMapAreas.h \
+  ../../gui/shared/res/saved_data.h \
+  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_port.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuFile.h \
   ../../gui/shared/QT/qd_messenger.h ../../libdjvu/GThreads.h \
-  ../../libdjvu/debug.h ../../gui/shared/res/djvu_base_res.h \
-  ../../gui/shared/QT/qd_messenger.h \
-  netscape.h ../../libdjvu/debug.h ../../gui/indep/QX/qx_imager.h \
-  ../../config.h ../../gui/indep/QT/qt_imager.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h mime_check.h \
+  ../../gui/shared/res/djvu_base_res.h \
+  ../../gui/shared/QT/qd_messenger.h netscape.h \
+  ../../gui/indep/QX/qx_imager.h ../../gui/indep/QT/qt_imager.h \
+  ../../gui/indep/QT/qlib.h \
+  mime_check.h \
   dispatch_moc.inc \
   
 mime_check.o: mime_check.cpp ../../config.h \
-  ../../gui/shared/utils/prefs.h ../../config.h ../../libdjvu/GString.h \
-  ../../config.h ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h mime_check.h \
-  ../../gui/shared/utils/mime_utils.h ../../libdjvu/GString.h \
+  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/atomic.h mime_check.h ../../gui/shared/utils/mime_utils.h \
   ../../libdjvu/ByteStream.h ../../libdjvu/Arrays.h qd_mime_dialog.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../libdjvu/GURL.h \
-  ../../libdjvu/GString.h ../../libdjvu/GThreads.h \
-  ../../libdjvu/debug.h mime_check_moc.inc \
+  ../../libdjvu/debug.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
+  ../../libdjvu/GThreads.h \
+  mime_check_moc.inc \
   
 qd_viewer.o: qd_viewer.cpp ../../config.h qd_viewer.h \
-  ../../gui/shared/QT/qd_base.h ../../config.h ../../libdjvu/DjVuImage.h \
-  ../../config.h ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
+  ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
   ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GRect.h ../../libdjvu/DjVuPalette.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/DjVuPort.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
+  ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GString.h ../../libdjvu/GBitmap.h \
   ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
   ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
+  ../../gui/shared/utils/prefs.h ../../gui/shared/QT/qd_pane.h \
   ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/saved_data.h ../../config.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_port.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_messenger.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/debug.h \
-  ../../gui/shared/res/djvu_base_res.h \
-  ../../libdjvu/debug.h ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../gui/indep/QX/qxlib.h ../../config.h \
-  ../../gui/indep/QX/qx_imager.h ../../gui/indep/QT/qt_imager.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GBitmap.h ../../libdjvu/GContainer.h \
-  ../../gui/shared/QT/qd_welcome.h ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GURL.h ../../libdjvu/GOS.h \
-  ../../gui/indep/utils/execdir.h ../../libdjvu/GString.h \
-  ../../libdjvu/GURL.h ../../gui/shared/res/names.h \
-  ../../libdjvu/DjVuFileCache.h ../../libdjvu/DjVuMessage.h \
-  ../../libdjvu/DjVuMessageLite.h qd_viewer_prefs.h \
-  ../../gui/shared/QT/qd_prefs.h \
-  ../../gui/shared/QT/qd_print_dialog.h \
-  ../../libdjvu/DjVuToPS.h ../../libdjvu/DjVuText.h \
-  qd_about_dialog.h \
-  ../../gui/shared/QT/qd_doc_saver.h ../../libdjvu/DjVmDir.h \
-  ../../gui/shared/QT/qd_port.h \
-  ../../gui/shared/QT/qd_page_saver.h ../../libdjvu/DjVmDoc.h \
-  ../../gui/shared/QT/qd_search_dialog.h \
+  ../../gui/shared/res/saved_data.h ../../libdjvu/DjVuDocument.h \
+  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/DjVuFile.h ../../gui/shared/QT/qd_messenger.h \
+  ../../libdjvu/GThreads.h ../../gui/shared/res/djvu_base_res.h \
+  ../../gui/indep/QT/qlib.h \
+  ../../libdjvu/Arrays.h \
+  ../../gui/indep/QX/qxlib.h ../../gui/indep/QX/qx_imager.h \
+  ../../gui/indep/QT/qt_imager.h \
+  ../../gui/shared/QT/qd_welcome.h \
+  ../../libdjvu/GOS.h ../../gui/indep/utils/execdir.h \
+  ../../gui/shared/res/names.h ../../libdjvu/DjVuFileCache.h \
+  ../../libdjvu/DjVuMessage.h ../../libdjvu/DjVuMessageLite.h \
+  qd_viewer_prefs.h ../../gui/shared/QT/qd_prefs.h \
+  ../../gui/shared/QT/qd_print_dialog.h ../../libdjvu/DjVuToPS.h \
+  ../../libdjvu/DjVuText.h \
+  qd_about_dialog.h ../../gui/shared/QT/qd_doc_saver.h \
+  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_port.h \
+  ../../gui/shared/QT/qd_page_saver.h \
+  ../../libdjvu/DjVmDoc.h ../../gui/shared/QT/qd_search_dialog.h \
   ../../gui/shared/QT/qd_tbar_nav_piece.h \
-  ../../gui/shared/QT/qd_toolbar.h ../../libdjvu/GSmartPointer.h \
+  ../../gui/shared/QT/qd_toolbar.h \
   ../../gui/shared/QT/qd_tbar_print_piece.h \
   ../../gui/shared/QT/qd_thumb.h \
   
 qd_viewer_shell.o: qd_viewer_shell.cpp ../../config.h \
-  ../../libdjvu/DjVuImage.h ../../config.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
   ../../libdjvu/DjVuMessage.h ../../libdjvu/DjVuMessageLite.h \
   ../../libdjvu/DataPool.h qd_viewer_shell.h \
-  ../../gui/shared/utils/prefs.h ../../config.h ../../libdjvu/GString.h \
-  djvu_viewer.h qd_viewer.h ../../gui/shared/QT/qd_base.h ../../config.h \
-  ../../libdjvu/DjVuImage.h ../../gui/shared/utils/GMarginCache.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h djvu_viewer.h \
+  qd_viewer.h ../../gui/shared/QT/qd_base.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
-  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
-  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/DjVuDocEditor.h \
+  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
+  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
+  ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h \
+  ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/saved_data.h ../../config.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_port.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_messenger.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/debug.h \
-  ../../gui/shared/res/djvu_base_res.h \
-  ../../gui/shared/QT/qd_messenger.h ../../gui/indep/utils/cin_data.h \
-  ../../libdjvu/ByteStream.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GString.h ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
+  ../../gui/shared/res/saved_data.h ../../libdjvu/DjVuDocument.h \
+  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/DjVuFile.h ../../gui/shared/QT/qd_messenger.h \
+  ../../libdjvu/GThreads.h ../../gui/shared/res/djvu_base_res.h \
+  ../../gui/shared/QT/qd_messenger.h \
+  ../../gui/indep/utils/cin_data.h ../../libdjvu/ByteStream.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/Arrays.h \
   ../../gui/shared/res/names.h ../../gui/indep/utils/execdir.h \
-  ../../libdjvu/GURL.h djvu_viewer_res.h ../../gui/shared/QT/qd_wpaper.h \
-  qd_about_dialog.h ../../gui/shared/res/version.h \
+  djvu_viewer_res.h ../../gui/shared/QT/qd_wpaper.h qd_about_dialog.h \
+  ../../gui/shared/res/version.h \
   
 qd_viewer_prefs.o: qd_viewer_prefs.cpp ../../config.h \
-  ../../gui/shared/utils/djvu_file_cache.h ../../config.h \
-  ../../libdjvu/DjVuFileCache.h ../../config.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  ../../gui/shared/utils/djvu_file_cache.h ../../libdjvu/DjVuFileCache.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h qd_viewer_prefs.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
   ../../libdjvu/GRect.h ../../libdjvu/Arrays.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/GString.h \
   ../../libdjvu/debug.h \
-  ../../gui/shared/QT/qd_prefs.h ../../config.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
+  ../../gui/shared/QT/qd_prefs.h \
+  ../../gui/shared/utils/prefs.h \
   
 qd_viewer_menu.o: qd_viewer_menu.cpp ../../config.h qd_viewer_menu.h \
-  qd_viewer.h ../../gui/shared/QT/qd_base.h ../../config.h \
-  ../../libdjvu/DjVuImage.h ../../config.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuInfo.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
+  qd_viewer.h ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GString.h ../../libdjvu/GBitmap.h \
   ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
   ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
+  ../../gui/shared/utils/prefs.h ../../gui/shared/QT/qd_pane.h \
   ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/saved_data.h ../../config.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_port.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_messenger.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/debug.h \
-  ../../gui/shared/res/djvu_base_res.h \
-  ../../libdjvu/debug.h djvu_viewer_res.h \
+  ../../gui/shared/res/saved_data.h ../../libdjvu/DjVuDocument.h \
+  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/DjVuFile.h ../../gui/shared/QT/qd_messenger.h \
+  ../../libdjvu/GThreads.h ../../gui/shared/res/djvu_base_res.h \
+  djvu_viewer_res.h \
   ../../gui/shared/QT/qd_doc_info.h ../../gui/shared/QT/qd_port.h \
   ../../gui/shared/QT/qd_nav_goto_page.h \
-  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/Arrays.h \
   ../../gui/shared/QT/qd_set_zoom.h \
   ../../gui/shared/QT/qd_thumb.h \
-  ../../gui/indep/QT/qlib.h ../../libdjvu/DjVuMessage.h \
+  ../../libdjvu/DjVuMessage.h \
   ../../libdjvu/DjVuMessageLite.h
 djvu_viewer.o: djvu_viewer.cpp ../../config.h djvu_viewer.h qd_viewer.h \
-  ../../gui/shared/QT/qd_base.h ../../config.h ../../libdjvu/DjVuImage.h \
-  ../../config.h ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
+  ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
+  ../../libdjvu/DjVuFile.h ../../libdjvu/DjVuInfo.h \
   ../../libdjvu/GSmartPointer.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GRect.h ../../libdjvu/DjVuPalette.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/DjVuPort.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/GURL.h ../../libdjvu/GString.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
-  ../../gui/shared/utils/GMarginCache.h ../../config.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GException.h ../../libdjvu/debug.h \
-  ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GRect.h \
+  ../../libdjvu/DjVuPalette.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GException.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
+  ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
+  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
+  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
+  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GString.h ../../libdjvu/GBitmap.h \
   ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
   ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
   ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
+  ../../gui/shared/utils/prefs.h ../../gui/shared/QT/qd_pane.h \
   ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/saved_data.h ../../config.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_port.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_messenger.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/debug.h \
-  ../../gui/shared/res/djvu_base_res.h \
-  ../../gui/shared/QT/qd_messenger.h ../../libdjvu/debug.h \
-  ../../libdjvu/GURL.h ../../libdjvu/ByteStream.h \
-  ../../libdjvu/DataPool.h ../../libdjvu/DjVuMessage.h \
-  ../../libdjvu/DjVuMessageLite.h ../../gui/indep/QT/qlib.h \
-  ../../libdjvu/GException.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../gui/shared/utils/djvu_file_cache.h \
+  ../../gui/shared/res/saved_data.h ../../libdjvu/DjVuDocument.h \
+  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/DjVuFile.h ../../gui/shared/QT/qd_messenger.h \
+  ../../libdjvu/GThreads.h ../../gui/shared/res/djvu_base_res.h \
+  ../../gui/shared/QT/qd_messenger.h \
+  ../../libdjvu/ByteStream.h ../../libdjvu/DataPool.h \
+  ../../libdjvu/DjVuMessage.h ../../libdjvu/DjVuMessageLite.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/Arrays.h \
+  ../../gui/shared/utils/djvu_file_cache.h \
   ../../libdjvu/DjVuFileCache.h 
 qd_mime_dialog.o: qd_mime_dialog.cpp ../../config.h qd_mime_dialog.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../config.h ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GException.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h ../../gui/shared/utils/prefs.h ../../config.h \
-  ../../libdjvu/GString.h ../../libdjvu/debug.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h \
+  ../../libdjvu/debug.h \
+  ../../gui/shared/utils/prefs.h \
   
 qd_about_dialog.o: qd_about_dialog.cpp ../../config.h qd_about_dialog.h \
-  ../../gui/indep/QT/qlib.h ../../config.h ../../libdjvu/GException.h \
-  ../../config.h ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GException.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/GString.h ../../libdjvu/GContainer.h \
-  ../../libdjvu/debug.h ../../gui/shared/res/version.h ../../config.h \
-  ../../gui/shared/utils/prefs.h ../../config.h ../../libdjvu/GString.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
+  ../../libdjvu/DjVuGlobal.h ../../libdjvu/GRect.h ../../libdjvu/Arrays.h \
+  ../../libdjvu/GException.h ../../libdjvu/GSmartPointer.h \
+  ../../libdjvu/atomic.h ../../libdjvu/GPixmap.h ../../libdjvu/GString.h \
+  ../../libdjvu/GContainer.h \
   ../../libdjvu/debug.h \
+  ../../gui/shared/res/version.h ../../gui/shared/utils/prefs.h \
   
-main.o: main.cpp ../../config.h ../../libdjvu/DjVuGlobal.h ../../config.h \
+main.o: main.cpp ../../config.h ../../libdjvu/DjVuGlobal.h \
   ../../libdjvu/ZPCodec.h ../../libdjvu/GContainer.h \
   ../../libdjvu/GException.h ../../libdjvu/DjVuGlobal.h \
-  ../../libdjvu/GSmartPointer.h ../../gui/shared/utils/prefs.h \
-  ../../config.h ../../libdjvu/GString.h netscape.h ../../libdjvu/debug.h \
-  ../../libdjvu/GThreads.h ../../gui/shared/QT/init_qt.h ../../config.h \
-  qd_viewer_shell.h ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../gui/shared/utils/prefs.h ../../libdjvu/GString.h netscape.h \
+  ../../libdjvu/debug.h ../../libdjvu/GThreads.h \
+  ../../gui/shared/QT/init_qt.h \
+  qd_viewer_shell.h \
+  ../../libdjvu/DjVuImage.h ../../libdjvu/DjVuFile.h \
   ../../libdjvu/DjVuInfo.h ../../libdjvu/GRect.h \
   ../../libdjvu/DjVuPalette.h ../../libdjvu/GPixmap.h \
   ../../libdjvu/DjVuPort.h ../../libdjvu/GThreads.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/Arrays.h ../../libdjvu/DjVuAnno.h \
   djvu_viewer.h qd_viewer.h \
-  ../../gui/shared/QT/qd_base.h ../../libdjvu/DjVuImage.h \
-  ../../gui/shared/utils/GMarginCache.h ../../libdjvu/GRect.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GSmartPointer.h \
-  ../../libdjvu/GPixmap.h ../../libdjvu/GException.h \
-  ../../libdjvu/debug.h ../../gui/indep/utils/int_types.h ../../config.h \
+  ../../gui/shared/QT/qd_base.h ../../gui/shared/utils/GMarginCache.h \
+  ../../libdjvu/GRect.h ../../libdjvu/GContainer.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/GPixmap.h \
+  ../../libdjvu/GException.h ../../gui/indep/utils/int_types.h \
   ../../gui/shared/QT/MapAreas.h ../../libdjvu/GMapAreas.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GString.h \
-  ../../libdjvu/GRect.h ../../libdjvu/GBitmap.h ../../libdjvu/GPixmap.h \
-  ../../libdjvu/DjVuDocEditor.h ../../libdjvu/DjVuDocument.h \
-  ../../libdjvu/DjVmDoc.h ../../libdjvu/DjVmDir.h \
-  ../../gui/shared/QT/qd_painter.h ../../gui/indep/QT/qt_painter.h \
-  ../../config.h ../../libdjvu/GPixmap.h ../../libdjvu/GBitmap.h \
-  ../../libdjvu/GContainer.h ../../libdjvu/GRect.h \
-  ../../gui/shared/utils/prefs.h \
-  ../../libdjvu/GException.h ../../gui/shared/QT/qd_pane.h \
-  ../../libdjvu/GURL.h ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
+  ../../libdjvu/GBitmap.h ../../libdjvu/DjVuDocEditor.h \
+  ../../libdjvu/DjVuDocument.h ../../libdjvu/DjVmDoc.h \
+  ../../libdjvu/DjVmDir.h ../../gui/shared/QT/qd_painter.h \
+  ../../gui/indep/QT/qt_painter.h \
+  ../../gui/shared/QT/qd_pane.h \
+  ../../libdjvu/GURL.h \
+  ../../libdjvu/DjVuAnno.h ../../libdjvu/DjVuText.h \
   ../../libdjvu/GMapAreas.h \
-  ../../gui/shared/res/saved_data.h ../../config.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_port.h \
-  ../../libdjvu/DjVuPort.h ../../libdjvu/DjVuFile.h \
-  ../../libdjvu/DjVuDocument.h ../../gui/shared/QT/qd_messenger.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/debug.h \
+  ../../gui/shared/res/saved_data.h ../../libdjvu/DjVuDocument.h \
+  ../../gui/shared/QT/qd_port.h ../../libdjvu/DjVuPort.h \
+  ../../libdjvu/DjVuFile.h ../../gui/shared/QT/qd_messenger.h \
   ../../gui/shared/res/djvu_base_res.h \
   ../../gui/shared/QT/qd_messenger.h ../../libdjvu/DjVuMessage.h \
-  ../../libdjvu/DjVuMessageLite.h ../../libdjvu/GURL.h \
+  ../../libdjvu/DjVuMessageLite.h \
   ../../gui/shared/utils/djvu_file_cache.h ../../libdjvu/DjVuFileCache.h \
-  ../../gui/indep/QT/qlib.h ../../libdjvu/GException.h \
-  ../../libdjvu/Arrays.h ../../libdjvu/GString.h \
-  ../../libdjvu/debug.h ../../gui/indep/utils/execdir.h \
-  ../../libdjvu/GString.h ../../libdjvu/GURL.h mime_check.h \
+  ../../gui/indep/QT/qlib.h ../../libdjvu/Arrays.h \
+  ../../gui/indep/utils/execdir.h mime_check.h \
   ../../gui/shared/res/version.h main_moc.inc \
   
only in patch2:
unchanged:
--- djvulibre-3.5.20.orig/gui/bin2cpp/Makefile.dep
+++ djvulibre-3.5.20/gui/bin2cpp/Makefile.dep
@@ -1,7 +1,7 @@
-bin2cpp.o: bin2cpp.cpp ../../config.h ../../libdjvu/GURL.h ../../config.h \
+bin2cpp.o: bin2cpp.cpp ../../config.h ../../libdjvu/GURL.h \
   ../../libdjvu/GString.h ../../libdjvu/DjVuGlobal.h \
   ../../libdjvu/GContainer.h ../../libdjvu/GException.h \
-  ../../libdjvu/GSmartPointer.h ../../libdjvu/Arrays.h \
-  ../../libdjvu/GThreads.h ../../libdjvu/GString.h \
+  ../../libdjvu/GSmartPointer.h ../../libdjvu/atomic.h \
+  ../../libdjvu/Arrays.h ../../libdjvu/GThreads.h ../../libdjvu/GString.h \
   ../../libdjvu/BSByteStream.h ../../libdjvu/ByteStream.h \
   ../../libdjvu/ZPCodec.h
only in patch2:
unchanged:
--- djvulibre-3.5.20.orig/gui/nsdejavu/Makefile.dep
+++ djvulibre-3.5.20/gui/nsdejavu/Makefile.dep
@@ -1,2 +1,5 @@
 nsdejavu.o: nsdejavu.c ../../config.h ../../gui/npsdk/npapi.h \
-  ../../gui/npsdk/jri.h ../../gui/npsdk/npapi.h ../../gui/npsdk/npupp.h
+  ../../gui/npsdk/prtypes.h ../../gui/npsdk/prcpucfg.h \
+  ../../gui/npsdk/obsolete/protypes.h ../../gui/npsdk/npruntime.h \
+  ../../gui/npsdk/nptypes.h ../../gui/npsdk/npupp.h \
+  ../../gui/npsdk/npruntime.h ../../gui/npsdk/jri.h
only in patch2:
unchanged:
--- djvulibre-3.5.20.orig/gui/nsdejavu/nsdejavu.c
+++ djvulibre-3.5.20/gui/nsdejavu/nsdejavu.c
@@ -3,6 +3,7 @@
 //C- DjVuLibre-3.5
 //C- Copyright (c) 2002  Leon Bottou and Yann Le Cun.
 //C- Copyright (c) 2001  AT&T
+//C- Locking fixes (c) 2008 Thomas Viehmann
 //C-
 //C- This software is subject to, and may be distributed under, the
 //C- GNU General Public License, either Version 2 of the license,
@@ -117,6 +118,7 @@
 # undef MAXPATHLEN
 # define MAXPATHLEN 1024
 #endif
+#include <pthread.h>
 
 #define XP_UNIX 1
 #define MOZ_X11 1
@@ -143,6 +145,21 @@
 #endif
 
 
+/* Locking. Note: No function should ever try to acquire the
+ * static_var_mutex while holding the pipe_mutex because some
+ * do it the other way round.
+ *
+ * Also, the locking via pipe_mutex probably should be moved
+ * outside the Read and Write calls to be sure about the protocol.
+ *
+ * Finally, the locking might be overjealous at times, but this
+ * fix dates from shortly before the Debian Lenny release and
+ * we want to be sure.
+ */
+static pthread_mutex_t static_var_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t pipe_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+
 /* ------------------------------------------------------------ */
 /* IO */
 
@@ -200,6 +217,7 @@
     {
       fd_set read_fds;
       struct timeval tv;
+      pthread_mutex_lock(&pipe_mutex);
       FD_ZERO(&read_fds);
       FD_SET(fd, &read_fds);
       if (refresh_pipe>=0 && refresh_cb)
@@ -213,15 +231,22 @@
           res = read(fd, ptr, size);
           if (res<0 && errno==EINTR)
             continue;
-          if (res<0) 
+          if (res<0) {
+            pthread_mutex_unlock(&pipe_mutex);
             return -1;
-          if (res==0) 
+          }
+          if (res==0) {
+            pthread_mutex_unlock(&pipe_mutex);
             return 0;
+          }
           size -= res; 
           ptr += res;
         }
-      if (rc<0 && errno!=EINTR)
+      if (rc<0 && errno!=EINTR) {
+        pthread_mutex_unlock(&pipe_mutex);
         return -1;
+      }
+      pthread_mutex_unlock(&pipe_mutex);
       if (refresh_cb) 
         refresh_cb();
     }
@@ -241,6 +266,7 @@
 #endif
   int res;
 
+  pthread_mutex_lock(&pipe_mutex);
 #if HAVE_SIGACTION
   sigemptyset(&new_mask);
   sigaddset(&new_mask, SIGPIPE);
@@ -269,6 +295,7 @@
 #else
   signal(SIGPIPE, oldhandler);
 #endif
+  pthread_mutex_unlock(&pipe_mutex);
   if (size > 0)
     return -1;
   return 0;
@@ -776,6 +803,7 @@
 {
   int i;
   struct map_entry_s *p;
+  pthread_mutex_lock(&static_var_mutex);
   if (m->buckets) {
     for (i=0; i<m->nbuckets; i++)
       while ((p = m->buckets[i])) {
@@ -787,6 +815,7 @@
   m->buckets = 0;
   m->nbuckets = 0;
   m->nelems = 0;
+  pthread_mutex_unlock(&static_var_mutex);
 }
 
 static void
@@ -820,15 +849,18 @@
 {
   int h;
   struct map_entry_s *q;
+  pthread_mutex_lock(&static_var_mutex);
   if (m->nbuckets) {
     h = hash(key, m->nbuckets);
     for (q=m->buckets[h]; q; q=q->next)
       if (q->key == key) {
         if (pval)
           *(void**)pval = q->val;
+        pthread_mutex_unlock(&static_var_mutex);
         return 1;
       }
   }
+  pthread_mutex_unlock(&static_var_mutex);
   return -1;
 }
 
@@ -837,22 +869,32 @@
 {
   int h;
   struct map_entry_s *q;
+
+  pthread_mutex_lock(&static_var_mutex);
+  
   if (m->nelems * 3 >= m->nbuckets * 2)
     map_reorganize(m);
-  if (! m->nbuckets)
+  if (! m->nbuckets) {
+    pthread_mutex_unlock(&static_var_mutex);
     return -1;
+  }
+  
   h = hash(key, m->nbuckets);
   for (q=m->buckets[h]; q; q=q->next)
     if (q->key == key) {
       q->val = val;
+      pthread_mutex_unlock(&static_var_mutex);
       return 1;
     }
-  if (! (q = malloc(sizeof(struct map_entry_s))))
+  if (! (q = malloc(sizeof(struct map_entry_s)))) {
+    pthread_mutex_unlock(&static_var_mutex);
     return -1;
+  }
   q->next = m->buckets[h];
   q->key = key;
   q->val = val;
   m->buckets[h] = q;
+  pthread_mutex_unlock(&static_var_mutex);
   return 1;
 }
 
@@ -861,6 +903,7 @@
 {
   int h;
   struct map_entry_s **pq;
+  pthread_mutex_lock(&static_var_mutex);
   if (m->nbuckets) {
     h = hash(key, m->nbuckets);
     for (pq=&(m->buckets[h]); *pq; pq=&((*pq)->next))
@@ -868,9 +911,11 @@
         struct map_entry_s *q = *pq;
         (*pq) = q->next;
         free(q);
+        pthread_mutex_unlock(&static_var_mutex);
         return;
       }
   }
+  pthread_mutex_unlock(&static_var_mutex);
 }
   
 
@@ -951,6 +996,7 @@
 static DelayedRequest *
 delayedrequest_append(DelayedRequestList *dlist)
 {
+  pthread_mutex_lock(&static_var_mutex);
   DelayedRequest *ptr = malloc(sizeof(DelayedRequest));
   if (ptr) 
     {
@@ -961,12 +1007,14 @@
         dlist->last->next = ptr;
       dlist->last = ptr;
     }
+  pthread_mutex_unlock(&static_var_mutex);
   return ptr;
 }
 
 static DelayedRequest *
 delayedrequest_pop(DelayedRequestList *dlist)
 {
+  pthread_mutex_lock(&static_var_mutex);
   DelayedRequest *ptr = dlist->first;
   if (ptr)
     {
@@ -975,12 +1023,14 @@
         dlist->last = 0;
       ptr->next = 0;
     }
+  pthread_mutex_unlock(&static_var_mutex);
   return ptr;
 }
 
 static void
 delayedrequest_free(DelayedRequest *ptr)
 {
+  pthread_mutex_lock(&static_var_mutex);
   if (ptr->status)
     free(ptr->status);
   if (ptr->url)
@@ -988,6 +1038,7 @@
   if (ptr->target)
     free(ptr->target);
   free(ptr);
+  pthread_mutex_unlock(&static_var_mutex);
 }
 
 static void
@@ -1040,7 +1091,6 @@
 /* ********************** Group 2 ************************
  * ********* Things, that need to be destroyed ***********
  */
-
 static int			delay_pipe[2];
 static XtInputId		input_id, delay_id;
 static Map                      instance, strinstance;
@@ -1161,7 +1211,9 @@
   char ch;
   DelayedRequest *reqp;
   Instance *inst;
+  pthread_mutex_lock(&pipe_mutex);
   read(delay_pipe[0], &ch, 1);
+  pthread_mutex_unlock(&pipe_mutex);
   while((reqp = delayedrequest_pop(&delayed_requests)))
     {
       switch(reqp->req_num)
@@ -1236,7 +1288,9 @@
             if ( (ReadPointer(rev_pipe,&reqp->id,0,0) <= 0) ||
                  (ReadString(rev_pipe,&reqp->status,0,0) <= 0) ) 
               goto problem;
+            pthread_mutex_lock(&pipe_mutex);
             write(delay_pipe[1], "1", 1);
+            pthread_mutex_unlock(&pipe_mutex);
           }
           break;
         case CMD_GET_URL:
@@ -1249,7 +1303,9 @@
                  (ReadString(rev_pipe,&reqp->url,0,0) <= 0) ||
                  (ReadString(rev_pipe,&reqp->target,0,0) <= 0) )
               goto problem;
+            pthread_mutex_lock(&pipe_mutex);
             write(delay_pipe[1], "1", 1);
+            pthread_mutex_unlock(&pipe_mutex);
           }
           break;
         default:
@@ -1544,6 +1600,7 @@
 CloseConnection(void)
 {
   /* Close all connections to the viewer */
+  pthread_mutex_lock(&pipe_mutex);
   if (input_id) 
     XtRemoveInput(input_id); 
   input_id=0;
@@ -1556,6 +1613,7 @@
   if (rev_pipe>0) 
     close(rev_pipe); 
   rev_pipe=-1;
+  pthread_mutex_unlock(&pipe_mutex);
   /* Update environment */
   SaveStatic();
 }
@@ -1639,12 +1697,14 @@
   XtAddEventHandler(widget, StructureNotifyMask, False, Resize_hnd, id);
   
   app_context = XtWidgetToApplicationContext(widget);
+  pthread_mutex_lock(&pipe_mutex);
   if (! input_id)
     input_id = XtAppAddInput(app_context, rev_pipe,
                              (XtPointer) XtInputReadMask, Input_cb, 0);
   if (!delay_id)
     delay_id = XtAppAddInput(app_context, delay_pipe[0],
                              (XtPointer) XtInputReadMask, Delay_cb, 0);
+  pthread_mutex_unlock(&pipe_mutex);
   
   /* Preparing CMD_ATTACH_WINDOW attributes */
   displ_str = DisplayString(displ);
@@ -1892,7 +1952,9 @@
 NPP_Initialize(void)
 {
   LoadStatic();
+  pthread_mutex_lock(&pipe_mutex);
   pipe(delay_pipe);
+  pthread_mutex_unlock(&pipe_mutex);
   if (!IsConnectionOK(TRUE))
     {
       CloseConnection();
@@ -1905,6 +1967,7 @@
 void
 NPP_Shutdown(void)
 {
+  pthread_mutex_lock(&pipe_mutex);
   if (input_id) 
     XtRemoveInput(input_id); 
   input_id = 0;
@@ -1913,6 +1976,7 @@
   delay_id = 0;
   close(delay_pipe[0]);
   close(delay_pipe[1]);
+  pthread_mutex_unlock(&pipe_mutex);
   map_purge(&instance);
   map_purge(&strinstance);
   delayedrequest_purge(&delayed_requests);
@@ -2054,9 +2118,10 @@
     }
   if (new_window)
     {
-      NPSetWindowCallbackStruct *cbs 
-        = (NPSetWindowCallbackStruct *) win_str->ws_info;
-      Display * displ=cbs->display;
+      Display *displ = 0;
+      if (NPN_GetValue(np_inst, NPNVxDisplay, &displ) != NPERR_NO_ERROR)
+        displ = ((NPSetWindowCallbackStruct *)(win_str->ws_info))->display;
+      
       if (!IsConnectionOK(FALSE)) 
         return NPERR_GENERIC_ERROR;
       if (Attach(displ, new_window, id) < 0)
only in patch2:
unchanged:
--- djvulibre-3.5.20.orig/config/ltmain.sh
+++ djvulibre-3.5.20/config/ltmain.sh
@@ -1,8 +1,8 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun configure.
 #
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008  Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This program is free software; you can redistribute it and/or modify
@@ -43,14 +43,22 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION="1.5.22 Debian 1.5.22-4"
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+VERSION="1.5.26 Debian 1.5.26-4"
+TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
 
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # Check that we have a working $echo.
 if test "X$1" = X--no-reexec; then
@@ -105,11 +113,19 @@
 # These must not be set unconditionally because not all systems understand
 # e.g. LANG=C (notably SCO).
 # We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
+lt_env=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+	  save_$lt_var=\$$lt_var
+	  lt_env=\"$lt_var=\$$lt_var \$lt_env\"
+	  $lt_var=C
+	  export $lt_var
+	fi"
+done
+
+if test -n "$lt_env"; then
+  lt_env="env $lt_env"
 fi
 
 # Make sure IFS has a sensible default
@@ -136,6 +152,8 @@
 preserve_args=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
 
 #####################################
 # Shell function definitions:
@@ -196,7 +214,13 @@
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
       $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
       win32_nmres=`eval $NM -f posix -A $1 | \
-	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+	$SED -n -e '1,100{
+		/ I /{
+			s,.*,import,
+			p
+			q
+			}
+		}'`
       case $win32_nmres in
       import*)  win32_libid_type="x86 archive import";;
       *)        win32_libid_type="x86 archive static";;
@@ -327,7 +351,17 @@
 	*) my_xabs=`pwd`"/$my_xlib" ;;
       esac
       my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
-      my_xdir="$my_gentop/$my_xlib"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  extracted_serial=`expr $extracted_serial + 1`
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
 
       $show "${rm}r $my_xdir"
       $run ${rm}r "$my_xdir"
@@ -454,11 +488,12 @@
     ;;
 
   --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    echo "\
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+
+Copyright (C) 2008  Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     exit $?
     ;;
 
@@ -755,9 +790,11 @@
     *.class) xform=class ;;
     *.cpp) xform=cpp ;;
     *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
+    *.[fF][09]?) xform=[fF][09]. ;;
     *.for) xform=for ;;
     *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    *.sx) xform=sx ;;
     esac
 
     libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -926,7 +963,7 @@
       $run $rm "$lobj" "$output_obj"
 
       $show "$command"
-      if $run eval "$command"; then :
+      if $run eval $lt_env "$command"; then :
       else
 	test -n "$output_obj" && $run $rm $removelist
 	exit $EXIT_FAILURE
@@ -998,7 +1035,7 @@
       command="$command$suppress_output"
       $run $rm "$obj" "$output_obj"
       $show "$command"
-      if $run eval "$command"; then :
+      if $run eval $lt_env "$command"; then :
       else
 	$run $rm $removelist
 	exit $EXIT_FAILURE
@@ -1131,6 +1168,7 @@
     thread_safe=no
     vinfo=
     vinfo_number=no
+    single_module="${wl}-single_module"
 
     func_infer_tag $base_compile
 
@@ -1138,8 +1176,9 @@
     for arg
     do
       case $arg in
-      -all-static | -static)
-	if test "X$arg" = "X-all-static"; then
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
 	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
 	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
 	  fi
@@ -1147,12 +1186,20 @@
 	    dlopen_self=$dlopen_self_static
 	  fi
 	  prefer_static_libs=yes
-	else
+	  ;;
+	-static)
 	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
 	    dlopen_self=$dlopen_self_static
 	  fi
 	  prefer_static_libs=built
-	fi
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
 	build_libtool_libs=no
 	build_old_libs=yes
 	break
@@ -1600,13 +1647,18 @@
 	continue
 	;;
 
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
 	compiler_flags="$compiler_flags $arg"
 	compile_command="$compile_command $arg"
 	finalize_command="$finalize_command $arg"
 	continue
 	;;
 
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
+
       -module)
 	module=yes
 	continue
@@ -1620,10 +1672,11 @@
       # -m* pass through architecture-specific compiler args for GCC
       # -m*, -t[45]*, -txscale* pass through architecture-specific
       # compiler args for GCC
-      # -pg pass through profiling flag for GCC
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
       # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
-      -t[45]*|-txscale*|@*)
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
 
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
@@ -1651,9 +1704,9 @@
 
       -no-install)
 	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
 	  # The PATH hackery in wrapper scripts is required on Windows
-	  # in order for the loader to find any dlls it needs.
+	  # and Darwin in order for the loader to find any dlls it needs.
 	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
 	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
 	  fast_install=no
@@ -1712,7 +1765,7 @@
 	continue
 	;;
 
-      -static)
+      -static | -static-libtool-libs)
 	# The effects of -static are defined in a previous loop.
 	# We used to do the same as -all-static on platforms that
 	# didn't have a PIC flag, but the assumption that the effects
@@ -2097,7 +2150,7 @@
 	lib=
 	found=no
 	case $deplib in
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
 	  if test "$linkmode,$pass" = "prog,link"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
@@ -2112,7 +2165,12 @@
 	    continue
 	  fi
 	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	  if test "$linkmode" = lib; then
+	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+	  else
+	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+	  fi
+	  for searchdir in $searchdirs; do
 	    for search_ext in .la $std_shrext .so .a; do
 	      # Search the libtool library
 	      lib="$searchdir/lib${name}${search_ext}"
@@ -2493,7 +2551,9 @@
 
 	if test "$linkmode,$pass" = "prog,link"; then
 	  if test -n "$library_names" &&
-	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	     { { test "$prefer_static_libs" = no ||
+		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
 	    # We need to hardcode the library path
 	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
 	      # Make sure the rpath contains only unique directories.
@@ -2906,12 +2966,18 @@
 		  # we do not want to link against static libs,
 		  # but need to link against shared
 		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		  if test -n "$deplibrary_names" ; then
 		    for tmp in $deplibrary_names ; do
 		      depdepl=$tmp
 		    done
-		    if test -f "$path/$depdepl" ; then
+		    if test -f "$deplibdir/$depdepl" ; then
+		      depdepl="$deplibdir/$depdepl"
+	      	    elif test -f "$path/$depdepl" ; then
 		      depdepl="$path/$depdepl"
+		    else
+		      # Can't find it, oh well...
+		      depdepl=
 		    fi
 		    # do not add paths which are already there
 		    case " $newlib_search_path " in
@@ -3059,9 +3125,10 @@
 
     case $linkmode in
     oldlib)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
+      esac
 
       if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
 	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
@@ -3189,7 +3256,7 @@
 	  # which has an extra 1 added just for fun
 	  #
 	  case $version_type in
-	  darwin|linux|osf|windows)
+	  darwin|linux|osf|windows|none)
 	    current=`expr $number_major + $number_minor`
 	    age="$number_minor"
 	    revision="$number_revision"
@@ -3200,9 +3267,10 @@
 	    age="0"
 	    ;;
 	  irix|nonstopux)
-	    current=`expr $number_major + $number_minor - 1`
+	    current=`expr $number_major + $number_minor`
 	    age="$number_minor"
 	    revision="$number_minor"
+	    lt_irix_increment=no
 	    ;;
 	  *)
 	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
@@ -3266,7 +3334,8 @@
 	  versuffix="$major.$age.$revision"
 	  # Darwin ld doesn't like 0 for these options...
 	  minor_current=`expr $current + 1`
-	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
 	  ;;
 
 	freebsd-aout)
@@ -3280,8 +3349,11 @@
 	  ;;
 
 	irix | nonstopux)
-	  major=`expr $current - $age + 1`
-
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    major=`expr $current - $age`
+	  else
+	    major=`expr $current - $age + 1`
+	  fi
 	  case $version_type in
 	    nonstopux) verstring_prefix=nonstopux ;;
 	    *)         verstring_prefix=sgi ;;
@@ -3418,11 +3490,11 @@
       fi
 
       # Eliminate all temporary directories.
-      for path in $notinst_path; do
-	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
-      done
+      #for path in $notinst_path; do
+      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+      #done
 
       if test -n "$xrpath"; then
 	# If the user specified any rpath flags, then add them.
@@ -3523,13 +3595,12 @@
 	  int main() { return 0; }
 EOF
 	  $rm conftest
-	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
-	  if test "$?" -eq 0 ; then
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
 	    ldd_output=`ldd conftest`
 	    for i in $deplibs; do
 	      name=`expr $i : '-l\(.*\)'`
 	      # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" -ne "0"; then
+              if test "$name" != "" && test "$name" != "0"; then
 		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		  case " $predeps $postdeps " in
 		  *" $i "*)
@@ -3568,9 +3639,7 @@
 	      # If $name is empty we are operating on a -L argument.
               if test "$name" != "" && test "$name" != "0"; then
 		$rm conftest
-		$LTCC $LTCFLAGS -o conftest conftest.c $i
-		# Did it work?
-		if test "$?" -eq 0 ; then
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
 		  ldd_output=`ldd conftest`
 		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		    case " $predeps $postdeps " in
@@ -3602,7 +3671,7 @@
 		  droppeddeps=yes
 		  $echo
 		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** make it link in!  You will probably need to install it or some"
 		  $echo "*** library that it depends on before this library will be fully"
 		  $echo "*** functional.  Installing it before continuing would be even better."
 		fi
@@ -3888,7 +3957,10 @@
 	     test -n "$hardcode_libdirs"; then
 	    libdir="$hardcode_libdirs"
 	    if test -n "$hardcode_libdir_flag_spec_ld"; then
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	      case $archive_cmds in
+	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+	      esac
 	    else
 	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
 	    fi
@@ -4198,9 +4270,10 @@
       ;;
 
     obj)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
+      esac
 
       if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
 	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
@@ -4247,12 +4320,14 @@
       reload_conv_objs=
       gentop=
       # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
       wl=
 
       if test -n "$convenience"; then
 	if test -n "$whole_archive_flag_spec"; then
-	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
 	else
 	  gentop="$output_objdir/${obj}x"
 	  generated="$generated $gentop"
@@ -4700,16 +4775,16 @@
           case $host in
           *cygwin* | *mingw* )
             if test -f "$output_objdir/${outputname}.def" ; then
-              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
             else
-              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
              fi
             ;;
           * )
-            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
             ;;
           esac
 	  ;;
@@ -4724,13 +4799,13 @@
 	# really was required.
 
 	# Nullify the symbol file.
-	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
       fi
 
       if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
 	# Replace the output file specification.
-	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
 	link_command="$compile_command$compile_rpath"
 
 	# We have no uninstalled library dependencies, so finalize right now.
@@ -4817,7 +4892,7 @@
 	if test "$fast_install" != no; then
 	  link_command="$finalize_var$compile_command$finalize_rpath"
 	  if test "$fast_install" = yes; then
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
 	  else
 	    # fast_install is set to needless
 	    relink_command=
@@ -4854,7 +4929,7 @@
 	  fi
 	done
 	relink_command="(cd `pwd`; $relink_command)"
-	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
       fi
 
       # Quote $echo for shipping.
@@ -5261,6 +5336,20 @@
 Xsed='${SED} -e 1s/^X//'
 sed_quote_subst='$sed_quote_subst'
 
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5403,7 +5492,7 @@
 	  ;;
 	esac
 	$echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      \$echo \"\$0: cannot exec \$program \$*\"
       exit $EXIT_FAILURE
     fi
   else
@@ -5589,7 +5678,7 @@
       done
       # Quote the link command for shipping.
       relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
       if test "$hardcode_automatic" = yes ; then
 	relink_command=
       fi
@@ -5934,9 +6023,9 @@
 
 	  if test -n "$inst_prefix_dir"; then
 	    # Stick the inst_prefix_dir data into the link command.
-	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
 	  else
-	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
 	  fi
 
 	  $echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6145,7 +6234,7 @@
 	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
 	      outputname="$tmpdir/$file"
 	      # Replace the output file specification.
-	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
 
 	      $show "$relink_command"
 	      if $run eval "$relink_command"; then :
@@ -6356,8 +6445,10 @@
 	if test -f "$dir/$objdir/$dlname"; then
 	  dir="$dir/$objdir"
 	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit $EXIT_FAILURE
+	  if test ! -f "$dir/$dlname"; then
+	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
 	fi
 	;;
 
@@ -6421,12 +6512,12 @@
       fi
 
       # Restore saved environment variables
-      if test "${save_LC_ALL+set}" = set; then
-	LC_ALL="$save_LC_ALL"; export LC_ALL
-      fi
-      if test "${save_LANG+set}" = set; then
-	LANG="$save_LANG"; export LANG
-      fi
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+		$lt_var=\$save_$lt_var; export $lt_var
+	      fi"
+      done
 
       # Now prepare to actually exec the command.
       exec_cmd="\$cmd$args"
@@ -6783,9 +6874,9 @@
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
   -export-symbols SYMFILE
-		    try to export only the symbols listed in SYMFILE
+                    try to export only the symbols listed in SYMFILE
   -export-symbols-regex REGEX
-		    try to export only the symbols matching REGEX
+                    try to export only the symbols matching REGEX
   -LLIBDIR          search LIBDIR for required installed libraries
   -lNAME            OUTPUT-FILE requires the installed library libNAME
   -module           build a library that can dlopened
@@ -6799,9 +6890,11 @@
   -release RELEASE  specify package release information
   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of libtool libraries
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
   -version-info CURRENT[:REVISION[:AGE]]
-		    specify library version info [each variable defaults to 0]
+                    specify library version info [each variable defaults to 0]
 
 All other options (arguments beginning with \`-') are ignored.
 

Reply to: