diff -Naur origsrc/gambc-v4_2_8/configure.ac src/gambc-v4_2_8/configure.ac
--- origsrc/gambc-v4_2_8/configure.ac	2008-06-27 16:19:31.566922000 -0500
+++ src/gambc-v4_2_8/configure.ac	2008-06-27 16:24:28.587830800 -0500
@@ -1330,11 +1330,11 @@
   srcdirpfx="\$(srcdir)/"
 fi
 
-INSTALL='$(rootfromhere)/install-sh -c'
-INSTALL_DATA='$(rootfromhere)/install-sh -c -m 644'
-INSTALL_LIB='$(rootfromhere)/install-sh -c -m 644'
-INSTALL_PROGRAM='$(rootfromhere)/install-sh -c -m 755'
-
+INSTALL='$(srcdirpfx)$(rootfromhere)/install-sh -c'
+INSTALL_DATA='$(srcdirpfx)$(rootfromhere)/install-sh -c -m 644'
+INSTALL_LIB='$(srcdirpfx)$(rootfromhere)/install-sh -c -m 644'
+INSTALL_PROGRAM='$(srcdirpfx)$(rootfromhere)/install-sh -c -m 755'
+ 
 AC_SUBST(srcdirpfx)
 AC_SUBST(exe)
 AC_SUBST(obj)
diff -Naur origsrc/gambc-v4_2_8/doc/makefile.in src/gambc-v4_2_8/doc/makefile.in
--- origsrc/gambc-v4_2_8/doc/makefile.in	2008-06-27 16:19:31.645052500 -0500
+++ src/gambc-v4_2_8/doc/makefile.in	2008-06-27 16:24:28.587830800 -0500
@@ -127,11 +127,11 @@
 
 install-pre:
 
-install-post: all doc
+install-post: all
 	$(srcdirpfx)$(rootfromhere)/mkidirs $(docdir) $(infodir)
-	$(INSTALL_DATA) gambit-c.pdf $(docdir)/gambit-c.pdf
-	$(INSTALL_DATA) gambit-c.txt $(docdir)/gambit-c.txt
-	$(INSTALL_DATA) gambit-c.html $(docdir)/gambit-c.html
+	$(INSTALL_DATA) $(srcdirpfx)gambit-c.pdf $(docdir)/gambit-c.pdf
+	$(INSTALL_DATA) $(srcdirpfx)gambit-c.txt $(docdir)/gambit-c.txt
+	$(INSTALL_DATA) $(srcdirpfx)gambit-c.html $(docdir)/gambit-c.html
 	cd $(srcdir) && for file in gambit-c.info*; do \
 	  $(INSTALL_DATA) $$file $(infodir)/$$file; \
 	done
diff -Naur origsrc/gambc-v4_2_8/include/makefile.in src/gambc-v4_2_8/include/makefile.in
--- origsrc/gambc-v4_2_8/include/makefile.in	2008-06-27 16:19:32.473235800 -0500
+++ src/gambc-v4_2_8/include/makefile.in	2008-06-27 16:24:28.681587400 -0500
@@ -59,39 +59,23 @@
 
 all: all-pre all-recursive all-post
 
-all-pre:
-	major=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\1&"`; \
-	minor=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\2&"`; \
-	revision=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\3&"`; \
-	version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \
-	echo "#error \"The version indicated in ___VERSION is not supported by gambit.h\"" > gambit-not$$version_num.h; \
-	echo "#error \"You are probably compiling C code generated by a Gambit compiler earlier or later than $(PACKAGE_VERSION)\"" >> gambit-not$$version_num.h; \
-	echo "#error \"___VERSION will be set to $$version_num to reduce other errors\"" >> gambit-not$$version_num.h; \
-	echo "#undef ___VERSION" >> gambit-not$$version_num.h; \
-	echo "#define ___VERSION $$version_num" >> gambit-not$$version_num.h; \
-	echo "#include \"gambit.h\"" >> gambit-not$$version_num.h
+include version.make
+
+all-pre: gambit-not$(VERSION_NUM).h
 
 all-post: gambit.h
 
 install-pre:
 
-install-post: all
+install-post: all gambit.h gambit-not$(VERSION_NUM).h
 	$(srcdirpfx)$(rootfromhere)/mkidirs $(includedir)
-	$(INSTALL_DATA) $(srcdirpfx)gambit.h $(includedir)/gambit.h
-	major=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\1&"`; \
-	minor=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\2&"`; \
-	revision=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\3&"`; \
-	version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \
-	$(INSTALL_DATA) $(srcdirpfx)gambit-not$$version_num.h $(includedir)/gambit-not$$version_num.h
+	$(INSTALL_DATA) ./gambit.h $(includedir)/gambit.h
+	$(INSTALL_DATA) ./gambit-not$(VERSION_NUM).h $(includedir)/gambit-not$(VERSION_NUM).h
 
 uninstall-pre:
 
-uninstall-post:
-	major=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\1&"`; \
-	minor=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\2&"`; \
-	revision=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\3&"`; \
-	version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \
-	rm -f $(includedir)/gambit.h $(includedir)/gambit-not$$version_num.h
+uninstall-post: gambit-not$(VERSION_NUM).h
+	rm -f $(includedir)/gambit.h $(includedir)/gambit-not$(VERSION_NUM).h
 
 mostlyclean-pre:
 
@@ -167,3 +151,18 @@
 # Tell versions [3.59,3.63) of GNU make not to export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
+
+version.make:
+	major=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\1&"`; \
+	minor=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\2&"`; \
+	revision=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\3&"`; \
+	version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \
+	echo VERSION_NUM = $$version_num >> version.make
+
+gambit-not$(VERSION_NUM).h:
+	echo "#error \"The version indicated in ___VERSION is not supported by gambit.h\"" > gambit-not$(VERSION_NUM).h; \
+	echo "#error \"You are probably compiling C code generated by a Gambit compiler earlier or later than $(PACKAGE_VERSION)\"" >> gambit-not$(VERSION_NUM); \
+	echo "#error \"___VERSION will be set to $(VERSION_NUM) to reduce other errors\"" >> gambit-not$(VERSION_NUM).h; \
+	echo "#undef ___VERSION" >> gambit-not$(VERSION_NUM); \
+	echo "#define ___VERSION $(VERSION_NUM)" >> gambit-not$(VERSION_NUM); \
+	echo "#include \"gambit.h\"" >> gambit-not$(VERSION_NUM)
diff -Naur origsrc/gambc-v4_2_8/lib/makefile.in src/gambc-v4_2_8/lib/makefile.in
--- origsrc/gambc-v4_2_8/lib/makefile.in	2008-06-27 16:19:32.817010000 -0500
+++ src/gambc-v4_2_8/lib/makefile.in	2008-06-27 16:24:28.697213500 -0500
@@ -169,7 +169,7 @@
 	$(INSTALL_LIB) $(LIBRARY) $(libdir)/$(LIBRARY)
 	@FIXLIB@ $(libdir)/$(LIBRARY)
 	for library in $(LIBRARIES_SCM); do \
-	  $(INSTALL_DATA) $$library $(libdir)/$$library; \
+	  $(INSTALL_DATA) $(srcdirpfx)$$library $(libdir)/$$library; \
 	done
 
 uninstall-pre:
diff -Naur origsrc/gambc-v4_2_8/makefile.in src/gambc-v4_2_8/makefile.in
--- origsrc/gambc-v4_2_8/makefile.in	2008-06-27 16:19:34.926533500 -0500
+++ src/gambc-v4_2_8/makefile.in	2008-06-27 16:24:28.712839600 -0500
@@ -177,7 +177,7 @@
 install-post: all
 	rm -f $(prefix)/current $(prefix)/current.lnk
 	if test "@bat@" = ""; then \
-	  (cd $(prefix) && $(LN_S) .$(PACKAGE_SUBDIR) current); \
+	  (cd $(DESTDIR)$(prefix) && $(LN_S) .$(PACKAGE_SUBDIR) current); \
 	fi
 
 uninstall-pre:
diff -Naur origsrc/gambc-v4_2_8/misc/makefile.in src/gambc-v4_2_8/misc/makefile.in
--- origsrc/gambc-v4_2_8/misc/makefile.in	2008-06-27 16:19:35.160925000 -0500
+++ src/gambc-v4_2_8/misc/makefile.in	2008-06-27 16:24:28.712839600 -0500
@@ -81,8 +81,8 @@
 
 install-post: all
 	$(srcdirpfx)$(rootfromhere)/mkidirs $(emacsdir)
-	$(INSTALL_DATA) gambit.el $(emacsdir)/gambit.el
-	$(INSTALL_DATA) syntax-case.scm $(prefix)$(PACKAGE_SUBDIR)/syntax-case.scm
+	$(INSTALL_DATA) $(srcdirpfx)gambit.el $(emacsdir)/gambit.el
+	$(INSTALL_DATA) $(srcdirpfx)syntax-case.scm $(DESTDIR)$(prefix)$(PACKAGE_SUBDIR)/syntax-case.scm
 
 uninstall-pre:
 
