Bug #1294406 “0.50.2: configure should honour the DIFF variable ...” : Bugs : intltool (original) (raw)
On some OS versions, diff(1) doesn't have '-u' by default, so we install the GNU coreutils version and gain it that way.
intltools 0.50.2 doesn't have an option to tune which diff to use, so errors are seen during the tests:
host:/var/tmp/intltool-0.50.2/tests root# ./selftest
Running self test of the intltool module
1. Extract messages from simple desktop file: diff: illegal option -- u
usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
diff [-bitw] [-C number] file1 file2
diff [-bitw] [-D string] file1 file2
diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] directory1 directory2
[FAILED] (extract1.desktop)
2. Merge translations into a Bonobo UI style file: diff: illegal option -- u
usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
diff [-bitw] [-C number] file1 file2
diff [-bitw] [-D string] file1 file2
diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] directory1 directory2
[FAILED] (merge1.xml)
host:/var/tmp/intltool-0.50.2 root# env | grep DIFF
DIFF=/usr/local/bin/diff
host:/var/tmp/intltool-0.50.2 root# grep diff */*
tests/selftest: check_command_result("diff -u striptrailingcrstrip_trailing_cr striptrailingcrsrcdir/results/$testcase.h cases/$testcase.h", $testcase);
tests/selftest: check_command_result("diff -u striptrailingcrstrip_trailing_cr striptrailingcrsrcdir/results/$testcase cases/$testcase", $testcase);
tests/selftest: check_command_result("diff -u striptrailingcrstrip_trailing_cr striptrailingcrsrcdir/results/multi.$testcase language/language/language/testcase", $testcase);
Since selftest is generated by selftest.pl.in --> selftest.pl --> selftest, the configure script can easily have a --use-diff= or test for DIFF env variable.