]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_DO_ECHO): Be even more conservative
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 May 2006 19:49:15 +0000 (19:49 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 May 2006 19:49:15 +0000 (19:49 +0000)
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.

ChangeLog
doc/autoconf.texi
lib/autoconf/general.m4

index 8224471d4904f436eb2f535be4877d99c045add3..71ebc4b7a9156da2a49498455207e43332e98238 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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
index 2afd9ab20c9b39d9d9e123700dd8e9d42ceb7cfb..59cb55dbc9249bec38a0db458f3109804f2d19e7 100644 (file)
@@ -3546,8 +3546,10 @@ This macro is related to the @code{AS_MKDIR_P} macro (@pxref{Programming
 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
@@ -10796,7 +10798,9 @@ expansion @code{$@{var@}} that crosses a 1024- or 4096-byte buffer boundary
 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
index 404891bc33462f56dc7b0e8dbc43d705454460b9..ec4039da9e7dae472c48b4b946ef665165195e72 100644 (file)
@@ -2152,11 +2152,18 @@ AC_DEFUN([_AC_DO_ECHO],
 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\""]])