Thomas Roessler on Wed 3/03 21:35 +0100:
> Mutt 0.95.4 is out. This version should be considered BETA.
There is a bug in the `configure' script that comes with this
distribution.
1158 IFS="${IFS= . }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1159 for ac_dir in $PATH:/usr/sbin:/usr/lib$ac_dummy; do
1160 test -z "$ac_dir" && ac_dir=.
1161 if test -f $ac_dir/$ac_word; then
1162 ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1163 break
1164 fi
1165 done
1166 IFS="$ac_save_ifs"
This code is broken. According to SUS2, field splitting does not take
place on strings that are not otherwise expanded. In the second line
above, colons in $PATH do indeed cause the elements they delimit to
separate into distinct words, because expansion is performed. In the
rest of the string, however, the colons are not subject to IFS field
splitting because there is no expansion performed on them. Observe the
following code fed to /bin/sh:
IFS="${IFS}:"
PATH="~/bin:/bin:/usr/bin:/usr/local/bin"
for DIR in $PATH:/usr/sbin:/usr/lib; do
echo $DIR
done
whose execution results in
~/bin
/bin
/usr/bin
/usr/local/bin /usr/sbin /usr/lib
The last line is still split into spaces because it is expanded when
echoing $DIR, while $IFS is still set to include colons.
The results of this in line 1161 of `configure' are that `test' is given
too many arguments, and fails.
Note that, previous to bash-2.03 (to which my /bin/sh is a link), this
error was hidden by another bug in its "$@" expansion. It has been
fixed with the new release, and exposes this bug in the configure
script.
The fix would involve making `:/usr/sbin:/usr/lib' from line 1159 above
to be the value of a variable, defined before this line, and expanded in
the line instead of that string itself. While I am not familiar with
autoconf or m4, the attached patch for `configure.in' seems to produce a
correct `configure' script when `autoconf'ed.
--
Scott