From: Akim Demaille Date: Fri, 20 Apr 2001 17:38:22 +0000 (+0000) Subject: * tests/foreign.at (Libtool): Ignore configure's stderr. X-Git-Tag: autoconf-2.50~31 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=69b6065c22fb0c0cc99ff41a8e14f0513c33ce89;p=thirdparty%2Fautoconf.git * tests/foreign.at (Libtool): Ignore configure's stderr. --- diff --git a/ChangeLog b/ChangeLog index 4d3b78fd6..9dac53931 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-04-20 Akim Demaille + + * tests/foreign.at (Libtool): Ignore configure's stderr. + 2001-04-20 Tim Van Holder * acgeneral.m4 (AC_OUTPUT): Close the descriptor before running diff --git a/configure b/configure index d53fcc544..013dbaffa 100755 --- a/configure +++ b/configure @@ -2074,7 +2074,23 @@ EOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test "$no_create" = yes || $SHELL $CONFIG_STATUS || { (exit 1); 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 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>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 || { (exit 1); exit 1; } +fi # Report the state of this version of Autoconf if this is a beta. case 2.49e in diff --git a/tests/foreign.at b/tests/foreign.at index b509891ce..082b602d9 100644 --- a/tests/foreign.at +++ b/tests/foreign.at @@ -19,6 +19,9 @@ AT_CHECK([[libtoolize --version | egrep '1\.3(\.[0-4])?$' && exit 77]], # Using a configure.in, have libtoolize confess where libtool.m4 is. AT_DATA([configure.in], [[AC_INIT +# The other tests are relying on Autoconf's own copy of install-sh +# etc. via AC_CONFIG_AUX_DIR(..). Don't do that here, since we don't +# want libtoolize to pollute Autoconf's srcdir. AC_CONFIG_AUX_DIR(.) AC_PROG_LIBTOOL ]]) @@ -31,6 +34,9 @@ AT_CHECK([libtoolize | sed -n ["s,^.*\`\(/[^']*\)'.*,\1,p"]], AT_CHECK([grep . stdout], 0, [ignore]) AT_CHECK([test -f "`cat stdout`"]) +# libtoolize installed everything but install-sh... +touch install-sh + # Build the concatenation of libtool.m4 and configure.ac. cp `cat stdout` configure.in cat >>configure.in <<_EOF @@ -42,7 +48,14 @@ _EOF AT_CHECK_AUTOCONF -touch install-sh -AT_CHECK_CONFIGURE +# Ignore stderr, because ltconfig always loads the cache, which is +# /dev/null, and some shells choke on this. For instance with Bash +# 2.05, you get: +# +# loading cache /dev/null within ltconfig +# ./ltconfig: .: /dev/null: not a regular file +# +# But the script executes properly. +AT_CHECK_CONFIGURE([], [], [], [ignore]) AT_CLEANUP(install-sh ltconfig libtool at-path ltmain.sh config.guess config.sub)