+2006-08-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * doc/autoconf.texi (Limitations of Usual Tools): Document sed
+ problems with arg script text that doesn't end in newline, and
+ with '-e a...'. Problems reported by Ralf Wildenhues.
+
2006-08-12 Alexandre Julliard <julliard@winehq.org> (tiny change)
* lib/autoconf/libs.m4 (AC_PATH_X_DIRECT): Replace another
x
@end example
-The @option{-e} option is portable.
-Some people prefer to use it:
+The @option{-e} option is portable, so long as its argument
+does not begin with @samp{a}, @samp{c}, or @samp{i}
+(as this runs afoul of a Tru64 5.1 bug).
+Some people prefer to use @samp{-e}:
@example
sed -e '@var{command-1}' \
On the other hand, no white space is allowed between @samp{:} and the
subsequent label name.
-Some @command{sed} implementations (e.g., MacOS X 10.4, Solaris 10
+If a sed script is specified on the command line and ends in an
+@samp{a}, @samp{c}, or @samp{i} command, the last line of inserted text
+should be followed by a newline. Otherwise some @command{sed}
+implementations (e.g., OpenBSD 3.9) do not append a newline to the
+inserted text.
+
+Many @command{sed} implementations (e.g., MacOS X 10.4, OpenBSD 3.9, Solaris 10
@command{/usr/ucb/sed}) strip leading white space from the text of
@samp{a}, @samp{c}, and @samp{i} commands. Prepend a backslash to
work around this incompatibility with Posix:
@example
-$ @kbd{echo flushleft | sed -e 'a\}
-@kbd{ indented'}
+$ @kbd{echo flushleft | sed 'a\}
+> @kbd{ indented}
+> @kbd{'}
flushleft
indented
-$ @kbd{echo foo | sed -e 'a\}
-@kbd{\ indented'}
+$ @kbd{echo foo | sed 'a\}
+> @kbd{\ indented}
+> @kbd{'}
flushleft
indented
@end example