---
 src/texk/web2c/luatexdir/luatexlib.mk |   24 ++++--------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

Index: luatex-0.10.2/src/texk/web2c/luatexdir/luatexlib.mk
===================================================================
--- luatex-0.10.2.orig/src/texk/web2c/luatexdir/luatexlib.mk	2007-08-14 10:32:18.000000000 +0200
+++ luatex-0.10.2/src/texk/web2c/luatexdir/luatexlib.mk	2007-08-14 10:32:31.000000000 +0200
@@ -113,18 +113,6 @@
 
 # zziplib
 
-# zziplib is a configuration nightmare, because it is so stubborn
-# about using a pre-installed zlib. configure and make have to
-# be fooled in two different ways. 
-# - configure needs to find
-# the subdirs 'include' and 'lib' in the --with-zlib prefix,
-# and these need to contain the proper headers and libraries.
-# - make needs to find the right headers using an -I via CPPFLAGS, 
-# because the zlib path is relative and can't be found otherwise.
-#
-# final trickyness: configure writes a Makefile in the source
-# directory. it is needed by anything, so I delete it right away
-
 zzipretarget=
 
 ifeq ($(target),i386-mingw32)
@@ -135,23 +123,19 @@
 ZZIPLIBDIR=../../libs/zziplib
 ZZIPLIBSRCDIR=$(srcdir)/$(ZZIPLIBDIR)
 ZZIPLIBDEP = $(ZZIPLIBDIR)/zzip/.libs/libzzip.a
+ZIPZIPINC = -I$(ZLIBSRCDIR)
 
 $(ZZIPLIBDEP): $(ZZIPLIBSRCDIR)
 	mkdir -p $(ZZIPLIBDIR) && cd $(ZZIPLIBDIR) &&                \
-	mkdir -p zlib/include && cp $(ZLIBSRCDIR)/*.h  zlib/include && \
-	mkdir -p zlib/lib && cp $(ZLIBDIR)/*.a  zlib/lib  && \
-    env CPPFLAGS=-I../zlib/include $(ZZIPLIBSRCDIR)/configure --with-zlib=zlib \
-        --srcdir=$(ZZIPLIBSRCDIR) --disable-builddir --disable-shared $(zzipretarget) && \
-    rm $(ZZIPLIBSRCDIR)/Makefile && \
-	cd $(ZZIPLIBDIR)/zzip && \
-	$(MAKE) $(common_makeargs) libzzip.la
+    cp -R $(ZZIPLIBSRCDIR)/* . &&                                \
+    env CPPFLAGS=$(ZIPZIPINC) ./configure --disable-builddir --disable-shared $(zzipretarget) && cd $(ZZIPLIBDIR)/zzip && $(MAKE) $(common_makeargs) libzzip.la
 
 # luazip
 
 LUAZIPDIR=../../libs/luazip
 LUAZIPSRCDIR=$(srcdir)/$(LUAZIPDIR)
 LUAZIPDEP=$(LUAZIPDIR)/src/luazip.o
-LUAZIPINC=-I../../lua51 -I../$(ZZIPLIBSRCDIR) -I../$(ZZIPLIBDIR)
+LUAZIPINC=-I../../lua51 -I../../zziplib
 
 $(LUAZIPDEP): $(LUAZIPDIR)/src/luazip.c
 	mkdir -p $(LUAZIPDIR) && cd $(LUAZIPDIR) && cp -R $(LUAZIPSRCDIR)/* . && \
