diff -ruN xmlwrapp-0.5.0.orig/tools/mkmf xmlwrapp-0.5.0/tools/mkmf
--- xmlwrapp-0.5.0.orig/tools/mkmf	2003-08-03 21:57:28.000000000 -0700
+++ xmlwrapp-0.5.0/tools/mkmf	2005-07-26 15:49:42.000000000 -0700
@@ -555,38 +555,38 @@
 
     if (@static_libraries or @shared_libraries or @binaries or @include_dirs or @include_files or @man_pages) {
 	print MF "install: all\n";
-	print MF "\tmkdir -p $vars{'BINDIR'}\n" if @binaries;
-	print MF "\tmkdir -p $vars{'INCLUDEDIR'}\n" if @include_files or @include_dirs;
-	print MF "\tmkdir -p $vars{'LIBDIR'}\n" if @static_libraries or @shared_libraries;
-	print MF "\tmkdir -p $vars{'LIBDIR'}/pkgconfig\n" if @pkgconfig;
-	print MF "\tmkdir -p $vars{'MANDIR'}\n" if @man_pages;
+	print MF "\tmkdir -p \${DESTDIR}$vars{'BINDIR'}\n" if @binaries;
+	print MF "\tmkdir -p \${DESTDIR}$vars{'INCLUDEDIR'}\n" if @include_files or @include_dirs;
+	print MF "\tmkdir -p \${DESTDIR}$vars{'LIBDIR'}\n" if @static_libraries or @shared_libraries;
+	print MF "\tmkdir -p \${DESTDIR}$vars{'LIBDIR'}/pkgconfig\n" if @pkgconfig;
+	print MF "\tmkdir -p \${DESTDIR}$vars{'MANDIR'}\n" if @man_pages;
 
 	foreach my $binary (@binaries) {
-	    print MF "\tcp $binary->[0] $vars{'BINDIR'}/$binary->[1]\n";
-	    print MF "\tchmod 755 $vars{'BINDIR'}/$binary->[1]\n";
+	    print MF "\tinstall $binary->[0] \${DESTDIR}$vars{'BINDIR'}/$binary->[1]\n";
+	    print MF "\tchmod 755 \${DESTDIR}$vars{'BINDIR'}/$binary->[1]\n";
 	}
 
 	foreach my $pc (@pkgconfig) {
-	    print MF "\tcp $pc $vars{'LIBDIR'}/pkgconfig/$pc\n";
-	    print MF "\tchmod 644 $vars{'LIBDIR'}/pkgconfig/$pc\n";
+	    print MF "\tinstall $pc \${DESTDIR}$vars{'LIBDIR'}/pkgconfig/$pc\n";
+	    print MF "\tchmod 644 \${DESTDIR}$vars{'LIBDIR'}/pkgconfig/$pc\n";
 	}
 
 	foreach my $directory (@include_dirs) {
-	    print MF "\tmkdir -p $vars{'INCLUDEDIR'}/$directory->[1]\n";
-	    print MF "\tcp -r $directory->[0]/* $vars{'INCLUDEDIR'}/$directory->[1]\n";
-	    print MF "\tfind $vars{'INCLUDEDIR'}/$directory->[1] -type d | xargs chmod 755\n";
-	    print MF "\tfind $vars{'INCLUDEDIR'}/$directory->[1] -type f | xargs chmod 644\n";
+	    print MF "\tmkdir -p \${DESTDIR}$vars{'INCLUDEDIR'}/$directory->[1]\n";
+	    print MF "\tinstall $directory->[0]/* \${DESTDIR}$vars{'INCLUDEDIR'}/$directory->[1]\n";
+	    print MF "\tfind \${DESTDIR}$vars{'INCLUDEDIR'}/$directory->[1] -type d | xargs chmod 755\n";
+	    print MF "\tfind \${DESTDIR}$vars{'INCLUDEDIR'}/$directory->[1] -type f | xargs chmod 644\n";
 	}
 
 	foreach my $file (@include_files) {
-	    print MF "\tcp $file->[0] $vars{'INCLUDEDIR'}/$file->[1]\n";
-	    print MF "\tchmod 644 $vars{'INCLUDEDIR'}/$file->[1]\n";
+	    print MF "\tinstall $file->[0] \${DESTDIR}$vars{'INCLUDEDIR'}/$file->[1]\n";
+	    print MF "\tchmod 644 \${DESTDIR}$vars{'INCLUDEDIR'}/$file->[1]\n";
 	}
 
 	foreach my $library (@static_libraries) {
 	    my $libname = "$static_lib_prefix$library->[1]$static_lib_extension";
-	    print MF "\tcp $library->[0]/$libname $vars{'LIBDIR'}/$libname\n";
-	    print MF "\tchmod 755 $vars{'LIBDIR'}/$libname\n";
+	    print MF "\tinstall $library->[0]/$libname \${DESTDIR}$vars{'LIBDIR'}/$libname\n";
+	    print MF "\tchmod 755 \${DESTDIR}$vars{'LIBDIR'}/$libname\n";
 	}
 
 	foreach my $library (@shared_libraries) {
@@ -595,18 +595,18 @@
 
 	    chomp($major_name); clean($major_name);
 
-	    print MF "\tcp $library->[0]/$libname $vars{'LIBDIR'}/$major_name\n";
-	    print MF "\tchmod 755 $vars{'LIBDIR'}/$major_name\n";
-	    print MF "\trm -f $vars{'LIBDIR'}/$libname\n";
-	    print MF "\t(cd $vars{'LIBDIR'}; ln -s $major_name $libname)\n";
+	    print MF "\tinstall $library->[0]/$libname \${DESTDIR}$vars{'LIBDIR'}/$major_name\n";
+	    print MF "\tchmod 755 \${DESTDIR}$vars{'LIBDIR'}/$major_name\n";
+	    print MF "\trm -f \${DESTDIR}$vars{'LIBDIR'}/$libname\n";
+	    print MF "\t(cd \${DESTDIR}$vars{'LIBDIR'}; ln -s $major_name $libname)\n";
 	}
 
 	foreach my $manpage (@man_pages) {
 	    my $file = basename($manpage->[1]);
 
-	    print MF "\tmkdir -p $vars{'MANDIR'}/man$manpage->[0]\n";
-	    print MF "\tcp $manpage->[1] $vars{'MANDIR'}/man$manpage->[0]\n";
-	    print MF "\tchmod 644 $vars{'MANDIR'}/man$manpage->[0]/$file\n";
+	    print MF "\tmkdir -p \${DESTDIR}$vars{'MANDIR'}/man$manpage->[0]\n";
+	    print MF "\tinstall $manpage->[1] \${DESTDIR}$vars{'MANDIR'}/man$manpage->[0]\n";
+	    print MF "\tchmod 644 \${DESTDIR}$vars{'MANDIR'}/man$manpage->[0]/$file\n";
 	}
 
 	print MF "\n";
