]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoconf.sh: If the "allowed" pattern is not defined set it
authorPavel Roskin <proski@gnu.org>
Fri, 15 Dec 2000 19:23:16 +0000 (19:23 +0000)
committerPavel Roskin <proski@gnu.org>
Fri, 15 Dec 2000 19:23:16 +0000 (19:23 +0000)
to "^$".
* tests/tools.at (autoconf: forbidden tokens, basic): New test.
(autoconf: forbidden tokens): Renamed to ...
(autoconf: forbidden tokens, exceptions): ... this.

ChangeLog
autoconf.in
autoconf.sh
bin/autoconf.in
tests/tools.at

index b98e660f2ddfe44c441b2cca9ec945950717280e..47a20c5e938b5f2f627f3cb32c8790dd6f774c77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-12-15  Pavel Roskin  <proski@gnu.org>
+
+       * autoconf.sh: If the "allowed" pattern is not defined set it
+       to "^$".
+       * tests/tools.at (autoconf: forbidden tokens, basic): New test.
+       (autoconf: forbidden tokens): Renamed to ...
+       (autoconf: forbidden tokens, exceptions): ... this.
+
 2000-12-15  Akim Demaille  <akim@epita.fr>
 
        * aclang.m4 (AC_PROG_CXXCPP, AC_PROG_CPP): Require AC_PROG_CXX/CC.
index 4f8606b1920dd022268cbcdaeebdd072b52f263e..5e177f02ca6036e80d62d7d2b7afbadfdc9c78db 100644 (file)
@@ -327,6 +327,8 @@ case $task in
 
       while ((getline pattern < (tmp "/allowed.rx")) > 0)
         allowed = (allowed ? allowed "|" : "") pattern
+      if (!allowed)
+        allowed = "^$"
       close (tmp "/allowed.rx")
       if (verbose)
         errprint("$me: allowed: " allowed)
index 4f8606b1920dd022268cbcdaeebdd072b52f263e..5e177f02ca6036e80d62d7d2b7afbadfdc9c78db 100644 (file)
@@ -327,6 +327,8 @@ case $task in
 
       while ((getline pattern < (tmp "/allowed.rx")) > 0)
         allowed = (allowed ? allowed "|" : "") pattern
+      if (!allowed)
+        allowed = "^$"
       close (tmp "/allowed.rx")
       if (verbose)
         errprint("$me: allowed: " allowed)
index 4f8606b1920dd022268cbcdaeebdd072b52f263e..5e177f02ca6036e80d62d7d2b7afbadfdc9c78db 100644 (file)
@@ -327,6 +327,8 @@ case $task in
 
       while ((getline pattern < (tmp "/allowed.rx")) > 0)
         allowed = (allowed ? allowed "|" : "") pattern
+      if (!allowed)
+        allowed = "^$"
       close (tmp "/allowed.rx")
       if (verbose)
         errprint("$me: allowed: " allowed)
index 3c51bb40fd42270b5842761562862341b30adc7c..ee546a8ef892856e6ba88b81753dbcdc7fcbebd4 100644 (file)
@@ -190,7 +190,39 @@ AT_CLEANUP
 ## autoconf: forbidden tokens.  ##
 ## ---------------------------- ##
 
-AT_SETUP([autoconf: forbidden tokens])
+# autoconf: forbidden tokens, basic
+# ---------------------------------
+AT_SETUP([autoconf: forbidden tokens, basic])
+
+AT_DATA([configure.in],
+[[AC_PLAIN_SCRIPT()dnl
+AC_FOO
+_AC_BAR
+m4_foo
+_m4_bar
+BAC_FOO
+B_AC_FOO
+AS_FOO
+_AS_BAR
+]])
+
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir 2>err], 1)
+# The output of autoconf is not deterministic here because it
+# uses `for (ind in array)'.  So be sure to have a unique representation.
+AT_CHECK([sort <err], 0,
+[[configure.in:2: error: undefined macro: AC_FOO
+configure.in:3: error: undefined macro: _AC_BAR
+configure.in:4: error: undefined macro: m4_foo
+configure.in:7: error: undefined macro: B_AC_FOO
+configure.in:8: error: undefined macro: AS_FOO
+]])
+
+AT_CLEANUP(configure err)
+
+
+# autoconf: forbidden tokens, exceptions
+# --------------------------------------
+AT_SETUP([autoconf: forbidden tokens, exceptions])
 
 AT_DATA([configure.in],
 [[AC_PLAIN_SCRIPT()dnl