Hello,

In trying to bootstrap a minimal environment, I ended up trying to run a
configure script using just busybox (specifically, Debian's
busybox-static).  This almost worked, except that the configure script
used diff several times.  configure just uses diff for its exit code, to
check for identical files.  The version of busybox-static in Debian
doesn't provide diff, but does provide cmp.

This issue manifested as configure complaining that it could not find a
usable grep, due to the test for grep using diff.

As far as I can tell, configure scripts never actually need the output
of diff; they just need a program that can detect whether files differ
and provide an appropriate exit status for use in conditionals.

Rather than unconditionally using diff, please consider detecting and
using an appropriate $ac_files_identical program; either diff or cmp
would work.  For that matter, such detection would also provide a good
opportunity to check for a working diff -q or cmp -s, which run faster
since they can stop at the first difference and don't have to generate
output.

- Josh Triplett

Reply via email to