about quoting the case statement, just in case.
* doc/autoconf.texi (Particular Programs) <AC_PROG_MKDIR_P>:
Document that ${MKDIR_P} understands --.
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the
comment.
+2006-05-31 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib/autoconf/general.m4 (_AC_DO_ECHO): Be even more conservative
+ about quoting the case statement, just in case.
+
+2006-05-31 Stepan Kasal <kasal@ucw.cz>
+
+ * doc/autoconf.texi (Particular Programs) <AC_PROG_MKDIR_P>:
+ Document that ${MKDIR_P} understands --.
+ * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the
+ comment.
+
2006-05-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): Guard against test
in M4sh}), but it sets an output variable intended for use in other
files, whereas @code{AS_MKDIR_P} is intended for use in scripts like
@command{configure}. Also, @code{AS_MKDIR_P} does not accept options,
-but @code{MKDIR_P} can use the @option{-m} option, e.g., a makefile might
-invoke @code{$(MKDIR_P) -m 0 dir} to create an inaccessible directory.
+but @code{MKDIR_P} supports the @option{-m} option, e.g., a makefile
+might invoke @code{$(MKDIR_P) -m 0 dir} to create an inaccessible
+directory, and conversely a makefile should use @code{$(MKDIR_P) --
+$(FOO)} if @var{FOO} might yield a value that begins with @samp{-}.
Finally, @code{AS_MKDIR_P} does not check for race condition
vulnerability, whereas @code{AC_PROG_MKDIR_P} does.
@end defmac
within a here-document. If the closing brace does not lie on the boundary,
the failure is silent and the variable expansion will be empty, otherwise
the shell will report a bad substitution. This bug can usually be worked
-around by omitting the braces: @code{$var}.
+around by omitting the braces: @code{$var}. The bug was fixed in
+@samp{ksh99g} (1998-04-30) but as of 2006 many operating systems were
+still shipping older versions with the bug.
Some shells can be extremely inefficient when there are a lot of
here-documents inside a single statement. For instance if your
dnl If the string contains '"', '`', or '\', then just echo it rather
dnl than expanding it. This is a hack, but it is safer, while also
dnl typically expanding simple substrings like '$CC', which is what we want.
+dnl
dnl The rest of this macro body is quoted, to work around misuses like
dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
-[case $ac_try in #(
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; #(
+dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
+dnl underquoting misuses, such as
+dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
+dnl We normally wouldn't bother with this kind of workaround for invalid code
+dnl but this change was put in just before Autoconf 2.60 and we wanted to
+dnl minimize the integration hassle.
+[case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\""]])