summaryrefslogtreecommitdiff
path: root/bin/autoreconf.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/autoreconf.in')
-rw-r--r--bin/autoreconf.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/autoreconf.in b/bin/autoreconf.in
index 2d427155..ccbd6c47 100644
--- a/bin/autoreconf.in
+++ b/bin/autoreconf.in
@@ -363,10 +363,13 @@ sub install_aux_file
or fatal "rm -f $dest: $!\n";
}
my $temp = new File::Temp (UNLINK => 0, DIR => $destdir);
- copy ($src, $temp)
- or fatal "copying $src to $temp: $!\n";
- make_executable ($temp) if -x $src;
- update_file ($temp, $dest, $force);
+ # Older Perls don't convert $temp to its filename
+ # in all the places we need it to.
+ my $tempname = $temp->filename;
+ copy ($src, $tempname)
+ or fatal "copying $src to $tempname: $!\n";
+ make_executable ($tempname) if -x $src;
+ update_file ($tempname, $dest, $force);
}
}