config.status so config.log is properly created on MS-DOS.
+2001-04-20 Tim Van Holder <tim.van.holder@pandora.be>
+
+ * acgeneral.m4 (AC_OUTPUT): Close the descriptor before running
+ config.status so config.log is properly created on MS-DOS.
+
2001-04-20 Nicolas Joly <njoly@pasteur.fr>
* tests/atspecific.m4 (AT_CHECK_AUTOUPDATE): Be robust to missing
dnl Commands to run after config.status was created
AC_OUTPUT_COMMANDS_POST()dnl
-test "$no_create" = yes || $SHELL $CONFIG_STATUS || AS_EXIT([1])
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || AS_EXIT([1])
+fi
dnl config.status should not do recursion.
AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
])# AC_OUTPUT
dnl Commands to run after config.status was created
AC_OUTPUT_COMMANDS_POST()dnl
-test "$no_create" = yes || $SHELL $CONFIG_STATUS || AS_EXIT([1])
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || AS_EXIT([1])
+fi
dnl config.status should not do recursion.
AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
])# AC_OUTPUT