There's really no change in the code from the previous package I posted. However, I've now included the dll, and set up the binary package so that the dll is used for any packages built in the future that depend on zlib.
unpack zlib-1.1.3 cd zlib-1.1.3 configure --prefix=/usr/local # can't say '--host=i686-pc-cygwin' because zlib's configure isn't # really THE configure. It's some other hacked up script, and # doesn't support --host. # NOTE: if you want 586 or 686-specific assembler code, # define 'OBJA' in the makefile as follows: # OBJA = match.o make make test make install /usr/local/include/zlib.h /usr/local/include/zconf.h /usr/local/lib/libz.a -----------------------------------------------
unpack zlib-1.1.3 cd zlib-1.1.3 patch -p1 < ../zlib-1.1.3-cygwin1.1-dll.patch # NOTE: if you want 586 or 686-specific assembler code, # define 'OBJA' in the makefile as follows: # OBJA = match.o make make test make install /usr/local/include/zlib.h /usr/local/include/zconf.h /usr/local/include/dl_import.h /usr/local/bin/libz.dll /usr/local/lib/libz.a My package: /usr/local/include/dl_import.h /usr/local/include/zlib.h (dll version) /usr/local/include/zconf.h (dll version) /usr/local/include/static/zlib.h (static version) /usr/local/include/static/zconf.h (static version) /usr/local/lib/libz.a-static /usr/local/lib/libz.a-dll /usr/local/bin/libz.dll symlink libz.a to libz.a-dll # NOTE: the 'static' and 'dynamic' headers are # actually identical. I just wanted to establish the # pattern, if it becomes necessary for future packages # Yes, I know you can/should do all this with #defines, # and that will work in the current configuration. However, # it's all about flexibility. I want Joe User to be able # to say "I hate dll's" and completely eradicate them, and # not have to use special #defines to do so. # However, in this case, it's simple: # just change the symlink for libz.a and POOF: static linking. # As it happens, dl_import.h was ONLY used internally. It isn't # referenced from zlib.h or zconf.h