> * [EMAIL PROTECTED] wrote on Tue, May 02, 2006 at 08:20:50AM CEST: > > > config.log:build_os='linux gnu' > > config.log:host='i686-pc-linux-gnu' > > config.log:host_os='linux gnu'
Darn. Although I still don't know how the above could possibly have happened with Autoconf-2.59c (as opposed to a slightly older CVS version), I know the current code isn't ok: the Solaris /bin/sh does not interpret ( set a b; sIFS=$IFS; IFS=-; h=$*; IFS=$sIFS; echo "$h") Posix-correctly and outputs "a b" instead of "a-b". Same with Tru64 non-Posix /bin/sh, but not with Solaris /bin/ksh nor with Tru64 /usr/bin/posix/sh [1]. So, in the default setting we don't expose the failure, as the better-shell search saves us, and without cross-compilation, the respective strings don't contain extra hyphens either, but I think it's still prudent to take measures anyway. OK to apply this fix which doesn't fork in the common case? :-) Cheers, Ralf [1] http://www.in-ulm.de/~mascheck/various/ifs/ has a nice overview. * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Cater for traditional shells like the Solaris one that do not use the first IFS character for assembling `$*'. Prompted by a related report from [EMAIL PROTECTED] Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.914 diff -u -r1.914 general.m4 --- lib/autoconf/general.m4 30 Apr 2006 17:04:06 -0000 1.914 +++ lib/autoconf/general.m4 2 May 2006 09:09:36 -0000 @@ -1677,9 +1677,12 @@ AC_SUBST([$1_cpu], [$[1]])dnl AC_SUBST([$1_vendor], [$[2]])dnl shift; shift -[# Remember, the first character of IFS is used to create $]*: -AC_SUBST([$1_os], [$[*]])dnl +[# Remember, the first character of IFS is used to create $]*, +# except with old shells: +$1_os=$[*] IFS=$ac_save_IFS +case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac +AC_SUBST([$1_os])dnl ])# _AC_CANONICAL_SPLIT
