Fix vg_perf to work with older Valgrind versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5833 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/perf/vg_perf.in b/perf/vg_perf.in
index 53ed6ff..c85ad0d 100644
--- a/perf/vg_perf.in
+++ b/perf/vg_perf.in
@@ -301,9 +301,12 @@
                 die "unknown tool $tool, please add to %toolnames\n";
 
             # Do the tool run(s).  Set both VALGRIND_LIB and VALGRIND_LIB_INNER
-            # in case this Valgrind was configured with --enable-inner.
+            # in case this Valgrind was configured with --enable-inner.  And
+            # also VALGRINDLIB, which was the old name for the variable, to
+            # allow comparison against old Valgrind versions (eg. 2.4.X).
             printf("  %s:", $toolnames{$tool});
-            my $vgsetup = "VALGRIND_LIB=$vgdir/.in_place "
+            my $vgsetup = "VALGRINDLIB=$vgdir/.in_place "
+                        . "VALGRIND_LIB=$vgdir/.in_place "
                         . "VALGRIND_LIB_INNER=$vgdir/.in_place ";
             my $vgcmd   = "$vgdir/coregrind/valgrind "
                         . "--command-line-only=yes --tool=$tool -q "