--- src/Makefile.am.orig	Sat Oct 18 04:54:20 2003
+++ src/Makefile.am	Mon Jan 12 12:07:52 2004
@@ -44,12 +44,11 @@
 README=$(top_srcdir)/docs/MANUAL
 MKHELP=$(top_srcdir)/src/mkhelp.pl
 
-# This generates the hugehelp.c file
+# This generates the hugehelp.c file in both uncompressed and compressed formats
 hugehelp.c: $(README) $(MANPAGE)  mkhelp.pl
-	rm -f hugehelp.c
-	$(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(MKHELPOPT) $(README) > hugehelp.c
-
-# for distribution, generate an uncompressed help file!
-dist-hook:
-	chmod 0644 $(distdir)/hugehelp.c
-	$(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) > $(distdir)/hugehelp.c
+	echo '#include "config.h"' > hugehelp.c
+	echo '#ifndef HAVE_LIBZ' >> hugehelp.c
+	$(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> hugehelp.c
+	echo '#else' >> hugehelp.c
+	$(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(MKHELPOPT) $(README) >> hugehelp.c
+	echo '#endif // HAVE_LIBZ' >> hugehelp.c
--- src/config.h.in.orig	Fri Oct 31 13:22:16 2003
+++ src/config.h.in	Mon Jan 12 11:48:13 2004
@@ -67,3 +67,6 @@
 
 /* Define to 1 if you have the <termio.h> header file. */
 #undef HAVE_TERMIO_H
+
+/* If zlib is available */
+#undef HAVE_LIBZ

