--- automake1.9-1.9.6/lib/Automake/FileUtils.pm.orig 2005-05-14 13:21:06.000000000 -0700 +++ automake1.9-1.9.6/lib/Automake/FileUtils.pm 2006-03-29 20:46:43.000000000 -0800 @@ -339,6 +339,16 @@ my ($dirname, $file_name) = @_; return 0 unless -f "$dirname/$file_name"; + # It's possible that the file name won't be a simple file name and + # instead will include a directory component. In that case, we have + # to figure out what the real directory is. + if ($file_name =~ m%/%) + { + my $partial_dir; + ($partial_dir, $file_name) = ($file_name =~ m%^(.*)/([^/]*)%); + $dirname = "$dirname/$partial_dir"; + } + # The file appears to exist, however it might be a mirage if the # system is case insensitive. Let's browse the directory and check # whether the file is really in. We maintain a cache of directories