$OpenBSD$
--- doc/Makefile.in.orig	Mon Sep  3 10:53:35 2007
+++ doc/Makefile.in	Sat Sep 22 12:42:46 2007
@@ -154,7 +154,7 @@ build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
-docdir = $(prefix)/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
+docdir = @docdir@
 dvidir = @dvidir@
 enable_dot = @enable_dot@
 enable_html_docs = @enable_html_docs@
@@ -528,15 +528,16 @@ install-data-local:
 	$(mkinstalldirs) $(man3dir)
 	@for i in ./man/man3/log4cpp.3 ./man/man3/log4cpp_*.3; do \
 		inst=`basename $$i | sed 's/_/::/g'`; \
-		echo "$(INSTALL_DATA) $$i$(man3dir)/$$inst"; \
-		$(INSTALL_DATA) $$i $(man3dir)/$$inst; \
+		echo "$(INSTALL_DATA) $(DESTDIR)$$i$(man3dir)/$$inst"; \
+		$(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$inst; \
 	done
-	$(mkinstalldirs) $(docdir)
-	cp -r html/. $(docdir)
-	$(RM) -r -f $(docdir)/CVS \
-		$(docdir)/Makefile.am \
-		$(docdir)/Makefile.in \
-		$(docdir)/Makefile
+	$(mkinstalldirs) $(DESTDIR)$(docdir)
+	cp -r $(srcdir)/html/. $(DESTDIR)$(docdir)
+	cp -r $(builddir)/html/. $(DESTDIR)$(docdir)
+	$(RM) -r -f $(DESTDIR)$(docdir)/CVS \
+		$(DESTDIR)$(docdir)/Makefile.am \
+		$(DESTDIR)$(docdir)/Makefile.in \
+		$(DESTDIR)$(docdir)/Makefile
 
 uninstall-local:
 	$(RM) $(man3dir)/log4cpp.3
