$NetBSD: patch-ah,v 1.3 2010/05/04 18:55:46 jym Exp $

--- libxc/Makefile.orig	2005-05-24 00:31:07.000000000 +0000
+++ libxc/Makefile	2005-05-24 00:34:06.000000000 +0000
@@ -68,13 +68,13 @@
 	  ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
 
 install: build
-	[ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) $(DESTDIR)/usr/lib
-	[ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
-	$(INSTALL_PROG) libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
-	$(INSTALL_DATA) libxc.a $(DESTDIR)/usr/lib
-	ln -sf libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/libxc.so.$(MAJOR)
-	ln -sf libxc.so.$(MAJOR) $(DESTDIR)/usr/lib/libxc.so
-	$(INSTALL_DATA) xc.h $(DESTDIR)/usr/include
+	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(PREFIX)/lib
+	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(PREFIX)/include
+	$(BSD_INSTALL_LIB) libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PREFIX)/lib
+	$(BSD_INSTALL_LIB) libxc.a $(DESTDIR)$(PREFIX)/lib
+	ln -sf libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)$(PREFIX)/lib/libxc.so.$(MAJOR)
+	ln -sf libxc.so.$(MAJOR) $(DESTDIR)$(PREFIX)/lib/libxc.so
+	$(BSD_INSTALL_DATA) xc.h $(DESTDIR)$(PREFIX)/include
 
 clean:
 	rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
@@ -97,6 +97,6 @@
 	ln -sf $< $@
 
 libxc.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
-	$(CC) -Wl,-soname -Wl,libxc.so.$(MAJOR) -shared -o $@ $^ -L../libxutil -lxutil -lz
+	$(CC) -Wl,-soname -Wl,libxc.so.$(MAJOR) -shared -o $@ $^ -L../libxutil $(LDFLAGS) -lxutil -lz
 
 -include $(DEPS)
