$NetBSD: patch-ac,v 1.1 2011/05/24 12:26:00 is Exp $

--- Makefile.orig	2004-10-02 15:49:05.000000000 +0000
+++ Makefile
@@ -92,15 +92,15 @@ top:
 installopt: install
 
 install: all
-	mkdir -p $(LIBDIR)
-	if test -w $(CAMLDIR)/ld.conf \
-        && test `grep -s -c '^$(LIBDIR)$$' $(CAMLDIR)/ld.conf` = 0; then \
-	    echo $(LIBDIR) >> $(CAMLDIR)/ld.conf; \
+	mkdir -p $(DESTDIR)$(LIBDIR)
+	if test -w $(DESTDIR)$(CAMLDIR)/ld.conf \
+        && test `grep -s -c '^$(LIBDIR)$$' $(DESTDIR)$(CAMLDIR)/ld.conf` = 0; then \
+	    echo $(LIBDIR) >> $(DESTDIR)$(CAMLDIR)/ld.conf; \
 	fi
 	for i in $(BUILDDIRS); do (cd $$i; $(MAKE) install) || exit $$?; done
-	$(CP) Makefile.config $(LIBDIR)
-	$(CP) config.h $(LIBDIR)
-	$(RANLIB) $(LIBDIR)/*.a
+	$(CP) Makefile.config $(DESTDIR)$(LIBDIR)
+	$(CP) config.h $(DESTDIR)$(LIBDIR)
+	$(RANLIB) $(DESTDIR)$(LIBDIR)/*.a
 
 depend:
 	for i in $(BUILDDIRS); do (cd $$i; $(MAKE) depend) || exit $$?; done
