From: Eric Blake Date: Thu, 25 Feb 2010 21:06:38 +0000 (-0700) Subject: Document that Autoconf relies on IFS. X-Git-Tag: v2.66~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41ec811b56c743df922240de92b308973e161e37;p=thirdparty%2Fautoconf.git Document that Autoconf relies on IFS. * doc/autoconf.texi (Special Shell Variables) : Add details about use of IFS within configure script. * THANKS: Update. Reported by Arkadiusz Miskiewicz. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 609d3afa..6afb90ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-02-26 Eric Blake + Document that Autoconf relies on IFS. + * doc/autoconf.texi (Special Shell Variables) : Add details + about use of IFS within configure script. + * THANKS: Update. + Reported by Arkadiusz Miskiewicz. + Recommend latest m4 release. * README: Bump recommendation to m4 1.4.14 (minimum remains 1.4.6). diff --git a/THANKS b/THANKS index 8f90e90e..16dd8a31 100644 --- a/THANKS +++ b/THANKS @@ -38,6 +38,7 @@ Andrew Church achurch@achurch.org Andrey Simonenko simon@comsys.ntu-kpi.kiev.ua Andris Pavenis andris.pavenis@iki.fi Anthony N. Frasso afrasso@yahoo.com +Arkadiusz Miskiewicz arekm@maven.pl Art Haas ahaas@neosoft.com Arto C. Nirkko ? Artur Frysiak wiget@pld.org.pl diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 3709b027..a669d06a 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -15715,18 +15715,24 @@ Long ago, shell scripts inherited @env{IFS} from the environment, but this caused many problems so modern shells ignore any environment settings for @env{IFS}. -Don't set the first character of @code{IFS} to backslash. Indeed, +Don't set the first character of @env{IFS} to backslash. Indeed, Bourne shells use the first character (backslash) when joining the components in @samp{"$@@"} and some shells then reinterpret (!)@: the backslash escapes, so you can end up with backspace and other strange characters. -The proper value for @code{IFS} (in regular code, not when performing +The proper value for @env{IFS} (in regular code, not when performing splits) is @samp{@key{SPC}@key{TAB}@key{RET}}. The first character is especially important, as it is used to join the arguments in @samp{$*}; however, note that traditional shells, but also bash-2.04, fail to adhere to this and join with a space anyway. +M4sh guarantees that @env{IFS} will have the default value at the +beginning of a script, and many macros within autoconf rely on this +setting. It is okay to use blocks of shell code that temporarily change +the value of @env{IFS} in order to split on another character, but +remember to restore it before expanding further macros. + @item LANG @itemx LC_ALL @itemx LC_COLLATE