]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Move Autotest on top of M4sh.
authorAkim Demaille <akim@epita.fr>
Thu, 23 Nov 2000 09:45:48 +0000 (09:45 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 23 Nov 2000 09:45:48 +0000 (09:45 +0000)
* tests/atgeneral.m4: Import M4sh.
Adjust the differences on the names of the builtins (define etc.).
(AT_CASE): Remove, use m4_case.
(AT_SETUP): Don't use `AT_group_description', `$1' is OK.
* tests/atspecific.m4 (m4_for, m4_foreach): Remove, use those of
M4sugar.
* tests/m4sugar.at: Strengthen the quotation and adjust to the new
macro names.
* tests/m4sh.at: Ditto.
* tests/torture.at: Ditto.
* tests/base.at: Ditto.
* m4sh.m4: Import M4sugar.
* autoconf.m4: Don't import M4sugar, M4sh does.

14 files changed:
ChangeLog
autoconf.m4
lib/autoconf/autoconf.m4
lib/autotest/general.m4
lib/m4sugar/m4sh.m4
m4sh.m4
tests/Makefile.am
tests/Makefile.in
tests/atgeneral.m4
tests/atspecific.m4
tests/base.at
tests/m4sh.at
tests/m4sugar.at
tests/torture.at

index c662ec4e0414ea26ae21b130261123351ba7094e..a634b3b10b21867568c778a204933b1cee3586f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2000-11-23  Akim Demaille  <akim@epita.fr>
+
+       Move Autotest on top of M4sh.
+
+       * tests/atgeneral.m4: Import M4sh.
+       Adjust the differences on the names of the builtins (define etc.).
+       (AT_CASE): Remove, use m4_case.
+       (AT_SETUP): Don't use `AT_group_description', `$1' is OK.
+       * tests/atspecific.m4 (m4_for, m4_foreach): Remove, use those of
+       M4sugar.
+       * tests/m4sugar.at: Strengthen the quotation and adjust to the new
+       macro names.
+       * tests/m4sh.at: Ditto.
+       * tests/torture.at: Ditto.
+       * tests/base.at: Ditto.
+       * m4sh.m4: Import M4sugar.
+       * autoconf.m4: Don't import M4sugar, M4sh does.
+
 2000-11-20  Pavel Roskin  <proski@gnu.org>
 
        * acgeneral.m4 (_AC_RUN_IFELSE): `==' in test is not portable,
index 718985852fbd2dfac6f87c031d287a24c1422630..712c212e4584b4a91b4d22961615e21110568e41 100644 (file)
@@ -1,4 +1,4 @@
-include(m4sugar.m4)#                                        -*- Autoconf -*-
+include(m4sh.m4)#                                        -*- Autoconf -*-
 # This file is part of Autoconf.
 # Driver that loads the Autoconf macro files.
 # Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
@@ -24,8 +24,6 @@ include(m4sugar.m4)#                                        -*- Autoconf -*-
 # yet when Autoconf is frozen.
 # Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
 
-m4_include([m4sh.m4])
-
 m4_include([acversion.m4])
 m4_include([acgeneral.m4])
 m4_include([aclang.m4])
index 718985852fbd2dfac6f87c031d287a24c1422630..712c212e4584b4a91b4d22961615e21110568e41 100644 (file)
@@ -1,4 +1,4 @@
-include(m4sugar.m4)#                                        -*- Autoconf -*-
+include(m4sh.m4)#                                        -*- Autoconf -*-
 # This file is part of Autoconf.
 # Driver that loads the Autoconf macro files.
 # Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
@@ -24,8 +24,6 @@ include(m4sugar.m4)#                                        -*- Autoconf -*-
 # yet when Autoconf is frozen.
 # Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
 
-m4_include([m4sh.m4])
-
 m4_include([acversion.m4])
 m4_include([acgeneral.m4])
 m4_include([aclang.m4])
index 1387b7541d37a0f96e1de3ffcb6cf1abe88bba65..26fa9d51ac0f71c05af311edf1435563f8241568 100644 (file)
@@ -1,6 +1,6 @@
-divert(-1)                                                 -*- Autoconf -*-
+include(m4sh.m4)                                           -*- Autoconf -*-
 # `m4' macros used in building test suites.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright 2000 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,48 +45,12 @@ divert(-1)                                              -*- Autoconf -*-
 # any notice of this special exception to the GPL from your modified
 # version.
 
-changequote()
-changequote([, ])
-
-define([AT_DEFINE], defn([define]))
-define([AT_EVAL], defn([eval]))
-define([AT_FORMAT], defn([format]))
-define([AT_INCLUDE], defn([include]))
-define([AT_SHIFT], defn([shift]))
-define([AT_UNDEFINE], defn([undefine]))
-
-undefine([define])
-undefine([eval])
-undefine([format])
-undefine([include])
-undefine([shift])
-undefine([undefine])
-
-
-# AT_CASE(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
-# -----------------------------------------------------------
-# m4 equivalent of
-# switch (SWITCH)
-# {
-#   case VAL1:
-#     IF-VAL1;
-#     break;
-#   case VAL2:
-#     IF-VAL2;
-#     break;
-#   ...
-#   default:
-#     DEFAULT;
-#     break;
-# }.
-# All the values are optional, and the macro is robust to active
-# symbols properly quoted.
-AT_DEFINE([AT_CASE],
-[ifelse([$#], 0, [],
-       [$#], 1, [],
-       [$#], 2, [$2],
-        [$1], [$2], [$3],
-        [AT_CASE([$1], AT_SHIFT(AT_SHIFT(AT_SHIFT($@))))])])
+
+m4_define([AT_DEFINE], m4_defn([m4_define]))
+m4_define([AT_INCLUDE], m4_defn([m4_include]))
+m4_define([AT_SHIFT], m4_defn([m4_shift]))
+m4_define([AT_UNDEFINE], m4_defn([m4_undefine]))
+
 
 
 # Use of diversions:
@@ -99,7 +63,7 @@ AT_DEFINE([AT_CASE],
 # -------
 # Return the current file sans directory, a colon, and the current line.
 AT_DEFINE([AT_LINE],
-[patsubst(__file__, ^.*/\(.*\), \1):__line__])
+[m4_patsubst(__file__, ^.*/\(.*\), \1):__line__])
 
 
 # AT_INIT(PROGRAM)
@@ -273,28 +237,27 @@ divert[]dnl
 # Start a group of related tests, all to be executed in the same subshell.
 # The group is testing what DESCRIPTION says.
 AT_DEFINE([AT_SETUP],
-[AT_DEFINE([AT_ordinal], AT_EVAL(AT_ordinal + 1))
-pushdef([AT_group_description], [$1])
-pushdef([AT_data_files], )
-pushdef([AT_data_expout], )
-pushdef([AT_data_experr], )
+[AT_DEFINE([AT_ordinal], m4_eval(AT_ordinal + 1))
+m4_pushdef([AT_data_files], )
+m4_pushdef([AT_data_expout], )
+m4_pushdef([AT_data_experr], )
 if $at_stop_on_error && test -n "$at_failed_list"; then :; else
 divert(1)[]dnl
   echo AT_LINE > at-check-line
   echo AT_LINE > at-setup-line
   if $at_verbose; then
-    echo 'testing AT_group_description'
+    echo 'testing $1'
     echo $at_n "     $at_c"
   fi
   if $at_verbose; then
     echo "AT_ordinal. $srcdir/AT_LINE..."
   else
-    echo $at_n "substr(AT_ordinal. $srcdir/AT_LINE                            , 0, 30)[]$at_c"
+    echo $at_n "m4_substr(AT_ordinal. $srcdir/AT_LINE                            , 0, 30)[]$at_c"
   fi
   if test -z "$at_skip_mode"; then
     (
 [#] Snippet (d[]AT_ordinal[](
-[#] Testing AT_group_description
+[#] Testing $1
 [#] Snippet )d[]AT_ordinal[])
 [#] Snippet (s[]AT_ordinal[](
 [#] starting from `AT_LINE'.
@@ -339,10 +302,10 @@ undivert(1)[]dnl
     rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr
   fi
 fi
-popdef([AT_data_experr])
-popdef([AT_data_expout])
-popdef([AT_data_files])
-popdef([AT_group_description])[]dnl
+m4_popdef([AT_data_experr])
+m4_popdef([AT_data_expout])
+m4_popdef([AT_data_files])
+m4_popdef([AT_group_description])[]dnl
 ])# AT_CLEANUP
 
 
@@ -372,7 +335,7 @@ $2[]_ATEOF
 # their content is not checked.
 AT_DEFINE([AT_CHECK],
 [$at_traceoff
-$at_verbose && echo "$srcdir/AT_LINE: patsubst([$1], [\([\"`$]\)], \\\1)"
+$at_verbose && echo "$srcdir/AT_LINE: m4_patsubst([$1], [\([\"`$]\)], \\\1)"
 echo AT_LINE > at-check-line
 $at_check_stds && exec 5>&1 6>&2 1>stdout 2>stderr
 $at_traceon
@@ -395,18 +358,18 @@ dnl Restore stdout to fd1 and stderr to fd2.
 dnl If not verbose, neutralize the output of diff.
   $at_verbose || exec 1>/dev/null 2>/dev/null
   at_failed=false;
-  AT_CASE([$4],
+  m4_case([$4],
           ignore, [$at_verbose && cat stderr;:],
           experr, [AT_DEFINE([AT_data_experr], [ experr])dnl
 $at_diff experr stderr || at_failed=:],
           [], [$at_diff empty stderr || at_failed=:],
-          [echo $at_n "patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr || at_failed=:])
-  AT_CASE([$3],
+          [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr || at_failed=:])
+  m4_case([$3],
           ignore, [$at_verbose && cat stdout;:],
           expout, [AT_DEFINE([AT_data_expout], [ expout])dnl
 $at_diff expout stdout || at_failed=:],
           [], [$at_diff empty stdout || at_failed=:],
-          [echo $at_n "patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout || at_failed=:])
+          [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout || at_failed=:])
   if $at_failed; then
     exit 1
   else
index c205d9b85b773af554216e428b017a31635adb7a..7575ecf74cee7ea482cf5ea569d39321f2108c21 100644 (file)
@@ -1,4 +1,4 @@
-divert(-1)#                                                  -*- Autoconf -*-
+include(m4sugar.m4)#                                        -*- Autoconf -*-
 # This file is part of Autoconf.
 # M4 sugar for common shell constructs.
 # Requires GNU M4 and M4sugar.
diff --git a/m4sh.m4 b/m4sh.m4
index c205d9b85b773af554216e428b017a31635adb7a..7575ecf74cee7ea482cf5ea569d39321f2108c21 100644 (file)
--- a/m4sh.m4
+++ b/m4sh.m4
@@ -1,4 +1,4 @@
-divert(-1)#                                                  -*- Autoconf -*-
+include(m4sugar.m4)#                                        -*- Autoconf -*-
 # This file is part of Autoconf.
 # M4 sugar for common shell constructs.
 # Requires GNU M4 and M4sugar.
index 434dd8d1849bfb747f67b62d53f48a907b3e0156..296f79cd6829625b5988e7295567f4e705afb8d3 100644 (file)
@@ -34,7 +34,7 @@ check-local: atconfig testsuite
        $(SHELL) testsuite
 
 testsuite: atgeneral.m4 atspecific.m4 $(SUITE)
-       $(M4) -I $(srcdir) atspecific.m4 suite.at | \
+       $(M4) -I $(srcdir) -I $(top_srcdir) atspecific.m4 suite.at | \
           sed -e 's/[  ]*$$//' | \
          sed -e '/^$$/N;/\n$$/D' > $@-tmp
        chmod +x $@-tmp
index 036c9c2f772502d682aa5068c1ae11e6c8230cb3..1ebaab384b32645a8cb61696b1edb981080f9ab5 100644 (file)
@@ -196,7 +196,7 @@ check-local: atconfig testsuite
        $(SHELL) testsuite
 
 testsuite: atgeneral.m4 atspecific.m4 $(SUITE)
-       $(M4) -I $(srcdir) atspecific.m4 suite.at | \
+       $(M4) -I $(srcdir) -I $(top_srcdir) atspecific.m4 suite.at | \
           sed -e 's/[  ]*$$//' | \
          sed -e '/^$$/N;/\n$$/D' > $@-tmp
        chmod +x $@-tmp
index 1387b7541d37a0f96e1de3ffcb6cf1abe88bba65..26fa9d51ac0f71c05af311edf1435563f8241568 100644 (file)
@@ -1,6 +1,6 @@
-divert(-1)                                                 -*- Autoconf -*-
+include(m4sh.m4)                                           -*- Autoconf -*-
 # `m4' macros used in building test suites.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright 2000 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,48 +45,12 @@ divert(-1)                                              -*- Autoconf -*-
 # any notice of this special exception to the GPL from your modified
 # version.
 
-changequote()
-changequote([, ])
-
-define([AT_DEFINE], defn([define]))
-define([AT_EVAL], defn([eval]))
-define([AT_FORMAT], defn([format]))
-define([AT_INCLUDE], defn([include]))
-define([AT_SHIFT], defn([shift]))
-define([AT_UNDEFINE], defn([undefine]))
-
-undefine([define])
-undefine([eval])
-undefine([format])
-undefine([include])
-undefine([shift])
-undefine([undefine])
-
-
-# AT_CASE(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
-# -----------------------------------------------------------
-# m4 equivalent of
-# switch (SWITCH)
-# {
-#   case VAL1:
-#     IF-VAL1;
-#     break;
-#   case VAL2:
-#     IF-VAL2;
-#     break;
-#   ...
-#   default:
-#     DEFAULT;
-#     break;
-# }.
-# All the values are optional, and the macro is robust to active
-# symbols properly quoted.
-AT_DEFINE([AT_CASE],
-[ifelse([$#], 0, [],
-       [$#], 1, [],
-       [$#], 2, [$2],
-        [$1], [$2], [$3],
-        [AT_CASE([$1], AT_SHIFT(AT_SHIFT(AT_SHIFT($@))))])])
+
+m4_define([AT_DEFINE], m4_defn([m4_define]))
+m4_define([AT_INCLUDE], m4_defn([m4_include]))
+m4_define([AT_SHIFT], m4_defn([m4_shift]))
+m4_define([AT_UNDEFINE], m4_defn([m4_undefine]))
+
 
 
 # Use of diversions:
@@ -99,7 +63,7 @@ AT_DEFINE([AT_CASE],
 # -------
 # Return the current file sans directory, a colon, and the current line.
 AT_DEFINE([AT_LINE],
-[patsubst(__file__, ^.*/\(.*\), \1):__line__])
+[m4_patsubst(__file__, ^.*/\(.*\), \1):__line__])
 
 
 # AT_INIT(PROGRAM)
@@ -273,28 +237,27 @@ divert[]dnl
 # Start a group of related tests, all to be executed in the same subshell.
 # The group is testing what DESCRIPTION says.
 AT_DEFINE([AT_SETUP],
-[AT_DEFINE([AT_ordinal], AT_EVAL(AT_ordinal + 1))
-pushdef([AT_group_description], [$1])
-pushdef([AT_data_files], )
-pushdef([AT_data_expout], )
-pushdef([AT_data_experr], )
+[AT_DEFINE([AT_ordinal], m4_eval(AT_ordinal + 1))
+m4_pushdef([AT_data_files], )
+m4_pushdef([AT_data_expout], )
+m4_pushdef([AT_data_experr], )
 if $at_stop_on_error && test -n "$at_failed_list"; then :; else
 divert(1)[]dnl
   echo AT_LINE > at-check-line
   echo AT_LINE > at-setup-line
   if $at_verbose; then
-    echo 'testing AT_group_description'
+    echo 'testing $1'
     echo $at_n "     $at_c"
   fi
   if $at_verbose; then
     echo "AT_ordinal. $srcdir/AT_LINE..."
   else
-    echo $at_n "substr(AT_ordinal. $srcdir/AT_LINE                            , 0, 30)[]$at_c"
+    echo $at_n "m4_substr(AT_ordinal. $srcdir/AT_LINE                            , 0, 30)[]$at_c"
   fi
   if test -z "$at_skip_mode"; then
     (
 [#] Snippet (d[]AT_ordinal[](
-[#] Testing AT_group_description
+[#] Testing $1
 [#] Snippet )d[]AT_ordinal[])
 [#] Snippet (s[]AT_ordinal[](
 [#] starting from `AT_LINE'.
@@ -339,10 +302,10 @@ undivert(1)[]dnl
     rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr
   fi
 fi
-popdef([AT_data_experr])
-popdef([AT_data_expout])
-popdef([AT_data_files])
-popdef([AT_group_description])[]dnl
+m4_popdef([AT_data_experr])
+m4_popdef([AT_data_expout])
+m4_popdef([AT_data_files])
+m4_popdef([AT_group_description])[]dnl
 ])# AT_CLEANUP
 
 
@@ -372,7 +335,7 @@ $2[]_ATEOF
 # their content is not checked.
 AT_DEFINE([AT_CHECK],
 [$at_traceoff
-$at_verbose && echo "$srcdir/AT_LINE: patsubst([$1], [\([\"`$]\)], \\\1)"
+$at_verbose && echo "$srcdir/AT_LINE: m4_patsubst([$1], [\([\"`$]\)], \\\1)"
 echo AT_LINE > at-check-line
 $at_check_stds && exec 5>&1 6>&2 1>stdout 2>stderr
 $at_traceon
@@ -395,18 +358,18 @@ dnl Restore stdout to fd1 and stderr to fd2.
 dnl If not verbose, neutralize the output of diff.
   $at_verbose || exec 1>/dev/null 2>/dev/null
   at_failed=false;
-  AT_CASE([$4],
+  m4_case([$4],
           ignore, [$at_verbose && cat stderr;:],
           experr, [AT_DEFINE([AT_data_experr], [ experr])dnl
 $at_diff experr stderr || at_failed=:],
           [], [$at_diff empty stderr || at_failed=:],
-          [echo $at_n "patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr || at_failed=:])
-  AT_CASE([$3],
+          [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr || at_failed=:])
+  m4_case([$3],
           ignore, [$at_verbose && cat stdout;:],
           expout, [AT_DEFINE([AT_data_expout], [ expout])dnl
 $at_diff expout stdout || at_failed=:],
           [], [$at_diff empty stdout || at_failed=:],
-          [echo $at_n "patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout || at_failed=:])
+          [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout || at_failed=:])
   if $at_failed; then
     exit 1
   else
index 0d94244ff7e563dcfdf5fc2f96ae5369c4bd13ea..1dbbf69e3bc6d3680dcce69cd0e117e0ce6dc0e0 100644 (file)
@@ -16,57 +16,8 @@ divert(-1)                                           -*- Autoconf -*-
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-## ------------------------------ ##
-## Setting up base layer macros.  ##
-## ------------------------------ ##
-
 include(atgeneral.m4)divert(-1)
 
-# Until the day Autotest, Ad'HoC and Autoconf share the same M4sugar, we
-# have to reinstall some m4 builtins that atgeneral.m4 undefined.
-AT_DEFINE([m4_shift],
-[builtin([shift], $@)])
-AT_DEFINE([m4_patsubst],
-[builtin([patsubst], $@)])
-AT_DEFINE([define],
-[builtin([define], $@)])
-
-
-# m4_for(VARIABLE, FROM, TO, EXPRESSION)
-# --------------------------------------
-# Expand EXPRESSION defining VARIABLE to FROM, FROM + 1, ..., TO.
-# Both limits are included.
-AT_DEFINE([m4_for],
-[pushdef([$1], [$2])_m4_for([$1], [$2], [$3], [$4])popdef([$1])])
-
-AT_DEFINE([_m4_for],
-[$4[]ifelse($1, [$3], [],
-            [define([$1], incr($1))_m4_for([$1], [$2], [$3], [$4])])])
-
-
-
-# m4_foreach(VARIABLE, LIST, EXPRESSION)
-# --------------------------------------
-# Expand EXPRESSION assigning to VARIABLE each value of the LIST
-# (LIST should have the form `[(item_1, item_2, ..., item_n)]'),
-# i.e. the whole list should be *quoted*.  Quote members too if
-# you don't want them to be expanded.
-#
-# This macro is robust to active symbols:
-#    define(active, ACTIVE)
-#    m4_foreach([Var], [([active], [b], [active])], [-Var-])end
-#    => -active--b--active-end
-define(m4_foreach,
-[pushdef([$1], [])_m4_foreach($@)popdef([$1])])
-
-dnl Low level macros used to define m4_foreach
-define(m4_car, [[$1]])
-define(_m4_foreach,
-[ifelse($2, [()], ,
-        [define([$1], [m4_car$2])$3[]_m4_foreach([$1],
-                                                 [(m4_shift$2)],
-                                                 [$3])])])
-
 
 
 ## ---------------------------------------- ##
index 86c7eff4c4c8b195d4c2a33e0784c5bc4a9f9522..baf51d7b66535fbdaea8569ecc4b2b0e73a373f2 100644 (file)
@@ -18,7 +18,7 @@ AT_SETUP([AC_REQUIRE: topological sort])
 AT_DATA(configure.in,
 [[define([REQUIRE_AND_CHECK],
 [AC_REQUIRE([$1])dnl
-test -z "$translit([$1], [A-Z], [a-z])" && AS_EXIT(1)])
+test -z "$m4_translit([$1], [A-Z], [a-z])" && AS_EXIT(1)])
 
 AC_DEFUN([TEST1],
 [REQUIRE_AND_CHECK([TEST2a])
index 15e743a3661f41f2e3d5692feec38ae3aa27f7c5..732bfb1c837cfd1c5bf1e9c9ab9069a5484b2989 100644 (file)
@@ -13,7 +13,7 @@ EOF
 
 # Build nested dirs.
 
-AT_SETUP([AS_DIRNAME & AS_DIRNAME_SED])
+AT_SETUP([[AS_DIRNAME & AS_DIRNAME_SED]])
 
 AT_DATA(configure.in,
 [[define([AS_DIRNAME_TEST],
@@ -62,9 +62,9 @@ AT_CLEANUP(configure)
 
 # Build nested dirs.
 
-AT_SETUP([AS_MKDIR_P])
+AT_SETUP([[AS_MKDIR_P]])
 
-AT_DATA(configure.in,
+AT_DATA([configure.in],
 [[AC_PLAIN_SCRIPT
 pwd=`pwd`
 set -e
@@ -96,7 +96,7 @@ AT_CLEANUP(configure 1 a)
 
 AT_SETUP([Negated classes in globbing])
 
-AT_DATA(configure.in,
+AT_DATA([configure.in],
 [[AC_PLAIN_SCRIPT
 case 'with!two!bangs' in
   *[[!a-z]]*) ;;
index 0f4ae67163deb831932edc192dfbc9c4c5909aa1..9b49c238dbd6ddc80b16c786df51545af200cbbf 100644 (file)
@@ -10,7 +10,7 @@ EOF
 ## m4_text_wrap.  ##
 ## -------------- ##
 
-AT_SETUP(m4_text_wrap)
+AT_SETUP([[m4_text_wrap]])
 
 # m4_text_wrap is used to display the help strings.  Also, check that
 # commas are not swallowed.  This can easily happen because of
@@ -59,7 +59,7 @@ AT_CLEANUP()
 ## m4_warn.  ##
 ## --------- ##
 
-AT_SETUP([m4_warn])
+AT_SETUP([[m4_warn]])
 
 # m4_text_wrap is used to display the help strings.  Also, check that
 # commas are not swallowed.  This can easily happen because of
index af8cd74f7fc2629cfd5b256b12190e638a2e67ac..4f2164a8c466066db225a287c0b334f99df63c5a 100644 (file)
@@ -212,10 +212,10 @@ AT_CLEANUP(configure config.status config.log config.cache config.h defs)
 dnl The value used as a big value for AC_DEFINE.
 dnl Don't use sh active chars here, below it is also used in a sh
 dnl assignment.
-define([Big_Value],
+m4_define([Big_Value],
 [This value should be long enough to torture the various limits of sed and other tools used by Autoconf.])
 
-define([DEFINE_Description],
+m4_define([DEFINE_Description],
 [Define to a long string if your `Autoconf' works properly.])
 
 
@@ -229,7 +229,7 @@ define([DEFINE_Description],
 # turned into ac_uummy during the construction of config.status.  Yes,
 # this is admittedly a bug, but it would be too hard to fix this.
 # There is really no point in AC_DEFINE a var named ac_d.*.
-define([AT_DUMMY_VAR],
+m4_define([AT_DUMMY_VAR],
 [ac_Dummy_[]m4_patsubst([000$1], [.*\(...\)$], [\1])])
 
 dnl This call was quite delicate to write because we didn't want to
@@ -239,23 +239,23 @@ dnl touch something.
 
 AT_SETUP([Torturing config.status])
 
-AT_DATA(dummy.in,
-[m4_for(AT_Count, 1, 100,
+AT_DATA([dummy.in],
+[m4_for([AT_Count], 1, 100, 1,
 [@AT_DUMMY_VAR(AT_Count)@
 ])])
 
 AT_DATA(configure.in,
-[AC_INIT
+[[AC_INIT
 AC_CONFIG_HEADERS(config.h:config.hin)
 AC_CONFIG_FILES(dummy)
-[define]([AC_DEFUBST_VALUE], Big_Value)
+m4_define]([AC_DEFUBST_VALUE], Big_Value)
 dnl The following 4 lines are a transfert from AT_DUMMY_VAR in Autotest
 dnl to AC_DUMMY_VAR in Autoconf.
-[define]([AC_DUMMY_VAR],
-changequote({{, }})dnl
-[defn({{AT_DUMMY_VAR}})]dnl
-changequote([, ]))
-m4_for(AT_Count, 1, 100,
+[m4_define]([AC_DUMMY_VAR],
+m4_changequote({{, }})dnl
+[m4_defn({{AT_DUMMY_VAR}})]dnl
+m4_changequote([, ]))
+m4_for(AT_Count, 1, 100, 1,
 [AC_DEFUBST(AT_Count)
 ])
 AC_OUTPUT
@@ -267,7 +267,7 @@ AT_CHECK([./configure], 0, ignore)
 
 # Checking that AC_DEFINE worked properly.
 AT_DATA(expout,
-[m4_for(AT_Count, 1, 100,
+[m4_for(AT_Count, 1, 100, 1,
 [
 /* DEFINE_Description */
 [#define] AT_DUMMY_VAR(AT_Count) "Big_Value"
@@ -276,7 +276,7 @@ AT_CHECK([sed -n -e '3,$ p' config.h], 0, expout)
 
 # Checking that AC_SUBST worked properly.
 AT_DATA(expout,
-[m4_for(AT_Count, 1, 100,
+[m4_for(AT_Count, 1, 100, 1,
 [Big_Value
 ])])