From: Ralf Wildenhues Date: Tue, 6 May 2008 20:41:54 +0000 (+0200) Subject: Let AC_MSG_FAILURE report pwd. X-Git-Tag: v2.63~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bd87562dca6bcf5e0cf3f282782b9e0ee3df7b3;p=thirdparty%2Fautoconf.git 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. --- diff --git a/ChangeLog b/ChangeLog index e4de36e56..5af9cd029 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-12 Ralf Wildenhues + + 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 Enforce --help and --version compliance. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 57b48714a..0f8e32df9 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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 diff --git a/tests/torture.at b/tests/torture.at index 2a88f3695..c37dabae0 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -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