From: Paul Eggert Date: Sat, 25 Nov 2006 09:57:34 +0000 (+0000) Subject: * lib/autotest/general.m4 (AT_INIT): Undo recent changes X-Git-Tag: AUTOCONF-2.61a~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab54e9780296b39678c7e53b5a29159138940a5d;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index ab549248..f46f4c55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-11-25 Paul Eggert + + * 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 * lib/freeze.mk (GREP): Removed, no need to initialize this. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 7f1d892e..2ac95537 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -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 diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index d45aa2af..88db4190 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -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