From 2c0a2e14f09a363d9fddd1d31147e84746069726 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 25 Feb 2010 14:06:38 -0700 Subject: [PATCH] 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 --- ChangeLog | 8 ++++++++ doc/autoconf.texi | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7caa93..fa477a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-02-25 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. + 2009-09-16 Eric Blake Optimize AC_REPLACE_FUNCS. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index e5cf9fd..8f44ffe 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -15715,18 +15715,24 @@ Special Shell Variables 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 @address@hidden@address@hidden 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 -- 1.6.6.1