]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_OUTPUT): Close the descriptor before running
authorAkim Demaille <akim@epita.fr>
Fri, 20 Apr 2001 17:03:16 +0000 (17:03 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 20 Apr 2001 17:03:16 +0000 (17:03 +0000)
config.status so config.log is properly created on MS-DOS.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index bb64f7af7f806c6d1fe63580c85ce64b63899957..4d3b78fd60864d815cdca28c7658963f90d648d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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
index c053325d25fdeb289530122403e310bd35f746af..99f0887a1ac25a1ba7ff777b8bb0656cca5d138b 100644 (file)
@@ -3588,7 +3588,23 @@ ac_clean_files=$ac_clean_files_save
 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
index c053325d25fdeb289530122403e310bd35f746af..99f0887a1ac25a1ba7ff777b8bb0656cca5d138b 100644 (file)
@@ -3588,7 +3588,23 @@ ac_clean_files=$ac_clean_files_save
 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