--- a/Makefile.in
+++ b/Makefile.in
@@ -91,9 +91,23 @@
 # If the user has cygutils' `lpr.exe' installed, we move it out of the way.
 #
 install-lpr-basic:
-	if test -e ${bindir}/lpr.exe; then \
-	  rm -f ${bindir}/lpr-basic.exe; \
-	  mv ${bindir}/lpr.exe ${bindir}/lpr-basic.exe; \
+	if test -f ${bindir}/lpr.exe; then \
+	  if test -f ${bindir}/lpr-basic.exe; then \
+	    if cmp ${bindir}/lpr.exe ${bindir}/lpr-basic.exe > /dev/null 2>&1; \
+	    then \
+	      if test -h ${bindir}/lpr-basic.exe; then \
+		rm -f ${bindir}/lpr-basic.exe; \
+		mv ${bindir}/lpr.exe ${bindir}/lpr-basic.exe; \
+	      else \
+		rm -f ${bindir}/lpr.exe; \
+	      fi; \
+	    else \
+	      rm -f ${bindir}/lpr-orig.exe; \
+	      mv ${bindir}/lpr.exe ${bindir}/lpr-orig.exe; \
+	    fi; \
+	  else \
+	    mv ${bindir}/lpr.exe ${bindir}/lpr-basic.exe; \
+	  fi; \
 	fi
 
 # Installation of deliverables from this package.
@@ -102,7 +116,8 @@
 	$(INSTALL_SCRIPT) lpr-enhanced ${bindir}
 	cd ${bindir}; $(LN_S) lpr-enhanced lpr; $(LN_S) lpr-enhanced lp
 	$(INSTALL_DATA) example ${localstatedir}/spool/lp/config
-	$(INSTALL_DATA) example ${sysconfdir}/printcap
+	test -f ${sysconfdir}/printcap || \
+	  $(INSTALL_DATA) example ${sysconfdir}/printcap
 
 # 'uninstall' reverses the effect of an `install', removing those files
 # we installed in ${bindir} and ${sysconfdir}, together with the local state
@@ -110,19 +125,28 @@
 # cygutils' `lpr.exe', if it appears to have been moved out of the way.
 #
 uninstall:
+	if test -f ${sysconfdir}/printcap \
+	&& test -f ${localstatedir}/spool/lp/config/example \
+	&& cmp ${localstatedir}/spool/lp/config/example \
+	       ${sysconfdir}/printcap > /dev/null 2>&1; then \
+		   rm -f ${sysconfdir}/printcap; \
+	fi
 	rm -rf ${localstatedir}/spool/lp
-	test rmdir ${localstatedir}/spool || true
+	rmdir ${localstatedir}/spool || true
 	rm -f ${bindir}/lpr-enhanced ${bindir}/lpr ${bindir}/lp
-	if test -e ${bindir}/lpr-basic.exe; then \
-	  rm -f ${bindir}/lpr.exe; \
-	  mv ${bindir}/lpr-basic.exe ${bindir}/lpr.exe; \
+	if test ! -f ${bindir}/lpr.exe; then \
+	  if test -f ${bindir}/lpr-orig.exe; then \
+	    mv ${bindir}/lpr-orig.exe ${bindir}/lpr.exe; \
+	  elif test -f ${bindir}/lpr-basic.exe; then \
+	    cd ${bindir}; $(LN_S) lpr-basic.exe lpr.exe; \
+	  fi; \
 	fi
 
 # Distribution...
 # We must provide, at least, a source distribution package; we also
 # accommodate, within a full distribution bundle, a preconfigured binary
 # installation image, together with supporting documentation and licence
-# packages, conforming to mingw.org packaging standards.
+# packages, conforming to mingw.org packaging conventions.
 #
 dist: srcdist bindist licdist docdist
 
@@ -163,6 +187,7 @@
 	  sysconfdir=`pwd`/$(STAGED)${sysconfdir} \
 	  install-lpr-enhanced
 	cd $(STAGED)${bindir}; rm -f lp lpr
+	rm -f $(STAGED)${sysconfdir}/printcap
 	(cd $(STAGED); $(MK_TAR) *) | $(ZIPCMD) > $(DISTNAME)-bin.$(ZIPEXT)
 	rm -rf $(STAGED)