--- Makefile.in.orig	2009-05-24 20:09:25.598720854 +0200
+++ Makefile.in	2009-05-24 20:10:24.541471779 +0200
@@ -78,16 +78,16 @@
 install: install-dll @install_dev@
 
 install-dll:
-	mkdir -p ${bindir}
-	cp -p $(BINDIST_FILES) ${bindir}
+	mkdir -p $(DESTDIR)${bindir}
+	cp -p $(BINDIST_FILES) $(DESTDIR)${bindir}
 
 install-dev:
-	mkdir -p ${includedir} ${libdir}
-	cp -p ${srcdir}/regex.h ${includedir}
-	cp -p $(DEVDIST_FILES) ${libdir}
+	mkdir -p ${includedir} $(DESTDIR)${libdir}
+	cp -p ${srcdir}/regex.h $(DESTDIR)${includedir}
+	cp -p $(DEVDIST_FILES) $(DESTDIR)${libdir}
 	for s in 3 7; do \
-	  mkdir -p ${mandir}/man$$s; \
-	  gzip -c ${srcdir}/regex.$$s > ${mandir}/man$$s/regex.$$s.gz; \
+	  mkdir -p $(DESTDIR)${mandir}/man$$s; \
+	  gzip -c ${srcdir}/regex.$$s > $(DESTDIR)${mandir}/man$$s/regex.$$s.gz; \
 	done
 
 dist:	 bindist devdist srcdist
