diff --git a/Makefile b/Makefile
index 86cd9b8e012f9a114e901fbb7432663f86693d9e..b985884b7fdb8e402395a4b9769a77a34fcdff24 100644
--- a/Makefile
+++ b/Makefile
@@ -369,6 +369,9 @@ COREDO        = $(BASEDO) $(CONTDO) $(METADO) $(NETDO) $(SYSTEMDO) $(CLIBDO) \
                 $(METAUTILSDO)
 
 CORELIB      := $(LPATH)/libCore.$(SOEXT)
+ifneq ($(BUILTINZLIB),yes)
+CORELIBEXTRA += $(ZLIBCLILIB)
+endif
 
 ##### In case shared libs need to resolve all symbols (e.g.: aix, win32) #####
 
diff --git a/build/package/common/root-doc.control b/build/package/common/root-doc.control
index f4ec427521d859430f449878080fb1cd9c655bb4..bd9fa16272ae0220b88244118477dfd3d612c52e 100644
--- a/build/package/common/root-doc.control
+++ b/build/package/common/root-doc.control
@@ -1,4 +1,5 @@
 Package: root-doc
+Section: doc
 Architecture: all
 Suggests: root-bin
 Description: Tutorial and test suit for the ROOT system
diff --git a/build/package/common/root-plugin-fftw3.control b/build/package/common/root-plugin-fftw3.control
new file mode 100644
index 0000000000000000000000000000000000000000..1e27c13162af33d613fd2fd5ddd781196f55fe4a
--- /dev/null
+++ b/build/package/common/root-plugin-fftw3.control
@@ -0,0 +1,10 @@
+Package: root-plugin-fftw3
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: FFTw plugin for ROOT
+ This package contains the Fast Fourier Transform extension for ROOT.
+ It uses the very fast fftw (version 3) library.
+ .
+ ROOT web-site: http://root.cern.ch
+ FFTW web-site: http://fftw.org/
+
diff --git a/build/package/common/root-plugin-maxdb.control b/build/package/common/root-plugin-maxdb.control
index fbcdbcc3d4c895f87cd909a833a470aec2c6ebcd..228930db98f06e33ae15b250c9155bd11fb1aa52 100644
--- a/build/package/common/root-plugin-maxdb.control
+++ b/build/package/common/root-plugin-maxdb.control
@@ -1,5 +1,5 @@
 Package: root-plugin-maxdb
-Architecture: i386 ia64
+Architecture: i386 ia64 amd64
 Depends: ${shlibs:Depends}
 Provides: root-db-client
 Replaces: root-plugin-sapdb
diff --git a/build/package/debian/README.Debian b/build/package/debian/README.Debian
index a5ffd92c52eb209fa581b7e59ef41802a4815259..055e0055a3aed263eb3a210cb02a98ea57fa96ea 100644
--- a/build/package/debian/README.Debian
+++ b/build/package/debian/README.Debian
@@ -110,24 +110,6 @@ GNU/Linux and Redhat distributions.
 [1] deb http://mirror.phy.bnl.gov/debian-root root main
 [2] http://root.cern.ch
 
-Parallel ROOT Facility Daemon:
-==============================
-Per default, the PROOF daemon (proofd) is turned off.   This is
-because the user need to set up a few things before starting the
-daemon.   Specifically, the user need to make the files
-`<proofd_dir>/etc/cluster.conf' and `<proofd_dir>/etc/proofd.conf'.
-Examples for these are provided in the documentation directory of
-`root-proofd' (`/usr/share/doc/root-proofd/examples/').
-`<proofd_dir>' can be set to any location in
-`/etc/default/root-proofd'.  Note, however, that ROOT recommends that
-this directory is shared (via NFS or similar) among all the nodes of
-the cluster.   To enable `root-proofd' set `ENABLE_PROOFD=yes' in
-`/etc/default/root-proofd'.    See also the `read me' file  
-`/usr/share/doc/root-doc/README.PROOF' in the `root-doc' package, as
-well as the web-site [1].
-
-[1] http://root.cern.ch/root/PROOF.html
-
 Original Sources:
 =================
 The packaging scripts for both Debian GNU/Linux and Redhat - those
diff --git a/build/package/debian/changelog b/build/package/debian/changelog
index 5b3b6236d3d73a585a5172a6a2a47bd0b8b9eba8..d020886d4e2ce7dda519f57284555ec0b94cba3a 100644
--- a/build/package/debian/changelog
+++ b/build/package/debian/changelog
@@ -1,3 +1,13 @@
+root (5.11.01-6) unstable; urgency=low
+
+  * Package libroot-fftw made a plugin by Fons.  Now it's called
+    root-plugin-fftw.
+  * Small fixes from Kevin.
+  * Default ZipMode is now 1 (checked in debian/rules).
+  * Implemented a configure switch to use system Zlib.
+
+ -- Christian Holm Christensen <cholm@nbi.dk>  Wed, 12 Apr 2006 15:39:11 +0200
+
 root (5.11.01-5) unstable; urgency=low
 
   * Added new package libroot-fftw, and libroot-fftw-dev.   Extension 
diff --git a/build/package/debian/control.in b/build/package/debian/control.in
index 8448da6e7075708217efd6be0b2eac4822d51868..9b6c0c76e634eda5775c553fecb570fa169bfdab 100644
--- a/build/package/debian/control.in
+++ b/build/package/debian/control.in
@@ -2,7 +2,7 @@ Source: root
 Section: science
 Priority: optional
 Maintainer: Christian Holm Christensen <cholm@nbi.dk>
-Build-Depends: debhelper (>= 4.1.16), libssl-dev, comerr-dev, libxpm-dev, libfreetype6-dev, libpcre3-dev@builddepends@
+Build-Depends: debhelper (>= 4.1.16), libssl-dev, comerr-dev, libxpm-dev, libfreetype6-dev, libpcre3-dev, zlib1g-dev | libz-dev@builddepends@
 Standards-Version: 3.6.2
 
 Package: root
diff --git a/build/package/debian/copyright b/build/package/debian/copyright
index 7d3d1d35377bc60c08c256982691d35d6a2de7d3..c252166265da655c78f11c7d22ec53b6ba80b0b3 100644
--- a/build/package/debian/copyright
+++ b/build/package/debian/copyright
@@ -4,7 +4,7 @@ Mon, 21 Feb 2005 16:28:37 +0100.
 It was downloaded from :pserver:cvs@root.cern.ch:/user/cvs
 (anonymous CVS access to main repository - password is "cvs")
 
-Upstream Authors: The ROOT Team consiting of Rene Brun
+Upstream Authors: The ROOT Team consisting of Rene Brun
 <Rene.Brun@cern.ch> and Fons Rademakers <Fons.Rademakers@cern.ch>
 
 License:
@@ -35,3 +35,6 @@ License, version 2.1, can be found in
 Note, that the sources and the packages have been purged of the
 non-free MS TTF Core fonts. 
 
+Local Variables:
+  mode: text
+End:
diff --git a/build/package/debian/libroot.overrides b/build/package/debian/libroot.overrides
deleted file mode 100644
index d6cdf97d67acf683bd4cc08f83cf3079e930be6c..0000000000000000000000000000000000000000
--- a/build/package/debian/libroot.overrides
+++ /dev/null
@@ -1,3 +0,0 @@
-libroot5.09: postinst-has-useless-call-to-ldconfig
-libroot5.09: postrm-has-useless-call-to-ldconfig
-
diff --git a/build/package/debian/libroot.overrides.in b/build/package/debian/libroot.overrides.in
new file mode 100644
index 0000000000000000000000000000000000000000..0beef1a0e06fa553923f670af3c2a4fb6e02acff
--- /dev/null
+++ b/build/package/debian/libroot.overrides.in
@@ -0,0 +1,3 @@
+libroot@libvers@: postinst-has-useless-call-to-ldconfig
+libroot@libvers@: postrm-has-useless-call-to-ldconfig
+
diff --git a/build/package/debian/libroot.postinst b/build/package/debian/libroot.postinst
new file mode 100644
index 0000000000000000000000000000000000000000..9bda5e50d38e88eb8f80043614dc85e15aad73d0
--- /dev/null
+++ b/build/package/debian/libroot.postinst
@@ -0,0 +1,5 @@
+#!/bin/sh
+if [ "$1" = "configure" ]; then
+	ldconfig
+fi
+
diff --git a/build/package/debian/libroot.postrm b/build/package/debian/libroot.postrm
new file mode 100644
index 0000000000000000000000000000000000000000..9760c6608da51ede92e881e91562f37ff2bad567
--- /dev/null
+++ b/build/package/debian/libroot.postrm
@@ -0,0 +1,4 @@
+#!/bin/sh
+if [ "$1" = "remove" ]; then
+	ldconfig
+fi
diff --git a/build/package/debian/root-bin.menu.in b/build/package/debian/root-bin.menu.in
index 53441b78418da13d4025621765e34897c78d7c8c..d208692bf55d7c58153d358529c5ccc799b71cf9 100644
--- a/build/package/debian/root-bin.menu.in
+++ b/build/package/debian/root-bin.menu.in
@@ -1,4 +1,5 @@
-?package(root-bin):needs="text" section="Apps/Science" \
+?package(root-bin):needs="text" \
+  section="Apps/Science" \
   title="ROOT" \
-  longtitle="ROOT'a Object Oriented Technologies" \
-  command="@prefix@/bin/root"
+  longtitle="ROOT's Object Oriented Technologies" \
+  command="@prefix@/bin/root" 
diff --git a/build/package/debian/root-common.dirs b/build/package/debian/root-common.dirs
new file mode 100644
index 0000000000000000000000000000000000000000..b4c4e2d8cc9a0959a455e946281aa602ae922355
--- /dev/null
+++ b/build/package/debian/root-common.dirs
@@ -0,0 +1 @@
+usr/lib/root
diff --git a/build/package/debian/libroot.postinst.in b/build/package/debian/root-common.postinst.in
similarity index 98%
rename from build/package/debian/libroot.postinst.in
rename to build/package/debian/root-common.postinst.in
index 69fbb9495d5240d7edf19efdd5dbbbd34e5c7aa3..9032bea145d817d01433f261aeff7b2c85365552 100644
--- a/build/package/debian/libroot.postinst.in
+++ b/build/package/debian/root-common.postinst.in
@@ -12,8 +12,6 @@ case "$1" in
 	if ! grep -qs ^@prefix@/lib/root\$ /etc/ld.so.conf ; then
                 echo @prefix@/lib/root >> /etc/ld.so.conf
 	fi
-	ldconfig 
-
 	;;
     abort-upgrade|abort-remove|abort-deconfigure)
 	# Nothing to be done here
diff --git a/build/package/debian/libroot.postrm.in b/build/package/debian/root-common.postrm.in
similarity index 98%
rename from build/package/debian/libroot.postrm.in
rename to build/package/debian/root-common.postrm.in
index 78a7168fe578dff9f96474037dc83e0563c977c3..db551bb200b77d9bac1c066dbc3387cf9aea56c3 100644
--- a/build/package/debian/libroot.postrm.in
+++ b/build/package/debian/root-common.postrm.in
@@ -17,7 +17,6 @@ case "$1" in
 		> /etc/ld.so.conf.root-tmp
             mv /etc/ld.so.conf.root-tmp /etc/ld.so.conf
 	fi
-	ldconfig 
         ;;
     upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 	# Nothing to be done here
diff --git a/build/package/debian/root-proofd.README.Debian b/build/package/debian/root-proofd.README.Debian
new file mode 100644
index 0000000000000000000000000000000000000000..bd6ab1a86ff80bb1763a1e76ae1a5a96378e15a2
--- /dev/null
+++ b/build/package/debian/root-proofd.README.Debian
@@ -0,0 +1,18 @@
+Parallel ROOT Facility Daemon:
+==============================
+Per default, the PROOF daemon (proofd) is turned off.   This is
+because the user need to set up a few things before starting the
+daemon.   Specifically, the user need to make the files
+`<proofd_dir>/etc/cluster.conf' and `<proofd_dir>/etc/proofd.conf'.
+Examples for these are provided in the documentation directory of
+`root-proofd' (`/usr/share/doc/root-proofd/examples/').
+`<proofd_dir>' can be set to any location in
+`/etc/default/root-proofd'.  Note, however, that ROOT recommends that
+this directory is shared (via NFS or similar) among all the nodes of
+the cluster.   To enable `root-proofd' set `ENABLE_PROOFD=yes' in
+`/etc/default/root-proofd'.    See also the `read me' file  
+`/usr/share/doc/root-doc/README.PROOF' in the `root-doc' package, as
+well as the web-site [1].
+
+[1] http://root.cern.ch/root/PROOF.html
+
diff --git a/build/package/debian/rules b/build/package/debian/rules
index c1f02c5f975f9fb0dc78cfc67b3c59d260efc547..f670ff6162e99d9e0584b042708f93efbcb7c697 100644
--- a/build/package/debian/rules
+++ b/build/package/debian/rules
@@ -49,6 +49,7 @@ CONFOPTIONS	:=--enable-table				\
 		  --enable-roofit				\
 		  --enable-ruby					\
 		  --enable-qt					\
+		  --enable-qtgsi				\
 		  --enable-mathcore				\
 		  --enable-mathmore				\
 		  --enable-minuit2				\
@@ -63,6 +64,7 @@ CONFOPTIONS	:=--enable-table				\
 		  --disable-builtin-afterimage			\
 		  --disable-builtin-pcre			\
 		  --disable-builtin-gsl				\
+		  --disable-builtin-zlib			\
 		  --disable-alien				\
 		  --disable-rfio				\
 		  --disable-chirp				\
@@ -100,7 +102,7 @@ PLUGINS		:= root-plugin-asimage 		\
 		   root-plugin-hbook 		\
 		   root-plugin-krb5 		\
 		   libroot-ldap 		\
-		   libroot-fftw 		\
+		   root-plugin-fftw3 		\
 		   root-plugin-minuit2 		\
 		   root-plugin-gl 		\
 		   root-plugin-qt 		\
@@ -183,7 +185,7 @@ debian/%:debian/%.in
 		-e 's,@pythondir@,$(PYTHONDIR),g' \
 		-e 's,@libvers@,$(SOVERS),g' < $< > $@ 
 
-debian/control:debian/control.in
+debian/control:debian/control.in 
 	@echo "Making $@ (special)"
 	@cp $< $@.tmp
 	@for p in $(PKGLIST) ; do \
@@ -280,7 +282,7 @@ pkglists:
 	@for i in debian/libroot* ; do \
 	  if test -d $$i ; then continue ; fi ; \
 	  case $$i in \
-          *-dev.*|*.in|libroot*$(SOVERS).*|*.overrides) continue ;; \
+          *-dev.*|*.in|libroot*$(SOVERS).*) continue ;; \
 	  *) echo "Renaming $$i to version specific" ; \
 	     cp $$i `echo $$i | sed 's/libroot\(.*\)\.\(.*\)/libroot\1$(SOVERS).\2/'` ;; esac ; \
 	done 
@@ -301,6 +303,9 @@ install-indep:
 	# Fix some permissions 
 	-find debian/root-common/$(PREFIX)/share/root/icons \
 		-perm 0755 -and -not -type d | xargs chmod a-x 
+	mkdir -p debian/root-doc/usr/share/lintian/overrides/
+	cp debian/root-doc.overrides \
+	  debian/root-doc/usr/share/lintian/overrides/root-doc
 
 install-arch: 
 	dh_testroot
@@ -317,6 +322,11 @@ install-arch:
 		< $(DTMP)/$(PREFIX)/bin/root-config > root-config.tmp 
 	mv root-config.tmp $(DTMP)/$(PREFIX)/bin/root-config
 
+	# Make default ZIP mode be new library (system library)
+	sed 's,Root\.ZipMode:.*,Root.ZipMode: 1,' \
+		< $(DTMP)/etc/root/system.rootrc  > rootrc.tmp 
+	mv rootrc.tmp $(DTMP)/etc/root/system.rootrc
+
 	# Rename proofserv, xrdgsiproxy, and xrdpwdadmin in /usr/bin 
 	# to end in `.bin' and make wrapper script in /usr/bin 
 	for i in proofserv xrdgsiproxy xrdpwdadmin ; do 		\
@@ -381,9 +391,7 @@ install-arch:
 	  if test ! -f $$i ; then continue; fi;	\
 	  b=`basename $$i .overrides` ;		\
 	  case $$b in 				\
-		*-dev)  		;; 	\
-		lib*)  b=$${b}$(SOVERS) ;;	\
-		*)      		;; 	\
+	  	libroot)  continue	;;	\
 	  esac ; 				\
 	  echo "Installing Lintian override $$i in /usr/share/lintian/overrides/$$b" ; \
 	  mkdir -p debian/$$b/usr/share/lintian/overrides/ ; \
diff --git a/build/package/lib/makebuilddepend.sh b/build/package/lib/makebuilddepend.sh
index 90b599844d5e1438474955afd9d3ae1bb568a1d9..ec19fa889bae0de6af0f3cbff140502054bef777 100755
--- a/build/package/lib/makebuilddepend.sh
+++ b/build/package/lib/makebuilddepend.sh
@@ -21,6 +21,7 @@ if test "x$1" = "xrpm" ; then
 	    *clarens)							;;
 	    *dcache)							;;
 	    *fumili)							;;
+	    *fftw3)							;;
 	    *gl)							;;
 	    *globus)	echo "BuildRequires: globus"			;;
 	    *hbook)	echo "BuildRequires: gcc-g77"			;;
@@ -110,9 +111,9 @@ for i in $* ; do
 	*chirp)		echo -n ", libchirp-dev"			;;
 	*clarens)	echo -n ", libxmlrpc-c3-dev | libxmlrpc-c-dev"	;;
 	*dcache)	echo -n ", libdcap-dev"				;;
-	*fftw)		echo -n ", fftw3-dev"				;;
+	*fftw3)		echo -n ", fftw3-dev"				;;
 	*fumili)							;;
-	*gl)		echo -n ", libglu1-xorg-dev | xlibmesa-glu-dev |  libglu-dev"	;;
+	*gl)		echo -n ", libglu1-mesa-dev | libglu1-xorg-dev | xlibmesa-glu-dev |  libglu-dev"	;;
 	*globus)	echo -n ", globus"				;;
 	*hbook)		echo -n ", libpacklib1-dev [!kfreebsd-i386], g77|fortran-compiler" ;;
 	*krb5)		echo -n ", libkrb5-dev|heimdal-dev"		;;
@@ -134,7 +135,7 @@ for i in $* ; do
 	*quadp)								;;
 	*roofit)							;;
 	*ruby)		echo -n ", ruby (>= 1.8), ruby1.8-dev | ruby-dev (>= 1.8)"	;;
-	*maxdb)		echo -n ", libsqlod75-dev [i386 ia64]"		;;
+	*maxdb)		echo -n ", libsqlod75-dev [i386 ia64 amd64]"	;;
 	*sql)								;;
 	*srp)		echo -n ", libsrputil-dev"			;;
 	*venus)		echo -n ", libvenus-dev"			;;
diff --git a/build/package/lib/makelists.sh b/build/package/lib/makelists.sh
index 33aca0c2fd6dd5dad603f4384b3a014668bcd399..52ad131506163db345b6e7ed46ba1952fc928cfd 100755
--- a/build/package/lib/makelists.sh
+++ b/build/package/lib/makelists.sh
@@ -64,6 +64,8 @@ for d in * ; do
 	build|freetype|win*|main) continue ;; 			
 	proofx)     lib=root-plugin-xproof  ; dev=$lib       ; bin=$lib ;;  
 	sapdb)      lib=root-plugin-maxdb   ; dev=$lib       ; bin=$lib ;;  
+	qtgsi)      lib=root-plugin-qt      ; dev=$lib       ; bin=$lib ;;  
+	fftw)       lib=root-plugin-${d}3   ; dev=$lib       ; bin=$lib ;;  
 	*)          lib=root-plugin-$d      ; dev=$lib       ; bin=$lib ;;  
     esac 
 
diff --git a/config/Makefile.in b/config/Makefile.in
index 0d7004b495e1b890eac182eb6ad7a23e5aa7e970..83f56e5c8ac0dead6c32d816b7797eae7475740b 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -49,6 +49,11 @@ BUILTINFREETYPE:= @builtinfreetype@
 
 BUILTINPCRE    := @builtinpcre@
 
+BUILTINZLIB    := @builtinzlib@
+ZLIBLIBDIR     := @zliblibdir@
+ZLIBCLILIB     := @zliblib@
+ZLIBINCDIR     := $(filter-out /usr/include, @zlibincdir@)
+
 BUILDGL        := @buildgl@
 OPENGLLIBDIR   := @opengllibdir@
 OPENGLULIB     := @openglulib@
diff --git a/configure b/configure
index a2090b96a85eb625c9858d31b409288a096f4f42..3b2747d883ae66582df0e699c5ff0a9fb484e8d9 100755
--- a/configure
+++ b/configure
@@ -31,6 +31,7 @@ options="                    \
    enable_builtin_freetype   \
    enable_builtin_pcre       \
    enable_builtin_gsl        \
+   enable_builtin_zlib       \
    enable_cern               \
    enable_chirp              \
    enable_cintex             \
@@ -804,6 +805,7 @@ enable/disable options, prefix with either --enable- or --disable-
   builtin-freetype   Built included libfreetype, or use system libfreetype
   builtin-pcre       Built included libpcre, or use system libpcre
   builtin-gsl        Built included libgsl, or use system libgsl
+  builtin-zlib       Built included libz, or use system libz
   cern               CERNLIB usage, build h2root and g2root
   chirp              Chirp support (Condor remote I/O), requires libchirp_client
   cintex             Build the libCintex Reflex interface library
@@ -1368,6 +1370,41 @@ fi
 message "Checking whether to build included libpcre"
 result "$enable_builtin_pcre"
 
+######################################################################
+#
+### echo %%% Use included ZLib or use systems
+#
+if test "x$enable_builtin_zlib" = "xno" ; then
+    check_header "zlib.h" "/usr/include"  $ZLIB $ZLIB/include \
+	/usr/local/include /usr/include/zlib /usr/local/include/zlib \
+	/opt/zlib/include
+    if test "x$found_dir" = "x" ; then
+	enable_builtin_zlib=yes
+    else
+        zlibinc=$found_hdr
+        zlibincdir=$found_dir
+    fi
+
+    check_library "libz" "$enable_shared" "" "/usr/lib" \
+	$ZLIB $ZLIB/lib /usr/local/zlib/lib /usr/local/lib \
+            /usr/lib/zlib /usr/local/lib/zlib /usr/zlib/lib /usr/lib \
+            /usr/zlib /usr/local/zlilb /opt/zlib /opt/zlib/lib
+    if test "x$found_lib" = "x" ; then
+	zliblib=""
+	zliblibdir=""
+	enable_builtin_zlib="yes"
+    else
+	zliblib="$found_lib"
+	zliblibdir="$found_dir"
+    fi
+
+    if test "x$zlibincdir" = "x" || test "x$zliblib" = "x"; then
+        enable_builtin_zlib="yes"
+    fi
+fi
+message "Checking whether to build included zlib"
+result "$enable_builtin_zlib"
+
 ######################################################################
 #
 ### echo %%% OpenGL Support - Third party libraries
@@ -3393,7 +3430,6 @@ if test "x$show_pkglist" = "xyes" ; then
     test "x$enable_pythia6" = "xyes" && pkglist="$pkglist root-plugin-pythia6"
     test "x$enable_python"  = "xyes" && pkglist="$pkglist libroot-python"
     test "x$enable_qt"      = "xyes" && pkglist="$pkglist root-plugin-qt"
-    test "x$enable_qtgsi"   = "xyes" && pkglist="$pkglist root-plugin-qtgsi"
     test "x$enable_roofit"  = "xyes" && pkglist="$pkglist libroot-roofit"
     test "x$enable_ruby"    = "xyes" && pkglist="$pkglist libroot-ruby"
     test "x$enable_rfio"    = "xyes" && pkglist="$pkglist root-plugin-castor"
@@ -3654,8 +3690,12 @@ sed -e "s|@aclocaldir@|$aclocaldir|"            \
     -e "s|@buildmathcore@|$enable_mathcore|"    \
     -e "s|@buildmathmore@|$enable_mathmore|"    \
     -e "s|@builtingsl@|$enable_builtin_gsl|"    \
-    -e "s|@gslflags@|$gslflags|"    		\
-    -e "s|@gsllibs@|$gsllibs|"    		\
+    -e "s|@gslflags@|$gslflags|"                \
+    -e "s|@gsllibs@|$gsllibs|"                  \
+    -e "s|@builtinzlib@|$enable_builtin_zlib|"  \
+    -e "s|@zlibincdir@|$zlibincdir|"            \
+    -e "s|@zliblib@|$zliblib|"                  \
+    -e "s|@zliblibdir@|$zliblibdir|"            \
     -e "s|@buildcintex@|$enable_cintex|"        \
     -e "s|@buildreflex@|$enable_reflex|"        \
     -e "s|@buildroofit@|$enable_roofit|"        \
diff --git a/qtgsi/src/.cvsignore b/qtgsi/src/.cvsignore
new file mode 100644
index 0000000000000000000000000000000000000000..27a652ceed742030568506868ea976a26bf6c43e
--- /dev/null
+++ b/qtgsi/src/.cvsignore
@@ -0,0 +1 @@
+moc_*
diff --git a/zip/Module.mk b/zip/Module.mk
index 8ba45f955d78af9554a2f0a4824bbc18cccb5feb..ff940d7d63381f7fa44699f013968d41b801ebd6 100644
--- a/zip/Module.mk
+++ b/zip/Module.mk
@@ -12,10 +12,43 @@ ZIPDIRS      := $(ZIPDIR)/src
 ZIPDIRI      := $(ZIPDIR)/inc
 
 ##### libZip (part of libCore) #####
-ZIPH         := $(wildcard $(MODDIRI)/*.h)
-ZIPS         := $(wildcard $(MODDIRS)/*.c)
+ZIPOLDH      := $(MODDIRI)/Bits.h 	\
+		$(MODDIRI)/Tailor.h 	\
+		$(MODDIRI)/ZDeflate.h	\
+		$(MODDIRI)/ZIP.h	\
+		$(MODDIRI)/ZTrees.h
+ZIPOLDS      := $(MODDIRS)/ZDeflate.c	\
+		$(MODDIRS)/ZInflate.c
+ZIPNEWH	     := $(MODDIRI)/crc32.h 	\
+		$(MODDIRI)/deflate.h 	\
+		$(MODDIRI)/inffast.h 	\
+		$(MODDIRI)/inffixed.h 	\
+		$(MODDIRI)/inflate.h	\
+		$(MODDIRI)/inftrees.h 	\
+		$(MODDIRI)/trees.h 	\
+		$(MODDIRI)/zconf.h 	\
+		$(MODDIRI)/zlib.h 	\
+		$(MODDIRI)/zutil.h
+ZIPNEWS	     := $(MODDIRS)/adler32.c 	\
+		$(MODDIRS)/compress.c 	\
+		$(MODDIRS)/crc32.c 	\
+		$(MODDIRS)/deflate.c 	\
+		$(MODDIRS)/gzio.c 	\
+		$(MODDIRS)/infback.c	\
+		$(MODDIRS)/inffast.c 	\
+		$(MODDIRS)/inflate.c 	\
+		$(MODDIRS)/inftrees.c 	\
+		$(MODDIRS)/trees.c 	\
+		$(MODDIRS)/uncompr.c 	\
+		$(MODDIRS)/zutil.c
+ifeq ($(BUILTINZLIB),yes)
+ZIPH	     := $(ZIPOLDH) $(ZIPNEWH)
+ZIPS	     := $(ZIPOLDS) $(ZIPNEWS)
+else
+ZIPH	     := $(ZIPOLDH)
+ZIPS	     := $(ZIPOLDS)
+endif
 ZIPO         := $(ZIPS:.c=.o)
-
 ZIPDEP       := $(ZIPO:.o=.d)
 
 # used in the main Makefile