summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-26 13:30:52 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-26 13:30:52 +0200
commite5b40a3ee2c6fbc0cec34b0a96ac2dc74401205f (patch)
tree1c9a2ce62bbdaff247fe889912a51d42890d33a4
parent6f109602762dbb9648de169de01e6aaddd78a9ec (diff)
parentb2b6269fca6f7bb7adac2d09c02adf0c6b701d48 (diff)
downloadautomake-e5b40a3ee2c6fbc0cec34b0a96ac2dc74401205f.tar.gz
Merge branch 'prog-cc-c-o-work' into maint
* prog-cc-c-o-work: tests: some tests make no sense if "$CC -c -o" doesn't work AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logic compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents
-rw-r--r--NEWS29
-rwxr-xr-xgen-testsuite-part2
-rw-r--r--m4/ar-lib.m45
-rw-r--r--m4/init.m412
-rw-r--r--m4/prog-cc-c-o.m449
-rw-r--r--t/add-missing.tap6
-rw-r--r--t/am-prog-cc-c-o.sh65
-rw-r--r--t/ax/am-test-lib.sh5
-rwxr-xr-xt/ccnoco-deps.sh82
-rwxr-xr-xt/ccnoco-lib.sh73
-rwxr-xr-xt/ccnoco-lt.sh76
-rw-r--r--t/ccnoco.sh15
-rw-r--r--t/discover.sh2
-rw-r--r--t/link_cond.sh4
-rw-r--r--t/list-of-tests.mk3
-rw-r--r--t/subobj10.sh2
-rw-r--r--t/subpkg.sh2
17 files changed, 368 insertions, 64 deletions
diff --git a/NEWS b/NEWS
index 6f2f6152f..7b37b0ea0 100644
--- a/NEWS
+++ b/NEWS
@@ -107,16 +107,25 @@ New in 1.14:
- Automake will automatically enhance the AC_PROG_CC autoconf macro
to make it check, at configure time, that the C compiler supports
- the combined use of both the "-c -o" options. This "rewrite" of
- AC_PROG_CC is only meant to be temporary, since future Autoconf
- versions should provide all the features Automake needs.
-
- - The AM_PROG_CC_C_O is no longer useful, and its use is a no-op
- now. Future Automake versions might start warning that this
- macro is obsolete. For better backward-compatibility, this macro
- still sets a proper 'ac_cv_prog_cc_*_c_o' cache variable, and
- define the 'NO_MINUS_C_MINUS_O' C preprocessor symbol, but you
- should really stop relying on that.
+ the combined use of both the "-c -o" options. The result of this
+ check is saved in the cache variable 'am_cv_prog_cc_c_o', and said
+ result can be overridden by pre-defining that variable.
+
+ - The AM_PROG_CC_C_O can still be called, but that should no longer
+ be necessary. This macro is now just a thin wrapper around the
+ Automake-enhanced AC_PROG_CC. This means, among the other things,
+ that its behaviour is changed in three ways:
+
+ 1. It no longer invokes the Autoconf-provided AC_PROG_CC_C_O
+ macros behind the scenes.
+
+ 2. It caches the check result in the 'am_cv_prog_cc_c_o'variable,
+ and not in a 'ac_cv_prog_cc_*_c_o' variable whose exact name
+ in only dynamically computed at configure runtime (sic!) from
+ the content of the '$CC' variable.
+
+ 3. It no longer automatically AC_DEFINE the C preprocessor
+ symbol 'NO_MINUS_C_MINUS_O'.
* Texinfo support:
diff --git a/gen-testsuite-part b/gen-testsuite-part
index 4584d2b8e..3bd5c9f01 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -342,7 +342,7 @@ my %depmodes =
(
auto => ["cc"],
disabled => ["cc"],
- makedepend => ["cc", "makedepend"],
+ makedepend => ["cc", "makedepend", "-c-o"],
dashmstdout => ["gcc"],
cpp => ["gcc"],
# This was for older (pre-3.x) GCC versions (newer versions
diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4
index f895f6bd2..58726d0b0 100644
--- a/m4/ar-lib.m4
+++ b/m4/ar-lib.m4
@@ -19,7 +19,8 @@ AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
: ${AR=ar}
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
- [am_cv_ar_interface=ar
+ [AC_LANG_PUSH([C])
+ am_cv_ar_interface=ar
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
[am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([am_ar_try])
@@ -36,7 +37,7 @@ AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
fi
rm -f conftest.lib libconftest.a
])
- ])
+ AC_LANG_POP([C])])
case $am_cv_ar_interface in
ar)
diff --git a/m4/init.m4 b/m4/init.m4
index a6f27339d..432ff200c 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -9,6 +9,12 @@
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -110,12 +116,6 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-dnl Automatically invoke AM_PROG_CC_C_O as necessary. Since AC_PROG_CC is
-dnl usually called after AM_INIT_AUTOMAKE, we arrange for the test to be
-dnl done later by AC_CONFIG_COMMANDS_PRE.
-AC_CONFIG_COMMANDS_PRE([AC_PROVIDE_IFELSE(
- [AC_PROG_CC],
- [AC_LANG_PUSH([C]) AM_PROG_CC_C_O AC_LANG_POP([C])])])dnl
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
diff --git a/m4/prog-cc-c-o.m4 b/m4/prog-cc-c-o.m4
index 06f74c906..3b2a849b0 100644
--- a/m4/prog-cc-c-o.m4
+++ b/m4/prog-cc-c-o.m4
@@ -5,19 +5,35 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN_ONCE([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
@@ -25,8 +41,7 @@ if test "$am_t" != yes; then
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
diff --git a/t/add-missing.tap b/t/add-missing.tap
index 053b9a111..e0a628b15 100644
--- a/t/add-missing.tap
+++ b/t/add-missing.tap
@@ -248,6 +248,7 @@ check_ <<'END'
depcomp/C
== Files ==
depcomp
+compile
== configure.ac ==
AC_PROG_CC
== Makefile.am ==
@@ -272,10 +273,9 @@ compile
== Files ==
compile
== configure.ac ==
-# Using AC_PROG_CC and AC_OUTPUT in configure.ac should be enough.
+# Using AC_PROG_CC in configure.ac should be enough.
# No need to also define, say, xxx_PROGRAMS in Makefile.am.
AC_PROG_CC
-AC_OUTPUT
END
# For config.guess and config.sub.
@@ -297,6 +297,7 @@ check_ <<'END'
ylwrap/Lex
== Files ==
ylwrap
+compile
== configure.ac ==
AC_PROG_CC
AC_PROG_LEX
@@ -311,6 +312,7 @@ check_ <<'END'
ylwrap/Yacc
== Files ==
ylwrap
+compile
== configure.ac ==
AC_PROG_CC
AC_PROG_YACC
diff --git a/t/am-prog-cc-c-o.sh b/t/am-prog-cc-c-o.sh
index 920a0dc93..08522a472 100644
--- a/t/am-prog-cc-c-o.sh
+++ b/t/am-prog-cc-c-o.sh
@@ -29,25 +29,28 @@ echo 'int main (void) { return 0; }' > foo.c
cp configure.ac configure.bak
-cat >> configure.ac << 'END'
-# Since AM_PROG_CC_C_O rewrites $CC, it's an error to call AC_PROG_CC
-# after it.
-AM_PROG_CC_C_O
-AC_PROG_CC
+cat > acinclude.m4 <<'END'
+AC_DEFUN([AM_TWEAKED_OUTPUT], [
+# For debugging.
+printf "CC = '%s'\\n" "$CC"
+# Make sure that $CC can be used after AM_PROG_CC_C_O.
+$CC --version || exit 1
+$CC -v || exit 1
+# $CC rewrite should only take place on time.
+case " $CC " in
+ *" compile"*" compile"*) AC_MSG_ERROR([CC rewritten twice]);;
+esac
+AC_OUTPUT
+])
END
-$ACLOCAL -Wnone 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep '^configure\.ac:7:.* AC_PROG_CC .*called after AM_PROG_CC_C_O' stderr
+# ---
cat configure.bak - > configure.ac << 'END'
dnl It's OK to call AM_PROG_CC_C_O after AC_PROG_CC.
AC_PROG_CC
AM_PROG_CC_C_O
-# Make sure that $CC can be used after AM_PROG_CC_C_O.
-$CC --version || exit 1
-$CC -v || exit 1
-AC_OUTPUT
+AM_TWEAKED_OUTPUT
END
$ACLOCAL
@@ -61,21 +64,49 @@ if test "$AM_TESTSUITE_SIMULATING_NO_CC_C_O" != no; then
else
$EGREP 'understands? -c and -o together.* yes$' stdout
fi
+
# No repeated checks please.
test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
-$MAKE
+$MAKE
$MAKE maintainer-clean
+rm -rf autom4te*.cache
+
+# ---
+
+cat configure.bak - > configure.ac << 'END'
+dnl It's also OK to call AM_PROG_CC_C_O *before* AC_PROG_CC.
+AM_PROG_CC_C_O
+AC_PROG_CC
+AM_TWEAKED_OUTPUT
+END
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure >stdout || { cat stdout; exit 1; }
+cat 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
+
+# Repeated checks are OK in this case, but should be cached.
+test $(grep ".*-c['\" ].*-o['\" ]" stdout \
+ | $FGREP -v ' (cached) ' | wc -l) -eq 1
+
+$MAKE
+$MAKE maintainer-clean
rm -rf autom4te*.cache
+# ---
+
cat configure.bak - > configure.ac << 'END'
dnl It's also OK to call AM_PROG_CC_C_O *without* AC_PROG_CC.
AM_PROG_CC_C_O
-# Make sure that $CC can be used after AM_PROG_CC_C_O.
-$CC --version || exit 1
-$CC -v || exit 1
-AC_OUTPUT
+AM_TWEAKED_OUTPUT
END
$ACLOCAL
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index 8fee84f60..1fbc73138 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -765,6 +765,11 @@ require_tool ()
case $1 in
cc|c++|fortran|fortran77)
require_compiler_ $1;;
+ -c-o)
+ if test x"$AM_TESTSUITE_SIMULATING_NO_CC_C_O" = x"yes"; then
+ skip_all_ "need a C compiler that grasps -c and -o together"
+ fi
+ ;;
xsi-lib-shell)
if test x"$am_test_prefer_config_shell" = x"yes"; then
require_xsi "$SHELL"
diff --git a/t/ccnoco-deps.sh b/t/ccnoco-deps.sh
new file mode 100755
index 000000000..d4931d54a
--- /dev/null
+++ b/t/ccnoco-deps.sh
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that dependency tracking can also work with compilers that
+# doesn't understand '-c -o', even if the AM_PROG_CC_C_O macro is not
+# explicitly called.
+
+required=gcc # For 'cc-no-c-o'.
+. test-init.sh
+
+echo '#define myStr "Hello"' > foobar.h
+
+cat > foo.c << 'END'
+#include <stdio.h>
+#include "foobar.h"
+int main (void)
+{
+ printf ("%s\n", myStr);
+ return 0;
+}
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foobar.h
+check-deps: all
+ test -n '$(DEPDIR)' && test -d '$(DEPDIR)'
+ ls -l $(DEPDIR)
+ grep 'stdio\.h' $(DEPDIR)/foo.Po
+ grep 'foobar\.h' $(DEPDIR)/foo.Po
+check-updated: all
+ is_newest foo foobar.h
+END
+
+# We deliberately don't invoke AM_PROG_CC_C_O here.
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Make sure the compiler doesn't understand '-c -o'.
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+$EGREP 'understands? -c and -o together.* no$' stdout
+grep '^checking dependency style .*\.\.\. gcc' stdout
+
+$MAKE check-deps
+
+if ! cross_compiling; then
+ ./foo
+ test "$(./foo)" = Hello
+fi
+
+$sleep
+echo '#define myStr "Howdy"' > foobar.h
+$MAKE check-updated
+
+if ! cross_compiling; then
+ ./foo
+ test "$(./foo)" = Howdy
+fi
+
+:
diff --git a/t/ccnoco-lib.sh b/t/ccnoco-lib.sh
new file mode 100755
index 000000000..a6464ec98
--- /dev/null
+++ b/t/ccnoco-lib.sh
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure we can compile when the compiler doesn't
+# understand '-c -o'.
+
+required=gcc # For cc-no-c-o.
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+$CC --version || exit 1
+$CC -v || exit 1
+AC_PROG_RANLIB
+AM_PROG_AR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+mylibsdir = $(libdir)/my-libs
+mylibs_LIBRARIES = libwish.a
+libwish_a_SOURCES = a.c
+# Make sure we need something strange.
+libwish_CFLAGS = -O0
+END
+
+cat > a.c << 'END'
+int wish_granted (void)
+{
+ return 0;
+}
+END
+
+# Make sure the compiler doesn't understand '-c -o'.
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+$ACLOCAL
+$AUTOCONF -Wall -Werror
+$AUTOMAKE --copy --add-missing
+
+for vpath in : false; do
+ if $vpath; then
+ srcdir=..
+ mkdir build
+ cd build
+ else
+ srcdir=.
+ fi
+ $srcdir/configure >stdout || { cat stdout; exit 1; }
+ cat stdout
+ $EGREP 'understands? -c and -o together.* no$' stdout
+ # No repeated checks please.
+ test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
+ $MAKE
+ cd $srcdir
+done
+
+$MAKE distcheck
+
+:
diff --git a/t/ccnoco-lt.sh b/t/ccnoco-lt.sh
new file mode 100755
index 000000000..793987bf0
--- /dev/null
+++ b/t/ccnoco-lt.sh
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure we can compile libtool libraries when the compiler
+# doesn't understand '-c -o'.
+
+required='gcc libtoolize' # For cc-no-c-o.
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_AR
+LT_INIT
+$CC --version
+$CC -v
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = libwish.la
+END
+
+cat > libwish.c << 'END'
+int wish_granted (void)
+{
+ return 0;
+}
+END
+
+# Make sure the compiler doesn't understand '-c -o'.
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+libtoolize --verbose --install
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+
+for vpath in : false; do
+ if $vpath; then
+ srcdir=..
+ mkdir build
+ cd build
+ else
+ srcdir=.
+ fi
+ $srcdir/configure >stdout || { cat stdout; exit 1; }
+ cat stdout
+ $EGREP 'understands? -c and -o together.* no$' stdout
+ # No repeated checks please.
+ test $(grep ".*-c['\" ].*-o['\" ]" stdout \
+ | $FGREP -v ' -c -o file.o' | wc -l) -eq 1
+ # Once we have rewritten $CC to use our 'compile' wrapper script,
+ # libtool should pick it up correctly, and not mess with the
+ # redefinition.
+ grep '^checking if .*/compile .*supports -c -o file\.o\.\.\. yes' stdout
+ # And of course, we should be able to build our package.
+ $MAKE
+ cd $srcdir
+done
+
+$MAKE distcheck
+
+:
diff --git a/t/ccnoco.sh b/t/ccnoco.sh
index be9be375e..d00b6f93d 100644
--- a/t/ccnoco.sh
+++ b/t/ccnoco.sh
@@ -22,7 +22,8 @@ required=gcc # For cc-no-c-o.
cat >> configure.ac << 'END'
AC_PROG_CC
-$CC --version; $CC -v; # For debugging.
+$CC --version || exit 1
+$CC -v || exit 1
AC_OUTPUT
END
@@ -42,11 +43,11 @@ int main ()
}
END
-# Make sure the compiler doesn't understand '-c -o'
+# Make sure the compiler doesn't understand '-c -o'.
CC=$am_testaux_builddir/cc-no-c-o; export CC
$ACLOCAL
-$AUTOCONF
+$AUTOCONF -Wall -Werror
$AUTOMAKE --copy --add-missing
for vpath in : false; do
@@ -57,9 +58,15 @@ for vpath in : false; do
else
srcdir=.
fi
- $srcdir/configure
+ $srcdir/configure >stdout || { cat stdout; exit 1; }
+ cat stdout
+ $EGREP 'understands? -c and -o together.* no$' stdout
+ # No repeated checks please.
+ test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
$MAKE
cd $srcdir
done
+$MAKE distcheck
+
:
diff --git a/t/discover.sh b/t/discover.sh
index f841c5ba3..5d564b5d9 100644
--- a/t/discover.sh
+++ b/t/discover.sh
@@ -19,9 +19,9 @@
. test-init.sh
cat >> configure.ac << 'END'
+AC_PROG_CC
AC_PROG_RANLIB
AM_PROG_AR
-AC_PROG_CC
AC_LIBOBJ([fsusage])
AC_OUTPUT
END
diff --git a/t/link_cond.sh b/t/link_cond.sh
index 98b523bc3..85be517b2 100644
--- a/t/link_cond.sh
+++ b/t/link_cond.sh
@@ -64,7 +64,7 @@ run_make CXX=false
# Sanity check.
rm -f foo foo.exe
-run_make CC=false && exit 99
+run_make CC=false && fatal_ '"make CC=false" succeeded unexpectedly'
$MAKE distclean
@@ -83,6 +83,6 @@ run_make CC=false
# Sanity check.
rm -f foo foo.exe
-run_make CXX=false && exit 99
+run_make CXX=false && fatal_ '"make CXX=false" succeeded unexpectedly'
:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index ce3639cb1..7f77227dc 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -208,8 +208,11 @@ t/canon7.sh \
t/canon8.sh \
t/canon-name.sh \
t/ccnoco.sh \
+t/ccnoco-lib.sh \
+t/ccnoco-lt.sh \
t/ccnoco3.sh \
t/ccnoco4.sh \
+t/ccnoco-deps.sh \
t/check.sh \
t/check2.sh \
t/check4.sh \
diff --git a/t/subobj10.sh b/t/subobj10.sh
index 1be42a95a..f3181d173 100644
--- a/t/subobj10.sh
+++ b/t/subobj10.sh
@@ -16,7 +16,7 @@
# PR 492: Test asm subdir-objects.
-required=gcc
+required='gcc -c-o'
. test-init.sh
cat > configure.ac << END
diff --git a/t/subpkg.sh b/t/subpkg.sh
index f9cdc74e2..2b3d163a0 100644
--- a/t/subpkg.sh
+++ b/t/subpkg.sh
@@ -91,7 +91,7 @@ int lib (void)
EOF
$ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall
$AUTOMAKE -Wno-override
cd lib