2006-04-16 Stepan Kasal * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle --recheck before opening config.log, to avoid hitting a bug on MinGW. Index: lib/autoconf/status.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v retrieving revision 1.95 diff -u -r1.95 status.m4 --- lib/autoconf/status.m4 12 Apr 2006 20:40:21 -0000 1.95 +++ lib/autoconf/status.m4 16 Apr 2006 17:59:35 -0000 @@ -1270,6 +1270,21 @@ ac_configure_extra_args="$ac_configure_extra_args --silent" fi +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# Handle the --recheck before opening config.log, which would be soon +# truncated by $[0] anyway. +# This also prevents a bug on MinGW, where the system would refuse to +# truncate config.log at the beginning of $[0]. +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $[0] " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$[0]" $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF dnl Open the log: m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl exec AS_MESSAGE_LOG_FD>>config.log @@ -1281,12 +1296,6 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $[0] " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$[0]" $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi m4_ifdef([_AC_OUTPUT_COMMANDS_INIT], [# # INIT-COMMANDS