From e3e942ac0038ab67b1e2b67a7c7dcd200438f70a Mon Sep 17 00:00:00 2001
From: Christopher Faylor <me@cgf.cx>
Date: Wed, 30 Jul 2008 06:07:42 +0000
Subject: [PATCH] * Makefile.in: Link cygcheck with -lntdll even without
 mingw-zlib.

---
 winsup/utils/ChangeLog   | 4 ++++
 winsup/utils/Makefile.in | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 2581bfedb..7eea85465 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-30  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
+
+	* Makefile.in: Link cygcheck with -lntdll even without mingw-zlib.
+
 2008-07-27  Christopher Faylor  <me+cygwin@cgf.cx>
 
 	* cygcheck.cc (load_cygwin): Free the cygwin dll after we're done with
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index c4ec9e0c4..c8dd4c39d 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -71,6 +71,7 @@ strace.exe: path.o
 cygcheck.exe: bloda.o path.o dump_setup.o
 
 # Provide any necessary per-target variable overrides.
+cygcheck.exe: MINGW_LDFLAGS += -lntdll
 cygpath.exe: ALL_LDFLAGS += -lntdll
 
 # Check for dumper's requirements and enable it if found.
@@ -94,7 +95,7 @@ ifdef libz
 zlib_h  := -include ${patsubst %/lib/mingw/libz.a,%/include/zlib.h,${patsubst %/lib/libz.a,%/include/zlib.h,$(libz)}}
 zconf_h := ${patsubst %/zlib.h,%/zconf.h,$(zlib_h)}
 dump_setup.o: MINGW_CXXFLAGS += $(zconf_h) $(zlib_h)
-cygcheck.exe: MINGW_LDFLAGS += $(libz) -lntdll
+cygcheck.exe: MINGW_LDFLAGS += $(libz)
 else
 all: warn_cygcheck_zlib
 endif
@@ -172,7 +173,7 @@ warn_dumper:
 	@echo '*** Not building dumper.exe since some required libraries are'
 	@echo '*** missing: libbfd.a and libintl.a.'
 	@echo '*** If you need this program, check out the naked-bfd and naked-intl'
-	@echo '*** sources from sources.redhat.com.  Then, configure and build these'
+	@echo '*** sources from sourceware.org.  Then, configure and build these'
 	@echo '*** libraries.  Otherwise, you can safely ignore this warning.'
 
 warn_cygcheck_zlib: