From: Akim Demaille Date: Thu, 23 Nov 2000 09:45:48 +0000 (+0000) Subject: Move Autotest on top of M4sh. X-Git-Tag: autoconf-2.50~406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9e30cc83a4924471c607f1bf53afe5dc9d08bed;p=thirdparty%2Fautoconf.git 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. --- diff --git a/ChangeLog b/ChangeLog index c662ec4e0..a634b3b10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2000-11-23 Akim Demaille + + 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 * acgeneral.m4 (_AC_RUN_IFELSE): `==' in test is not portable, diff --git a/autoconf.m4 b/autoconf.m4 index 718985852..712c212e4 100644 --- a/autoconf.m4 +++ b/autoconf.m4 @@ -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]) diff --git a/lib/autoconf/autoconf.m4 b/lib/autoconf/autoconf.m4 index 718985852..712c212e4 100644 --- a/lib/autoconf/autoconf.m4 +++ b/lib/autoconf/autoconf.m4 @@ -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]) diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 1387b7541..26fa9d51a 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -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 diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index c205d9b85..7575ecf74 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/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. diff --git a/m4sh.m4 b/m4sh.m4 index c205d9b85..7575ecf74 100644 --- 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. diff --git a/tests/Makefile.am b/tests/Makefile.am index 434dd8d18..296f79cd6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/Makefile.in b/tests/Makefile.in index 036c9c2f7..1ebaab384 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4 index 1387b7541..26fa9d51a 100644 --- a/tests/atgeneral.m4 +++ b/tests/atgeneral.m4 @@ -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 diff --git a/tests/atspecific.m4 b/tests/atspecific.m4 index 0d94244ff..1dbbf69e3 100644 --- a/tests/atspecific.m4 +++ b/tests/atspecific.m4 @@ -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])])]) - ## ---------------------------------------- ## diff --git a/tests/base.at b/tests/base.at index 86c7eff4c..baf51d7b6 100644 --- a/tests/base.at +++ b/tests/base.at @@ -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]) diff --git a/tests/m4sh.at b/tests/m4sh.at index 15e743a36..732bfb1c8 100644 --- a/tests/m4sh.at +++ b/tests/m4sh.at @@ -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]]*) ;; diff --git a/tests/m4sugar.at b/tests/m4sugar.at index 0f4ae6716..9b49c238d 100644 --- a/tests/m4sugar.at +++ b/tests/m4sugar.at @@ -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 diff --git a/tests/torture.at b/tests/torture.at index af8cd74f7..4f2164a8c 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -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 ])])