]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4 (AT_INIT): Undo recent changes
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Nov 2006 09:57:34 +0000 (09:57 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Nov 2006 09:57:34 +0000 (09:57 +0000)
that replaced echo with AS_ECHO where this wasn't necessary.
Problem reportd by Ralf Wildenhues.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Port to Solaris 7,
where "/usr/bin/printf '%s\n' S" dumps core if S is long.
This is Sun bug 4206210.  Problem reportd by Ralf Wildenhues.

ChangeLog
lib/autotest/general.m4
lib/m4sugar/m4sh.m4

index ab54924866598315a8d58c5384415a53e51fec0a..f46f4c55d63eb9db65a50b454e30fd1bdeff68ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-11-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/autotest/general.m4 (AT_INIT): Undo recent changes
+       that replaced echo with AS_ECHO where this wasn't necessary.
+       Problem reportd by Ralf Wildenhues.
+       * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Port to Solaris 7,
+       where "/usr/bin/printf '%s\n' S" dumps core if S is long.
+       This is Sun bug 4206210.  Problem reportd by Ralf Wildenhues.
+
 2006-11-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * lib/freeze.mk (GREP): Removed, no need to initialize this.
index 7f1d892ec78cf6d54474c715dafb1789a55b13d3..2ac95537728ce526c8c39f9f04d758bc4057dc59 100644 (file)
@@ -944,11 +944,11 @@ $at_skip_count tests were skipped." ;;
 esac
 
 if test $at_unexpected_count = 0; then
-  AS_ECHO(["$at_result"])
-  AS_ECHO(["$at_result"]) >&AS_MESSAGE_LOG_FD
+  echo "$at_result"
+  echo "$at_result" >&AS_MESSAGE_LOG_FD
 else
-  AS_ECHO(["ERROR: $at_result"]) >&2
-  AS_ECHO(["ERROR: $at_result"]) >&AS_MESSAGE_LOG_FD
+  echo "ERROR: $at_result" >&2
+  echo "ERROR: $at_result" >&AS_MESSAGE_LOG_FD
   {
     echo
     AS_BOX([Summary of the failures.])
@@ -1420,7 +1420,7 @@ m4_pushdef([at_reason],
 ))dnl
 dnl
 m4_ifval(m4_defn([at_reason]),
-[AS_ECHO(['Not enabling shell tracing (command contains ]m4_defn([at_reason])[)'])],
+[echo 'Not enabling shell tracing (command contains ]m4_defn([at_reason])[)'],
 [m4_bmatch([$1], [\$],
 dnl COMMANDS may contain parameter expansions; expand them at runtime.
 [case "AS_ESCAPE([$1], [`"\])" in
index d45aa2af9aa3f68285197b0d82e344477b87c09d..88db41908a45aaaadd508968eb36a1fc13b73956 100644 (file)
@@ -808,25 +808,34 @@ m4_defun([_AS_ECHO_PREPARE],
 [[as_nl='
 '
 export as_nl
-case `(printf %s foo) 2>/dev/null` in
-foo)
+# Printing a 2060-byte string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo
+if test "X`(printf %s $as_echo) 2>/dev/null`" = "X$as_echo"; then
   as_echo='printf %s\n'
-  as_echo_n='printf %s';;
-*)
-  as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-  as_echo_n_body='eval
-    arg=$1;
-    case $arg in
-    *"$as_nl"*)
-      expr "X$arg" : "X\\(.*\\)$as_nl";
-      arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-    esac;
-    expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-  '
-  export as_echo_body as_echo_n_body
+  as_echo_n='printf %s'
+else
+  if test "X`PATH=/usr/ucb; echo -n -n $as_echo`" = "X-n $as_echo"; then
+    as_echo_body='PATH=/usr/ucb; eval echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body X'
+  fi
+  export as_echo_body
   as_echo='sh -c $as_echo_body X'
-  as_echo_n='sh -c $as_echo_n_body X';;
-esac
+fi
 ]])# _AS_ECHO_PREPARE