--- Makefile.in.orig
+++ Makefile.in
@@ -15,10 +15,10 @@ srcdir = @srcdir@
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-LIBDIR=@libdir@
-INCDIR=@includedir@
-MANDIR=@mandir@
-BINDIR=@bindir@
+LIBDIR=$(DESTDIR)@libdir@
+INCDIR=$(DESTDIR)@includedir@
+MANDIR=$(DESTDIR)@mandir@
+BINDIR=$(DESTDIR)@bindir@
 
 # Which C compiler do you want to use?
 
