* t/am-prog-cc-c-o.sh: In this test, by relying on the knowledge
that we are running under the aegis of the 'check-cc-no-c-o'
maintainer-specific target, knowledge given us by ...
* t/Makefile.in (check-cc-no-c-o) : ... the new environment
variable 'AM_TESTSUITE_SIMULATING_NO_CC_C_O', set to a value
of "yes" by this rule.
* t/ax/test-defs.in: Initialize the new variable to "no" by
default, and add an explanatory comment.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
# long discussion about automake bug#13378.
check-cc-no-c-o:
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+ AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes \
CC='$(abs_top_builddir)/%D%/ax/cc-no-c-o' \
GNU_CC='$(abs_top_builddir)/%D%/ax/cc-no-c-o'
.PHONY: check-cc-no-c-o
./configure >stdout || { cat stdout; exit 1; }
cat stdout
-$EGREP 'understands? -c and -o together.* yes$' stdout
+if test "$AM_TESTSUITE_SIMULATING_NO_CC_C_O" != no; then
+ $EGREP 'understands? -c and -o together.* no$' stdout
+else
+ $EGREP 'understands? -c and -o together.* yes$' stdout
+fi
# No repeated checks please.
test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
$MAKE
host_alias=${host_alias-'@host_alias@'}; export host_alias
build_alias=${build_alias-'@build_alias@'}; export build_alias
+# Whether the testsuite is being run by faking the presence of a C
+# compiler that doesn't grasp the '-c' and '-o' flags together. By
+# default, of course, it isn't.
+: "${AM_TESTSUITE_SIMULATING_NO_CC_C_O:=no}"
+
# A concurrency-safe "mkdir -p" implementation.
MKDIR_P=${AM_TESTSUITE_MKDIR_P-'@MKDIR_P@'}