|
From: <sv...@va...> - 2009-02-25 04:59:56
|
Author: njn
Date: 2009-02-25 04:59:50 +0000 (Wed, 25 Feb 2009)
New Revision: 9264
Log:
Merge r9263 (use 'diff -u' if supported) from the trunk.
Modified:
branches/DARWIN/configure.in
branches/DARWIN/tests/vg_regtest.in
Modified: branches/DARWIN/configure.in
===================================================================
--- branches/DARWIN/configure.in 2009-02-25 04:57:56 UTC (rev 9263)
+++ branches/DARWIN/configure.in 2009-02-25 04:59:50 UTC (rev 9264)
@@ -115,6 +115,23 @@
#esac
+# Check if 'diff' supports -u (universal diffs) and use it if possible.
+
+AC_MSG_CHECKING([for diff -u])
+AC_SUBST(DIFF)
+
+# Comparing two identical files results in 0, unless -u isn't supported (as
+# it's not on AIX).
+touch tmp-xxx;
+if diff -u tmp-xxx tmp-xxx ; then
+ AC_MSG_RESULT([yes])
+ DIFF="diff -u"
+else
+ AC_MSG_RESULT([no])
+ DIFF="diff"
+fi
+
+
# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
Modified: branches/DARWIN/tests/vg_regtest.in
===================================================================
--- branches/DARWIN/tests/vg_regtest.in 2009-02-25 04:57:56 UTC (rev 9263)
+++ branches/DARWIN/tests/vg_regtest.in 2009-02-25 04:59:50 UTC (rev 9264)
@@ -278,7 +278,7 @@
($f_exp eq "/dev/null") or die "Unexpected .exp file: $f_exp\n";
}
- mysystem("diff $f_exp $name.$mid.out > $name.$mid.diff$n");
+ mysystem("@DIFF@ $f_exp $name.$mid.out > $name.$mid.diff$n");
if (not -s "$name.$mid.diff$n") {
# A match; remove .out and any previously created .diff files.
|