--- src/Makefile.in.orig	2009-06-14 15:18:52.000000000 -0700
+++ src/Makefile.in	2009-07-14 22:26:26.000000000 -0700
@@ -83,6 +83,7 @@
 MPATH=-DMUD_LIB='"$(MUD_LIB)"' -DBINDIR='"$(BINDIR)"' -DERQ_DIR='"$(ERQ_DIR)"'
 #
 CFLAGS= @EXTRA_CFLAGS@ $(OPTIMIZE) $(DEBUG) $(WARN) $(MPATH) $(PROFIL)
+CPPFLAGS= @CPPFLAGS@
 #
 LIBS=@LIBS@ @PKGLIBS@
 #
@@ -135,13 +136,13 @@
 	@echo "To install everything in one go, use 'make install-all'."
 
 install-driver: ldmud@EXEEXT@ docs
-	$(mkinstalldirs) $(BINDIR) $(MANDIR)/man1
-	$(INSTALL) -c ldmud@EXEEXT@ $(BINDIR)/ldmud@EXEEXT@
-	$(INSTALL) -c ../doc/man/ldmud.1 $(MANDIR)/man1/ldmud.1
+	$(mkinstalldirs) $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
+	$(INSTALL) -c ldmud@EXEEXT@ $(DESTDIR)$(BINDIR)/ldmud@EXEEXT@
+	$(INSTALL) -c ../doc/man/ldmud.1 $(DESTDIR)$(MANDIR)/man1/ldmud.1
 
 install-headers: 
-	$(mkinstalldirs) $(MUD_LIB_INCLUDE)
-	$(INSTALL) -c ../mudlib/sys/* $(MUD_LIB_INCLUDE)
+	$(mkinstalldirs) $(DESTDIR)$(MUD_LIB_INCLUDE)
+	$(INSTALL) -c ../mudlib/sys/* $(DESTDIR)$(MUD_LIB_INCLUDE)
 
 install-utils:
 	(cd util; $(MAKE) $(MFLAGS) install)
