2010-07-21 Eric Blake <eblake@redhat.com>
+ Avoid spurious testsuite failures.
+ * doc/autoconf.texi (Generating Sources): Don't mix gcc '-E' and
+ '-o -', since the former already implies stdout, while the latter
+ creates -.exe on cygwin.
+ * tests/compile.at (AC_LANG_SOURCE example)
+ (AC_LANG_PROGRAM example): Likewise. Also prevent any config.site
+ interference.
+
Partially revert previous patch.
* lib/autotest/general.m4 (AT_INIT) <serial testing>: Changing
at_jobs here breaks output if -j2 was requested but shell is
AC_LANG([C])
AC_LANG_CONFTEST(
[AC_LANG_SOURCE([[const char hw[] = "Hello, World\n";]])])
-gcc -E -dD -o - conftest.c
+gcc -E -dD conftest.c
@end example
@noindent
AC_LANG_CONFTEST(
[AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]],
[[fputs (hw, stdout);]])])
-gcc -E -dD -o - conftest.c
+gcc -E -dD conftest.c
@end example
@noindent
AT_SETUP([AC_LANG_SOURCE example])
+# Set CONFIG_SITE to a nonexistent file, so that there are
+# no worries about configure output caused by sourcing a config.site.
+CONFIG_SITE=no-such-file
+export CONFIG_SITE
+
AT_DATA([configure.ac],
[[# Taken from autoconf.texi:Generating Sources.
# The only change is to not fail if gcc doesn't work.
AC_LANG([C])
AC_LANG_CONFTEST(
[AC_LANG_SOURCE([[const char hw[] = "Hello, World\n";]])])
-gcc -E -dD -o - conftest.c || AS_EXIT([77])
+gcc -E -dD conftest.c || AS_EXIT([77])
]])
AT_CHECK_AUTOCONF
AT_SETUP([AC_LANG_PROGRAM example])
+# Set CONFIG_SITE to a nonexistent file, so that there are
+# no worries about configure output caused by sourcing a config.site.
+CONFIG_SITE=no-such-file
+export CONFIG_SITE
+
AT_DATA([configure.ac],
[[# Taken from autoconf.texi:Generating Sources.
# The only change is to not fail if gcc doesn't work.
AC_LANG_CONFTEST(
[AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]],
[[fputs (hw, stdout);]])])
-gcc -E -dD -o - conftest.c || AS_EXIT([77])
+gcc -E -dD conftest.c || AS_EXIT([77])
]])
AT_CHECK_AUTOCONF