From: Robert Schwebel Date: Sat, 29 Oct 2011 19:05:46 +0200 Subject: [PATCH] link against system zlib Instead of building our own internal zlib, link against the variant provided by the system. This patch was taken from linux-from-scratch: Submitted By: Matthew Burgess Date: 2004-11-12 Initial Package Version: 1.11.2 Upstream Status: Not submitted Origin: BLFS Dev Post Description: Links against system zlib instead of the internal zlib. Signed-off-by: Robert Schwebel --- Makefile.in | 12 +++++------- src/Makefile.in | 6 +++--- src/zlib.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile.in b/Makefile.in index b577801..cb3cea1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -53,7 +53,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/cvs.spec.in $(top_srcdir)/configure \ $(top_srcdir)/emx/Makefile.in $(top_srcdir)/os2/Makefile.in \ - $(top_srcdir)/zlib/Makefile.in AUTHORS COPYING COPYING.LIB \ + AUTHORS COPYING COPYING.LIB \ ChangeLog INSTALL NEWS TODO compile depcomp install-sh \ mdate-sh missing mkinstalldirs ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -65,7 +65,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = cvs.spec emx/Makefile os2/Makefile zlib/Makefile +CONFIG_CLEAN_FILES = cvs.spec emx/Makefile os2/Makefile SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -184,7 +184,7 @@ with_default_rsh = @with_default_rsh@ # Unix source subdirs, where we'll want to run lint and etags: # This is a legacy variable from b4 Automake -USOURCE_SUBDIRS = lib zlib diff src +USOURCE_SUBDIRS = lib diff src # All other subdirs: SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tools \ windows-NT os2 emx vms @@ -256,7 +256,7 @@ config.h: stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ @@ -269,8 +269,6 @@ emx/Makefile: $(top_builddir)/config.status $(top_srcdir)/emx/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ os2/Makefile: $(top_builddir)/config.status $(top_srcdir)/os2/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ -zlib/Makefile: $(top_builddir)/config.status $(top_srcdir)/zlib/Makefile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd @@ -408,7 +406,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/contrib $(distdir)/doc $(distdir)/emx $(distdir)/lib $(distdir)/os2 $(distdir)/src $(distdir)/windows-NT $(distdir)/zlib + $(mkdir_p) $(distdir)/. $(distdir)/contrib $(distdir)/doc $(distdir)/emx $(distdir)/lib $(distdir)/os2 $(distdir)/src $(distdir)/windows-NT @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/src/Makefile.in b/src/Makefile.in index 3765523..98bcd79 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -86,7 +86,7 @@ am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \ version.$(OBJEXT) vers_ts.$(OBJEXT) watch.$(OBJEXT) \ wrapper.$(OBJEXT) zlib.$(OBJEXT) cvs_OBJECTS = $(am_cvs_OBJECTS) -cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a +cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -200,7 +200,7 @@ with_default_rsh = @with_default_rsh@ # some namespace hackery going on that maybe shouldn't be. Long term fix is to # try and remove naming ocnflicts and fix Automake to allow particular includes # to be attached only to particular object files. Short term fix is either or. -INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff -I$(top_srcdir)/zlib $(includeopt) +INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff $(includeopt) bin_SCRIPTS = cvsbug # The cvs executable @@ -279,7 +279,7 @@ cvs_SOURCES = \ cvs_LDADD = \ ../diff/libdiff.a \ ../lib/libcvs.a \ - ../zlib/libz.a + -lz # extra clean targets diff --git a/src/zlib.c b/src/zlib.c index 46ed0e6..4024a6b 100644 --- a/src/zlib.c +++ b/src/zlib.c @@ -22,7 +22,7 @@ #if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) -#include "zlib.h" +#include /* OS/2 doesn't have EIO. FIXME: this whole notion of turning a different error into EIO strikes me as pretty dubious. */