Re: [Tuxnes-devel] Re: tuxnes patch
Brought to you by:
tmmm
From: Jason D. S. <jd...@us...> - 2004-05-10 19:09:15
|
Jason Dorje Short wrote: > Mike Mestnik wrote: > >>> - added a dirty hack in unzip.h because for some reason my system >>> seems to fail to define ZEXPORT >> >> >> Jason currently knows more about autoconf than I do. > > There is no configure-check for the presence of zip or (?) libzip. > Obviously this is bad. Heh, there's no libzip it's libz. But the file names (unzip.h) confused me. Anyway, configure does check for libz but not for libz-dev. In a distribution these are usually separate packages. This patch "fixes" that by adding a header check after the library check succeeds. Only if both checks pass will zlib be used. This means the AC_DEFINE and LIBS must be done manually. I'm not quite sure why that is. I also fixed in passing an #if HAVE_LIBZ. This should be #ifdef HAVE_LIBZ. The former shouldn't (I think) work at all since if zlib isn't present HAVE_LIBZ will be undefined. Finally I improved Makefile.am so that the zlib source files aren't compiled at all if zlib isn't being used. Currently they are compiled but because of the #ifdef HAVE_LIBZ check inside them they will be empty. So this change isn't strictly necessary but makes compilation cleaner. I left the #ifdef checks inside the zlib source files. I'm unable to test it on a system without zlib (uninstalling zlib-dev forces 10 other packages to be removed on my system). However I did manually force zlib detection to fail, and the compilation succeeded. I didn't do any other testing. Rigel: I never saw your original patch so I don't know what changes you made in it. But you should test if this patch allows tuxnes to compile without zlib. I also recommend you install zlib-dev... jason |