]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Test suites can be run independently of configure.
authorAkim Demaille <akim@epita.fr>
Thu, 13 Sep 2001 06:56:31 +0000 (06:56 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 13 Sep 2001 06:56:31 +0000 (06:56 +0000)
* 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_*.

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

index bac1858c007511c185c4f4f7bd2f205652a6f9cb..31226b8c64e73f5f3558a56ab52eaeeb9871c379 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-09-13  Akim Demaille  <akim@epita.fr>
+
+       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_*.
+
 2001-09-13  Akim Demaille  <akim@epita.fr>
 
        * bin/ifnames.in: Rewrite in Perl.
index f79e90b13d259cd2849c7bb3f8fcc41c661e57d2..085fe5208e27d504c41c779ba69de41556bc67dc 100644 (file)
@@ -72,9 +72,6 @@ at_package_version='$at_package_version'
 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'
@@ -90,9 +87,6 @@ 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 01410b1f82663d055ee4681d2e389914dcb7ed41..0f941e7e2876d0620988e2d988d72e2883f887dd 100644 (file)
@@ -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 @@ _AC_ARG_VAR_PRECIOUS([host_alias])dnl
 _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 8e7b2efd6fd4ad0a8d83d6718794672887c68bef..cce78736451c6ccbddf724210039d2cdd4b48d2b 100644 (file)
@@ -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 ada4acc37a8bba942c1d0d44bce30b74e115e346..267a8fcb0eab403c4209eb694ac1fb6c329178ec 100644 (file)
@@ -474,7 +474,7 @@ _ATEOF
        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 @@ elif test $at_debug = false; then
   # 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+"$[@]"}'
@@ -619,7 +619,7 @@ m4_divert_push([TESTS])dnl
   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 1d4b7c856e028ba92171c41c3a369fe4060eea40..18af9d79af4c810a001afb959be3ed57761cb390 100644 (file)
@@ -113,6 +113,7 @@ fi
 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
@@ -273,6 +274,33 @@ 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])
 # ----------------------------------------
 m4_define([AS_MESSAGE],