[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
/floppy/ac-patches/91-fyi-as-echo-n.patch
From: |
Akim Demaille |
Subject: |
/floppy/ac-patches/91-fyi-as-echo-n.patch |
Date: |
Thu, 13 Sep 2001 08:55:49 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
Test suites can be run independently of configure.
* lib/m4sugar/m4sh.m4 (_AS_ECHO, _AS_ECHO_N_PREPARE): New.
* lib/autoconf/programs.m4 (_AC_PROG_ECHO): Remove.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Adjust: AC_SUBST
ECHO_N etc.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't ask for at_n
and at_c.
* lib/autotest/general.m4: Use ECHO_*.
Index: lib/autoconf/autotest.m4
--- lib/autoconf/autotest.m4 Sun, 09 Sep 2001 20:51:26 +0200 akim
+++ lib/autoconf/autotest.m4 Wed, 12 Sep 2001 17:42:14 +0200 akim
@@ -70,9 +70,6 @@ AC_DEFUN([AC_CONFIG_TESTDIR],
at_package_string='$at_package_string'
at_bugreport='$at_bugreport'
-at_n='$at_n'
-at_c='$at_c'
-
at_testdir='$1'
srcdir='$ac_srcdir'
top_srcdir='$ac_top_srcdir'
@@ -87,9 +84,6 @@ AC_DEFUN([AC_CONFIG_TESTDIR],
at_package_version='$PACKAGE_VERSION'
at_package_string='$PACKAGE_STRING'
at_bugreport='$PACKAGE_BUGREPORT'
-
-at_n='$ECHO_N'
-at_c='$ECHO_C'
at_shell='$SHELL'
])
Index: lib/autoconf/general.m4
--- lib/autoconf/general.m4 Sun, 09 Sep 2001 20:38:28 +0200 akim
+++ lib/autoconf/general.m4 Wed, 12 Sep 2001 17:41:45 +0200 akim
@@ -518,8 +518,8 @@ AC_DEFUN([AC_PREFIX_PROGRAM],
m4_pushdef([AC_Prog], m4_toupper([$1]))dnl
if test "x$prefix" = xNONE; then
dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
- echo $ECHO_N "checking for prefix by $ECHO_C" >&AS_MESSAGE_FD
- AC_PATH_PROG(m4_quote(AC_Prog), [$1])
+ _AS_ECHO_N([checking for prefix by])
+ AC_PATH_PROG(AC_Prog, [$1])
if test -n "$ac_cv_path_[]AC_Prog"; then
prefix=`AS_DIRNAME(["$ac_cv_path_[]AC_Prog"])`
fi
@@ -1240,11 +1240,12 @@ m4_define([_AC_INIT_PREPARE],
_AC_ARG_VAR_PRECIOUS([target_alias])dnl
AC_LANG_PUSH(C)
-_AC_PROG_ECHO()dnl
-
dnl Substitute for predefined variables.
-AC_SUBST(DEFS)dnl
-AC_SUBST(LIBS)dnl
+AC_SUBST([DEFS])dnl
+AC_SUBST([ECHO_C])dnl
+AC_SUBST([ECHO_N])dnl
+AC_SUBST([ECHO_T])dnl
+AC_SUBST([LIBS])dnl
m4_divert_pop([INIT_PREPARE])dnl
])# _AC_INIT_PREPARE
@@ -1797,7 +1798,7 @@ m4_define([AC_CACHE_VAL],
[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
[where no actions should be taken])])dnl
AS_VAR_SET_IF([$1],
- [echo $ECHO_N "(cached) $ECHO_C" >&AS_MESSAGE_FD],
+ [_AS_ECHO_N([(cached)])],
[$2])])
@@ -1931,19 +1932,11 @@ m4_define([AC_WARNING],
## ---------------------------------------- ##
-# _AC_ECHO_N(STRING, [FD = AS_MESSAGE_FD])
-# ------------------------------------
-# Same as _AS_ECHO, but echo doesn't return to a new line.
-m4_define([_AC_ECHO_N],
-[echo $ECHO_N "_AS_QUOTE([$1])$ECHO_C" >&m4_default([$2],
- [AS_MESSAGE_FD])])
-
-
# AC_MSG_CHECKING(FEATURE)
# ------------------------
m4_define([AC_MSG_CHECKING],
[_AS_ECHO([$as_me:__oline__: checking $1], AS_MESSAGE_LOG_FD)
-_AC_ECHO_N([checking $1... ])[]dnl
+_AS_ECHO_N([checking $1... ])[]dnl
])
Index: lib/autoconf/programs.m4
--- lib/autoconf/programs.m4 Sun, 09 Sep 2001 20:38:28 +0200 akim
+++ lib/autoconf/programs.m4 Wed, 12 Sep 2001 17:30:16 +0200 akim
@@ -256,28 +256,6 @@ AC_DEFUN([AC_PROG_AWK],
[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
-# _AC_PROG_ECHO
-# -------------
-# Check whether to use -n, \c, or newline-tab to separate
-# checking messages from result messages.
-# Don't try to cache, since the results of this macro are needed to
-# display the checking message. In addition, caching something used once
-# has little interest.
-# Idea borrowed from dist 3.0. Use `*c*,', not `*c,' because if `\c'
-# failed there is also a new-line to match.
-m4_define([_AC_PROG_ECHO],
-[case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-AC_SUBST(ECHO_C)dnl
-AC_SUBST(ECHO_N)dnl
-AC_SUBST(ECHO_T)dnl
-])# _AC_PROG_ECHO
-
-
# AC_PROG_INSTALL
# ---------------
AC_DEFUN([AC_PROG_INSTALL],
Index: lib/autotest/general.m4
--- lib/autotest/general.m4 Wed, 12 Sep 2001 16:03:50 +0200 akim
+++ lib/autotest/general.m4 Wed, 12 Sep 2001 17:37:39 +0200 akim
@@ -474,7 +474,7 @@ m4_define([AS_MESSAGE_LOG_FD], [6])
echo "$at_setup_line" >at-check-line
fi
at_test_count=`expr 1 + $at_test_count`
- $at_verbose $at_n "$at_test. $at_setup_line: $at_c"
+ $at_verbose $ECHO_N "$at_test. $at_setup_line: $ECHO_C"
case $at_status in
0) at_msg="ok"
;;
@@ -530,9 +530,9 @@ m4_define([AS_MESSAGE_LOG_FD], [6])
# Remove any debugging script resulting from a previous run.
rm -f debug-*.sh
echo
- echo $at_n "Writing \`debug-NN.sh' scripts, with NN =$at_c"
+ echo $ECHO_N "Writing \`debug-NN.sh' scripts, with NN =$ECHO_C"
for at_group in $at_fail_list; do
- echo $at_n " $at_group$at_c"
+ echo $ECHO_N " $at_group$ECHO_C"
( echo "#! /bin/sh"
echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$[0]" \
'-v -d' "$at_debug_args" "$at_group" '${1+"address@hidden"}'
@@ -619,7 +619,7 @@ m4_define([AT_ordinal], m4_incr(AT_ordin
AT_ordinal ) @%:@ AT_ordinal. AT_line: $1
at_setup_line='AT_line'
$at_verbose "AT_ordinal. AT_line: testing $1..."
- $at_quiet $at_n "m4_format([[%3d: %-18s]], AT_ordinal, AT_line)[]$at_c"
+ $at_quiet $ECHO_N "m4_format([[%3d: %-18s]], AT_ordinal, AT_line)[]$ECHO_C"
(
$at_traceon
])
Index: lib/m4sugar/m4sh.m4
--- lib/m4sugar/m4sh.m4 Sun, 09 Sep 2001 20:38:28 +0200 akim
+++ lib/m4sugar/m4sh.m4 Wed, 12 Sep 2001 17:44:01 +0200 akim
@@ -113,6 +113,7 @@ m4_define([_m4_divert(M4SH-INIT)],
dnl Moved here because the tests below can use AC_MSG_ERROR, which uses $as_me
as_me=`AS_BASENAME($[0])`
+_AS_ECHO_N_PREPARE
_AS_EXPR_PREPARE
_AS_LN_S_PREPARE
_AS_PATH_SEPARATOR_PREPARE
@@ -271,6 +272,33 @@ m4_define([_AS_QUOTE],
# Protect STRING from backquote expansion, echo the result to FD.
m4_define([_AS_ECHO],
[_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], [$2])])
+
+
+# _AS_ECHO_N_PREPARE
+# ------------------
+# Check whether to use -n, \c, or newline-tab to separate
+# checking messages from result messages.
+# Don't try to cache, since the results of this macro are needed to
+# display the checking message. In addition, caching something used once
+# has little interest.
+# Idea borrowed from dist 3.0. Use `*c*,', not `*c,' because if `\c'
+# failed there is also a new-line to match.
+m4_define([_AS_ECHO_N_PREPARE],
+[case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+])# _AS_ECHO_N_PREPARE
+
+
+# _AS_ECHO_N(STRING, [FD = AS_MESSAGE_FD])
+# ----------------------------------------
+# Same as _AS_ECHO, but echo doesn't return to a new line.
+m4_define([_AS_ECHO_N],
+[echo $ECHO_N "_AS_QUOTE([$1])$ECHO_C" >&m4_default([$2],
+ [AS_MESSAGE_FD])])
# AS_MESSAGE(STRING, [FD = AS_MESSAGE_FD])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- /floppy/ac-patches/91-fyi-as-echo-n.patch,
Akim Demaille <=