--- config/install.pl.old	2011-04-25 09:32:26.052179167 -0700
+++ config/install.pl	2011-04-25 09:33:28.262180892 -0700
@@ -372,14 +372,15 @@
 
 if($cfg{TEXPATH}) {
   print "\nNote: trying to install LaTeX2HTML style files in TeX directory tree\n     ($cfg{TEXPATH})\n";
-  unless(mkpath($cfg{TEXPATH})) {
+  my $dest = $cfg{TEXPATH};
+  $dest = $ENV{'DESTDIR'}.$dest if($ENV{'DESTDIR'});
+  unless(mkpath($dest)) {
   #my $testpath = $cfg{TEXPATH}; # to strip (latex2)html
   #$testpath =~ s/[$dd$dd][^$dd$dd]*$//;
   #if((-d $cfg{TEXPATH} && !-w _) || (-d $testpath && !-w _)) {
     print STDERR "\nError: Cannot install LaTeX2HTML style files in $cfg{TEXPATH}\n";
   } else {
     my $dir = 'texinputs';
-    my $dest = $cfg{TEXPATH};
     unless(opendir(DIR,$dir)) {
       print STDERR qq{Error: Could not read directory "$dir": $!\n};
     } else {
