]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Let AC_MSG_FAILURE report pwd.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 6 May 2008 20:41:54 +0000 (22:41 +0200)
committerEric Blake <ebb9@byu.net>
Mon, 12 May 2008 13:57:20 +0000 (07:57 -0600)
* lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE):
Output $ac_pwd along with fatal failure.
* tests/torture.at (Deep Package): Extend test.
Reported numerous times against GCC, and probably other packages.

ChangeLog
lib/autoconf/general.m4
tests/torture.at

index e4de36e565f167b0ed4fc37e9c399158c6b2ca66..5af9cd029633fb6d6317daa675206596b72f29a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Let AC_MSG_FAILURE report pwd.
+       * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE):
+       Output $ac_pwd along with fatal failure.
+       * tests/torture.at (Deep Package): Extend test.
+       Reported numerous times against GCC, and probably other packages.
+
 2008-05-12  Eric Blake  <ebb9@byu.net>
 
        Enforce --help and --version compliance.
index 57b48714a138edde1687e0e360c1a3869bd4a8bc..0f8e32df93187b90c4e6e637a06ad0bb5d2c0b05 100644 (file)
@@ -1576,6 +1576,7 @@ for ac_var in $ac_precious_vars; do
   fi
 done
 if $ac_cache_corrupted; then
+  AS_MESSAGE([error: in `$ac_pwd':], 2)
   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
 fi])dnl
@@ -2166,8 +2167,9 @@ m4_copy([AS_WARN],    [AC_MSG_WARN])
 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
 m4_copy([AS_ERROR],   [AC_MSG_ERROR])
 m4_define([AC_MSG_FAILURE],
-[AC_MSG_ERROR([$1
-See `config.log' for more details.], [$2])])
+[{ AS_MESSAGE([error: in `$ac_pwd':], 2)
+AC_MSG_ERROR([$1
+See `config.log' for more details.], [$2]); }])
 
 
 # _AC_MSG_LOG_CONFTEST
index 2a88f3695ed40b5fb1818159cadb4b1d7942fe1b..c37dabae052a4073f1c71b42e9389dabaa684be0 100644 (file)
@@ -1275,6 +1275,9 @@ AT_DATA([inner/innermost/configure.in],
 AC_ARG_VAR([INNERMOST], [an innermost variable])
 AC_CONFIG_HEADERS(config.h:config.hin)
 AC_DEFINE_UNQUOTED([INNERMOST], [$INNERMOST], [an innermost variable])
+if test -n "$innermost_error"; then
+  AC_MSG_FAILURE([Error in $PACKAGE_NAME])
+fi
 AC_OUTPUT
 ]])
 
@@ -1324,6 +1327,14 @@ AT_CHECK([grep INNERMOST inner/innermost/config.h], 0,
 [[#define INNERMOST tsomrenni
 ]])
 
+# Ensure we point to the right config.log file for errors.
+AT_CHECK_CONFIGURE([innermost_error=:], [1], [], [stderr])
+AT_CHECK([grep 'inner/innermost' stderr], [], [ignore])
+cd inner
+AT_CHECK_CONFIGURE([innermost_error=:], [1], [], [stderr])
+AT_CHECK([grep 'innermost' stderr], [], [ignore])
+cd ..
+
 # The same, but from a builddir.
 AS_MKDIR_P([builddir])
 chmod a-w builddir inner/innermost inner