--- doc/doxygen/Makefile.in.orig	2010-12-08 00:37:00.000000000 -0500
+++ doc/doxygen/Makefile.in	2013-03-23 23:25:47.000000000 -0400
@@ -177,7 +177,7 @@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
-docdir = @prefix@/doc/maloc
+docdir = @prefix@/share/doc/maloc
 dot_path = @dot_path@
 doxygen_path = @doxygen_path@
 dvidir = @dvidir@
@@ -323,7 +323,7 @@
 	for dir in "$(DESTDIR)$(docdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: install-am
+install: installdirs install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -433,8 +433,7 @@
 	$(doxygen_path) $(top_srcdir)/doc/doxygen/maloc.dox
 
 install-docDATA:
-	mkdir -p $(docdir)
-	cp -r ../api $(docdir)/
+	cp -r ../api $(DESTDIR)$(docdir)/
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
