]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_FATAL): Use _AC_EXPANSION_STACK_DUMP.
authorAkim Demaille <akim@epita.fr>
Tue, 17 Oct 2000 08:36:20 +0000 (08:36 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 17 Oct 2000 08:36:20 +0000 (08:36 +0000)
(_AC_REQUIRE): Use AC_FATAL.

ChangeLog
NEWS
TODO
acgeneral.m4
lib/autoconf/general.m4
tests/syntax.m4

index a0fe65ccdb7a821718f22b2ef3c16cd85c3efd11..ec61e17eead52d136869bdc59f90c1afab62e2ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-17  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (AC_FATAL): Use _AC_EXPANSION_STACK_DUMP.
+       (_AC_REQUIRE): Use AC_FATAL.
+
 2000-10-17  Akim Demaille  <akim@epita.fr>
 
        Give a means to report where the macros have been defined in error
diff --git a/NEWS b/NEWS
index 0ca085ec826177cbc73ff0c0fb0c2a3031f78f27..edda2df64827517f4e4fdf32044e3838c2f9d196 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,11 @@ For autoconf, autoreconf, autoupdate, autoheader, autoscan and ifnames.
   configure to adapt for packages not using autoconf on case-insensitive
   filesystems.
 
+- Diagnostics
+  More errors are now caught (circular AC_REQUIRE dependencies,
+  AC_DEFINE in the action part of an AC_CACHE_CHECK, too many pops
+  etc.).  In addition, their location and call stack are given.
+
 ** autoupdate
 autoupdate is much more powerful, and is able to provide the glue code
 which might be needed to move from an old macro to its newer
diff --git a/TODO b/TODO
index 940093090e50bfe5fbda14dbc0e349d55301958e..c3c23d8f814aac78367f9413daeba2966e3cb84c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,23 +9,10 @@ these suggestions... their presence here doesn't imply my endorsement.
 
 * Autoconf 2.50
 
-** mktests.sh
-It should be adjusted so that when someone runs it with a failing
-egrep, the output files are touch'ed.
-
 ** AC_EXEEXT, AC_OBJEXT
 We need a good implementation.  As much as possible, they should not
 depend upon AC_EMXOS2 etc.
 
-** More tests
-Check that AC_REQUIRE circular dependencies are caught.
-
-** _AC_EXPANSION_STACK_DUMP
-Where ever AC_FATAL is used, we should call _AC_EXPANSION_STACK_DUMP.
-Try to see if we can use __FILE__ and __LINE__ in the stack: this
-would provide much more accurate error messages (but it might be
-costly...).
-
 ** --target & AC_ARG_PROGRAM
 Shouldn't *any* `program' be installed as `$target_alias-program' even
 if AC_ARG_PROGRAM is not called?  That would be much more predictable.
index 05548957e55c43bf4bff740538bdc6afdb58146d..e27961a9d6ab722099cacd6245e435fcd0ea4e1b 100644 (file)
@@ -655,9 +655,7 @@ define([_AC_REQUIRE],
 [pushdef([_AC_EXPANSION_STACK],
          m4_location[: $1 is required by...])dnl
 ifdef([_AC_EXPANDING($1)],
-      [m4_diagnose([AC_REQUIRE: circular dependency of $1])dnl
-_AC_EXPANSION_STACK_DUMP()dnl
-m4exit(1)])dnl
+      [AC_FATAL([AC_REQUIRE: circular dependency of $1])])dnl
 ifndef([_AC_DIVERT_DUMP],
     [AC_FATAL([AC_REQUIRE: cannot be used outside of an AC_DEFUN'd macro])])dnl
 AC_PROVIDE_IFELSE([$1],
@@ -2763,7 +2761,10 @@ define([AC_WARNING], [AC_DIAGNOSE([syntax], [$1])])
 
 # AC_FATAL(MESSAGE, [EXIT-STATUS])
 # --------------------------------
-define([AC_FATAL], [m4_fatal([$1], [$2])])
+define([AC_FATAL],
+[m4_diagnose([$1])
+_AC_EXPANSION_STACK_DUMP()
+m4exit(m4_default([$2], [1]))])
 
 
 
index 05548957e55c43bf4bff740538bdc6afdb58146d..e27961a9d6ab722099cacd6245e435fcd0ea4e1b 100644 (file)
@@ -655,9 +655,7 @@ define([_AC_REQUIRE],
 [pushdef([_AC_EXPANSION_STACK],
          m4_location[: $1 is required by...])dnl
 ifdef([_AC_EXPANDING($1)],
-      [m4_diagnose([AC_REQUIRE: circular dependency of $1])dnl
-_AC_EXPANSION_STACK_DUMP()dnl
-m4exit(1)])dnl
+      [AC_FATAL([AC_REQUIRE: circular dependency of $1])])dnl
 ifndef([_AC_DIVERT_DUMP],
     [AC_FATAL([AC_REQUIRE: cannot be used outside of an AC_DEFUN'd macro])])dnl
 AC_PROVIDE_IFELSE([$1],
@@ -2763,7 +2761,10 @@ define([AC_WARNING], [AC_DIAGNOSE([syntax], [$1])])
 
 # AC_FATAL(MESSAGE, [EXIT-STATUS])
 # --------------------------------
-define([AC_FATAL], [m4_fatal([$1], [$2])])
+define([AC_FATAL],
+[m4_diagnose([$1])
+_AC_EXPANSION_STACK_DUMP()
+m4exit(m4_default([$2], [1]))])
 
 
 
index b7a5dce9c227bae22a47e73bc50e1b02899d1bd9..3ae1c7597c9b07c5db4914a3bd0d660c9a9bf578 100644 (file)
@@ -13,12 +13,12 @@ AT_CHECK_MACRO([AC_ARG_ENABLE])
 AT_CHECK_MACRO([AC_ARG_PROGRAM])
 AT_CHECK_MACRO([AC_ARG_WITH])
 AT_CHECK_MACRO([AC_CANONICAL_TARGET])
-AT_CHECK_MACRO([AC_CHECK_TOOL_PREFIX])
-AT_CHECK_MACRO([AC_COMPILE_CHECK])
 AT_CHECK_MACRO([AC_C_BIGENDIAN])
 AT_CHECK_MACRO([AC_C_CHAR_UNSIGNED])
 AT_CHECK_MACRO([AC_C_CROSS])
+AT_CHECK_MACRO([AC_CHECK_TOOL_PREFIX])
 AT_CHECK_MACRO([AC_C_LONG_DOUBLE])
+AT_CHECK_MACRO([AC_COMPILE_CHECK])
 AT_CHECK_MACRO([AC_C_PROTOTYPES])
 AT_CHECK_MACRO([AC_C_STRINGIZE])
 AT_CHECK_MACRO([AC_DECL_SYS_SIGLIST])