automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-183-g3cc7e84
Date: Sat, 05 May 2012 14:01:53 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=3cc7e84ead1ecbf1409604219a54093547b2d0a1

The branch, ng/master has been updated
       via  3cc7e84ead1ecbf1409604219a54093547b2d0a1 (commit)
       via  6dad21bfc921cecde339723a463f1bf6abdbf2ba (commit)
       via  5677e1d4e4c94261413f59b241f8c8191566e8bb (commit)
       via  67b86e0868d04d53e4c630633cbdccb6c5900cdf (commit)
       via  7f3f467aab0184dedddca2b5c6edd48dab6303db (commit)
       via  1e8526488f16c127e89ccd8be0df1bd33076c351 (commit)
       via  33f4f7d391152e679232479a7dec4cc2cb90a12f (commit)
       via  8450f187c9b6d99374fddd49e976356ab0f26efb (commit)
       via  75b91149b81b38570282008c926eba9eb99b6a29 (commit)
       via  a1241883c9a783077cf51b6fc2f8b7dd4c2c900f (commit)
       via  0fec8df49cf76b50e5ea2d4fafea57c0aed8a90d (commit)
       via  cd4dab35d5d592b83318670ec9084de968ccfbc4 (commit)
       via  3b447abc8077408e6c0c28611cebecdc48e8acb0 (commit)
       via  a66cd033b740af00dbb8424aec3a8d5c499cc198 (commit)
       via  679d8a844e727e456ed51606ad98bee5de84aa5c (commit)
       via  49aa6e01579f0f7be8099f14e40d97379c327141 (commit)
       via  3434a6495151f3eaa3570fbbb40c873554c0fe4e (commit)
       via  8e6c0c51ff8c58bb2baf784c5c1dda723c90b897 (commit)
       via  fe2037a22449e700c506e37a59af9c1f4bdfd1b3 (commit)
       via  23197cff2c48bdf0b84e91edfb9b9607a76d6ecc (commit)
       via  f9dbb0a6294fa6978833f9eb1b3286f076a8f986 (commit)
       via  93814708ba465b5834ec10ec1fb66eceb9674274 (commit)
       via  180158114544e2bf0c11c36f373c28331d0a9ee3 (commit)
       via  1ad72bca60963a9736cc4795057af3750a116728 (commit)
       via  b618b5854c68784781593b44bdd9c7ae7bd9d79e (commit)
       via  e7745eaaac1a5d432f3b39731fb4cd89675432fb (commit)
       via  dda822736d5e66f5b8fa6888397894c09a5fdcaa (commit)
       via  14141f258ac8d5d14b9479eaf2bb82189bd17bf5 (commit)
       via  4c2dd6e09a01656b0ab0838812559a69e12e7b5e (commit)
       via  5b0cc39546e984928814bb947f6cd701aa9d4ced (commit)
       via  71cc0e0920d9dd864a3e4eae08ec91af177a8071 (commit)
       via  5eeb36603d197ed73a031cea70843e9b43d312b9 (commit)
       via  f5733aabe7c186a04f288214cb840a423d5b821b (commit)
       via  6542254a9fbd32495f02317c3c84d406567a596f (commit)
       via  401d4119f9854b7fc2965d9b31872348deea9316 (commit)
       via  6e5b444165b420ba757fed2f3973da37d6df6ffe (commit)
       via  8becdd30e4923df4eca086a5447cf5ed3351cb4e (commit)
       via  df306b52cbab029d1c54ac9724bae07428e21bff (commit)
      from  112d08a3756cbaf10c9a662092e100a0c9245f71 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3cc7e84ead1ecbf1409604219a54093547b2d0a1
Merge: 112d08a 6dad21b
Author: Stefano Lattarini <address@hidden>
Date:   Sat May 5 11:12:27 2012 +0200

    Merge branch 'master' into ng/master
    
    * master: (27 commits)
      maintcheck: avoid a couple of spurious failures
      maintcheck: reduce code duplication, increase coverage
      maintcheck: avoid a couple of spurious failures
      tests: avoid spurious failure on missing Obj C/C++ compiler
      dist: don't bother putting README first in $(DIST_COMMON)
      news: document improvement in parallel-tests performance
      tests: fix spurious failure due to autom4te caching
      objc, objc++: test support for compilation flags
      objc, objc++: add stress test
      objc, objc++: test automatic dependency tracking
      objc: reorganize basic tests
      objc++, objc: add first semantic tests
      objc++: add first basic test
      news: fix typos
      aclocal: error out again on unrecognized arguments
      cosmetics: fix typo in aclocal m4 directory README
      silent rules: support for them is always active now
      parallel-tests: save few forks when possible
      cygnus: remove support for Cygnus-style trees
      cygnus: warn when it's used (flagged as 'obsolete' now)
      ...
    
    Extra non-trivial edits:
    
    * t/parallel-tests-unreadable.sh: Adjust to new error message for
    I/O errors.
    * t/silent6.sh: In Automake-NG, there is no 'portability-recursive'
    warning category anymore.  Adjust accordingly.
    * lib/am/check.am (am__create_global_log): Don't exit at the first
    I/O error, but report as much as possible of them.  If we don't do
    so, the test 't/parallel-tests-unreadable.sh' starts failing.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                 |   40 ++++-
 THANKS                               |    1 +
 aclocal.in                           |    6 +
 automake.in                          |  109 ++++-------
 doc/automake.texi                    |  140 ++++++--------
 lib/Automake/Options.pm              |    9 +-
 lib/Automake/Variable.pm             |    2 +
 lib/am/check.am                      |  184 ++++++++++++++-----
 lib/am/dejagnu.am                    |   29 +---
 lib/am/distdir.am                    |    1 -
 lib/am/texinfos.am                   |   21 --
 m4/acdir/README                      |    2 +-
 m4/depend.m4                         |    5 +-
 m4/init.m4                           |    9 +-
 syntax-checks.mk                     |  120 ++++--------
 t/aclocal.sh                         |    5 +
 t/auxdir-autodetect.sh               |    2 +-
 t/clean2.sh                          |   68 -------
 t/cond5.sh                           |    2 +-
 t/cygnus-check-without-all.sh        |   50 -----
 t/cygnus-dependency-tracking.sh      |   73 -------
 t/cygnus-imply-foreign.sh            |   60 ------
 t/cygnus-no-dist.sh                  |   84 --------
 t/cygnus-no-installinfo.sh           |   53 -----
 t/cygnus-no-more.sh                  |   46 +++++
 t/cygnus-requires-maintainer-mode.sh |   53 -----
 t/dist-formats.tap                   |    2 +-
 t/distcom4.sh                        |    3 -
 t/ext.sh                             |   10 +-
 t/flavor.sh                          |    5 +-
 t/library.sh                         |    2 -
 t/location.sh                        |   48 +++---
 t/nodep2.sh                          |    8 +-
 t/{objc2.sh => objc-basic.sh}        |   27 ++-
 t/{interp3.sh => objc-deps.sh}       |   58 ++++---
 t/objc-flags.sh                      |   62 ++++++
 t/objc-megademo.sh                   |  347 ++++++++++++++++++++++++++++++++++
 t/objc-minidemo.sh                   |   76 ++++++++
 t/objc.sh                            |   36 ----
 t/objcxx-basic.sh                    |   49 +++++
 t/objcxx-deps.sh                     |   80 ++++++++
 t/objcxx-flags.sh                    |   72 +++++++
 t/objcxx-minidemo.sh                 |   76 ++++++++
 t/parallel-tests-unreadable.sh       |    7 +-
 t/rst-formatting.sh                  |   93 ---------
 t/suffix.sh                          |    4 +-
 t/tap-signal.tap                     |    5 +-
 t/testsuite-recheck-speed.sh         |   99 ++++++++++
 t/testsuite-summary-count-many.sh    |    4 +-
 t/testsuite-summary-speed.sh         |   76 ++++++++
 t/txinfo5.sh                         |   38 ----
 t/txinfo5b.sh                        |   41 ----
 52 files changed, 1436 insertions(+), 1066 deletions(-)
 delete mode 100755 t/clean2.sh
 delete mode 100755 t/cygnus-check-without-all.sh
 delete mode 100755 t/cygnus-dependency-tracking.sh
 delete mode 100755 t/cygnus-imply-foreign.sh
 delete mode 100755 t/cygnus-no-dist.sh
 delete mode 100755 t/cygnus-no-installinfo.sh
 create mode 100755 t/cygnus-no-more.sh
 delete mode 100755 t/cygnus-requires-maintainer-mode.sh
 rename t/{objc2.sh => objc-basic.sh} (58%)
 copy t/{interp3.sh => objc-deps.sh} (52%)
 create mode 100755 t/objc-flags.sh
 create mode 100755 t/objc-megademo.sh
 create mode 100755 t/objc-minidemo.sh
 delete mode 100755 t/objc.sh
 create mode 100755 t/objcxx-basic.sh
 create mode 100755 t/objcxx-deps.sh
 create mode 100755 t/objcxx-flags.sh
 create mode 100755 t/objcxx-minidemo.sh
 delete mode 100755 t/rst-formatting.sh
 create mode 100755 t/testsuite-recheck-speed.sh
 create mode 100755 t/testsuite-summary-speed.sh
 delete mode 100755 t/txinfo5.sh
 delete mode 100755 t/txinfo5b.sh

diff --git a/NEWS b/NEWS
index 13dbbce..2bbf126 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ New in 1.13:
 
 * Obsolete features removed:
 
+  - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
+    option) has been removed.  See discussion about automake bug#11034
+    for more background.
+
   - The automake-provided $(mkdir_p) make variable, @mkdir_p@ configure
     time substitution and AM_PROG_MKDIR m4 macro have been removed.  They
     had been obsolete since automake 1.10, and actively deprecated since
@@ -27,6 +31,17 @@ New in 1.13:
 
   - All the "old alias" macros in 'm4/obsolete.m4' have been removed.
 
+* Silent rules support:
+
+  - Support for silent rules is now always active in Automake-generated
+    Makefiles.  So, although the verbose output is still the default,
+    the user can now always use "./configure --enable-silent-rules" or
+    "make V=0" to enable quieter output in the package he's building.
+
+  - The 'silent-rules' option has now become a no-op, preserved for
+    backward-compatibility only.  In particular, its use does not disable
+    the warnings in the 'portability-recursive' category anymore.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.12.1:
@@ -49,10 +64,6 @@ New in 1.12.1:
     harness will still be available through the use of the 'serial-tests'
     option.
 
-  - Support for the "Cygnus-style" trees (enabled by the 'cygnus' option)
-    will be deprecated in the next minor version of Automake (1.12.1) and
-    removed in the next major version (1.13).
-
   - Support for the two- and three-arguments invocation forms of the
     AM_INIT_AUTOMAKE macro will be deprecated in the next minor version
     of Automake (1.12.1) and removed in the next major version (1.13).
@@ -61,8 +72,17 @@ New in 1.12.1:
     search path are looked up is probably going to be changed in the
     next Automake release (1.13).
 
+* New supported languages:
+
+  - Support for Objective C++ has been added; it should work similarly to
+    the support for Objective C.
+
 * Deprecated obsolescent features:
 
+  - Support for the "Cygnus-style" trees (enabled by the 'cygnus' option) is
+    now deprecated (its use triggers a warning in the 'obsolete' category).
+    It will be removed in the next major Automake release (1.13).
+
   - The long-obsolete (since 1.10) automake-provided $(mkdir_p) make
     variable, @mkdir_p@ configure-time substitution and AM_PROG_MKDIR
     m4 macro are deprecated, eliciting a warning in the 'obsolete'
@@ -72,8 +92,13 @@ Bugs fixed in 1.12.1:
 
 * Bugs introduced by 1.12:
 
-   - Several weaknesses in the Automake's own build system test suite
-     have been fixed.
+  - Several weaknesses in Automake's own build system and test suite
+    have been fixed.
+
+* Bugs introduced by 1.11.3:
+
+  - When given non-option arguments, aclocal rejects them, instead of
+    silently ignoring them.
 
 * Long-standing bugs:
 
@@ -82,6 +107,9 @@ Bugs fixed in 1.12.1:
     a non-ANSI one, i.e., if the TERM environment variable has a value of
     "dumb".
 
+  - Several inefficiencies and poor performances in the implementation
+    of the parallel-tests 'check' and 'recheck' targets have been fixed.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.12:
diff --git a/THANKS b/THANKS
index 1a38571..b98b2b7 100644
--- a/THANKS
+++ b/THANKS
@@ -22,6 +22,7 @@ Andreas Buening                 address@hidden
 Andreas Köhler                  address@hidden
 Andreas Schwab                  address@hidden
 Andrew Cagney                   address@hidden
+Andrew Eikum                    address@hidden
 Andrew Suffield                 address@hidden
 Andris Pavenis                  address@hidden
 Andy Wingo                      address@hidden
diff --git a/aclocal.in b/aclocal.in
index a5c0ea5..5af016a 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -972,6 +972,12 @@ sub parse_arguments ()
   use Automake::Getopt ();
   Automake::Getopt::parse_options %cli_options;
 
+  if (@ARGV > 0)
+    {
+      fatal ("non-option arguments are not accepted: '$ARGV[0]'.\n"
+             . "Try '$0 --help' for more information.");
+    }
+
   if ($print_and_exit)
     {
       print "@system_includes\n";
diff --git a/automake.in b/automake.in
index 0a6b069..7af3fec 100644
--- a/automake.in
+++ b/automake.in
@@ -759,6 +759,24 @@ register_language ('name' => 'objc',
                   'pure' => 1,
                   'extensions' => ['.m']);
 
+# Objective C++.
+register_language ('name' => 'objcxx',
+                  'Name' => 'Objective C++',
+                  'config_vars' => ['OBJCXX'],
+                  'linker' => 'OBJCXXLINK',
+                  'link' => '$(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) 
$(AM_LDFLAGS) $(LDFLAGS) -o $@',
+                  'autodep' => 'OBJCXX',
+                  'flags' => ['OBJCXXFLAGS', 'CPPFLAGS'],
+                  'compile' => '$(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS)',
+                  'ccer' => 'OBJCXX',
+                  'compiler' => 'OBJCXXCOMPILE',
+                  'compile_flag' => '-c',
+                  'output_flag' => '-o',
+                  'lder' => 'OBJCXXLD',
+                  'ld' => '$(OBJCXX)',
+                  'pure' => 1,
+                  'extensions' => ['.mm']);
+
 # Unified Parallel C.
 register_language ('name' => 'upc',
                   'Name' => 'Unified Parallel C',
@@ -3307,11 +3325,6 @@ sub handle_texinfo_helper ($)
       $texinfodir = ('$(srcdir)/'
                     . dirname (variable_value ('TEXINFO_TEX')));
     }
-  elsif (option 'cygnus')
-    {
-      $texinfodir = '$(top_srcdir)/../texinfo';
-      define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL);
-    }
   elsif ($config_aux_dir_set_in_configure_ac)
     {
       $texinfodir = $am_config_aux_dir;
@@ -3654,26 +3667,6 @@ sub user_phony_rule ($)
 }
 
 
-# $BOOLEAN
-# &for_dist_common ($A, $B)
-# -------------------------
-# Subroutine for &handle_dist: sort files to dist.
-#
-# We put README first because it then becomes easier to make a
-# Usenet-compliant shar file (in these, README must be first).
-#
-# FIXME: do more ordering of files here.
-sub for_dist_common
-{
-    return 0
-       if $a eq $b;
-    return -1
-       if $a eq 'README';
-    return 1
-       if $b eq 'README';
-    return $a cmp $b;
-}
-
 # handle_dist
 # -----------
 # Handle 'dist' target.
@@ -3784,7 +3777,7 @@ sub handle_dist ()
   # Files to distributed.  Don't use ->value_as_list_recursive
   # as it recursively expands '$(dist_pkgdata_DATA)' etc.
   my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value);
-  @dist_common = uniq (sort for_dist_common (@dist_common));
+  @dist_common = uniq @dist_common;
   variable_delete 'DIST_COMMON';
   define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common);
 
@@ -4033,8 +4026,8 @@ sub handle_configure ($$$@)
   define_pretty_variable ('am__configure_deps', TRUE, INTERNAL,
                          @configuredeps);
 
-  my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : 
$strictness_name)
-                        . (global_option 'no-dependencies' ? ' --ignore-deps' 
: '');
+  my $automake_options = '--' . $strictness_name .
+                        (global_option 'no-dependencies' ? ' --ignore-deps' : 
'');
 
   $output_rules .= file_contents
     ('configure',
@@ -4505,28 +4498,18 @@ sub do_check_merge_target ()
   push @check_tests, 'check-local'
     if user_phony_rule 'check-local';
 
-  # In --cygnus mode, check doesn't depend on all.
-  if (option 'cygnus')
-    {
-      # Just run the local check rules.
-      pretty_print_rule ('check-am:', "\t\t", @check);
-    }
-  else
+  # The check target must depend on the local equivalent of
+  # 'all', to ensure all the primary targets are built.  Then it
+  # must build the local check rules.
+  $output_rules .= "check-am: all-am\n";
+  if (@check)
     {
-      # The check target must depend on the local equivalent of
-      # 'all', to ensure all the primary targets are built.  Then it
-      # must build the local check rules.
-      $output_rules .= "check-am: all-am\n";
-      if (@check)
-        {
-         pretty_print_rule ("\t\$(MAKE)", "\t  ",
-                            @check);
-       }
+      pretty_print_rule ("\t\$(MAKE)", "\t  ", @check);
     }
+
   if (@check_tests)
     {
-      pretty_print_rule ("\t\$(MAKE)", "\t  ",
-                        @check_tests);
+      pretty_print_rule ("\t\$(MAKE)", "\t  ", @check_tests);
     }
 
   depend '.PHONY', 'check', 'check-am';
@@ -5411,21 +5394,6 @@ sub scan_autoconf_files ()
 
 ################################################################
 
-# Set up for Cygnus mode.
-sub check_cygnus
-{
-  my $cygnus = option 'cygnus';
-  return unless $cygnus;
-
-  set_strictness ('foreign');
-  set_option ('no-installinfo', $cygnus);
-  set_option ('no-dependencies', $cygnus);
-  set_option ('no-dist', $cygnus);
-
-  err_ac "'AM_MAINTAINER_MODE' required when --cygnus specified"
-    if !$seen_maint_mode;
-}
-
 # Do any extra checking for GNU standards.
 sub check_gnu_standards
 {
@@ -5639,6 +5607,12 @@ sub lang_objc_rewrite
     return &lang_sub_obj;
 }
 
+# Rewrite a single Objective C++ file.
+sub lang_objcxx_rewrite
+{
+    return &lang_sub_obj;
+}
+
 # Rewrite a single Unified Parallel C file.
 sub lang_upc_rewrite
 {
@@ -5903,7 +5877,7 @@ sub resolve_linker
 {
     my (%linkers) = @_;
 
-    foreach my $l (qw(GCJLINK CXXLINK F77LINK FCLINK OBJCLINK UPCLINK))
+    foreach my $l (qw(GCJLINK OBJCXXLINK CXXLINK F77LINK FCLINK OBJCLINK 
UPCLINK))
     {
        return $l if defined $linkers{$l};
     }
@@ -6091,13 +6065,14 @@ sub make_conditional_string ($$)
 my %_am_macro_for_cond =
   (
   AMDEP => "one of the compiler tests\n"
-          . "    AC_PROG_CC, AC_PROG_CXX, AC_PROG_CXX, AC_PROG_OBJC,\n"
+          . "    AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,\n"
           . "    AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC",
   am__fastdepCC => 'AC_PROG_CC',
   am__fastdepCCAS => 'AM_PROG_AS',
   am__fastdepCXX => 'AC_PROG_CXX',
   am__fastdepGCJ => 'AM_PROG_GCJ',
   am__fastdepOBJC => 'AC_PROG_OBJC',
+  am__fastdepOBJCXX => 'AC_PROG_OBJCXX',
   am__fastdepUPC => 'AM_PROG_UPC'
   );
 
@@ -6793,8 +6768,7 @@ sub preprocess_file ($%)
 
   # Complete %transform with global options.
   # Note that %transform goes last, so it overrides global options.
-  %transform = ('CYGNUS'      => !! option 'cygnus',
-                'MAINTAINER-MODE'
+  %transform = ( 'MAINTAINER-MODE'
                 => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
 
                 'XZ'          => !! option 'dist-xz',
@@ -7936,7 +7910,6 @@ sub generate_makefile ($$)
     if var 'DIST_SUBDIRS' && ! var 'SUBDIRS';
 
   # Check first, because we might modify some state.
-  check_cygnus;
   check_gnu_standards;
   check_gnits_standards;
 
@@ -8118,7 +8091,6 @@ Dependency tracking:
       --include-deps     enable dependency tracking code
 
 Flavors:
-      --cygnus           assume program is part of Cygnus-style tree
       --foreign          set strictness to foreign
       --gnits            set strictness to gnits
       --gnu              set strictness to gnu
@@ -8176,7 +8148,6 @@ EOF
 sub parse_arguments ()
 {
   my $strict = 'gnu';
-  my $cygnus = 0;
   my $ignore_deps = 0;
   my @warnings = ();
 
@@ -8189,7 +8160,6 @@ sub parse_arguments ()
      'gnu'             => sub { $strict = 'gnu'; },
      'gnits'           => sub { $strict = 'gnits'; },
      'foreign'         => sub { $strict = 'foreign'; },
-     'cygnus'          => \$cygnus,
      'include-deps'    => sub { $ignore_deps = 0; },
      'i|ignore-deps'   => sub { $ignore_deps = 1; },
      'no-force'        => sub { $force_generation = 0; },
@@ -8205,7 +8175,6 @@ sub parse_arguments ()
 
   set_strictness ($strict);
   my $cli_where = new Automake::Location;
-  set_global_option ('cygnus', $cli_where) if $cygnus;
   set_global_option ('no-dependencies', $cli_where) if $ignore_deps;
   for my $warning (@warnings)
     {
diff --git a/doc/automake.texi b/doc/automake.texi
index 8e56040..ab0422f 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -115,7 +115,6 @@ section entitled ``GNU Free Documentation License.''
 * Conditionals::                Conditionals
 * Silencing Make::              Obtain less verbose output from @command{make}
 * Gnits::                       The effect of @option{--gnu} and 
@option{--gnits}
-* Cygnus::                      The effect of @option{--cygnus} (deprecated, 
soon to be removed)
 * Not Enough::                  When Automake is not Enough
 * Distributing::                Distributing the Makefile.in
 * API Versioning::              About compatibility between Automake versions
@@ -219,6 +218,7 @@ Building Programs and Libraries
 * Yacc and Lex::                Yacc and Lex support
 * C++ Support::                 Compiling C++ sources
 * Objective C Support::         Compiling Objective C sources
+* Objective C++ Support::       Compiling Objective C++ sources
 * Unified Parallel C Support::  Compiling Unified Parallel C sources
 * Assembly Support::            Compiling assembly sources
 * Fortran 77 Support::          Compiling Fortran 77 sources
@@ -1959,14 +1959,6 @@ standard is actually published (which may never happen).
 @xref{Gnits}, for more information on the precise implications of the
 strictness level.
 
-Automake also has a special (and @emph{today deprecated}) ``cygnus'' mode
-that is similar to strictness but handled differently.  This mode is
-useful for packages that are put into a ``Cygnus'' style tree (e.g., older
-versions of the GCC and gdb trees).  @xref{Cygnus}, for more information
-on this mode.  Please note that this mode is deprecated and @emph{will be
-removed in the future automake versions}; you must avoid its use in new
-packages, and should stop using it in existing packages as well.
-
 
 @node Uniform
 @section The Uniform Naming Scheme
@@ -2604,13 +2596,6 @@ scripts and data files (like e.g., @file{texinfo.texi} 
and
 When used with @option{--add-missing}, causes installed files to be
 copied.  The default is to make a symbolic link.
 
address@hidden --cygnus
address@hidden --cygnus
-Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead
-of GNU or Gnits rules.  For more information, see @ref{Cygnus}.
-Note that @emph{this mode of operation is deprecated, and will be removed}
-in a future Automake release.
-
 @item -f
 @opindex -f
 @itemx --force-missing
@@ -3032,6 +3017,10 @@ Programs, , Particular Program Checks, autoconf, The 
Autoconf Manual}.
 This is required if any Objective C source is included.  @xref{Particular
 Programs, , Particular Program Checks, autoconf, The Autoconf Manual}.
 
address@hidden AC_PROG_OBJCXX
+This is required if any Objective C++ source is included.  @xref{Particular
+Programs, , Particular Program Checks, autoconf, The Autoconf Manual}.
+
 @item AC_PROG_F77
 This is required if any Fortran 77 source is included.  @xref{Particular
 Programs, , Particular Program Checks, autoconf, The Autoconf Manual}.
@@ -4604,6 +4593,7 @@ to build programs and libraries.
 * Yacc and Lex::                Yacc and Lex support
 * C++ Support::                 Compiling C++ sources
 * Objective C Support::         Compiling Objective C sources
+* Objective C++ Support::       Compiling Objective C++ sources
 * Unified Parallel C Support::  Compiling Unified Parallel C sources
 * Assembly Support::            Compiling assembly sources
 * Fortran 77 Support::          Compiling Fortran 77 sources
@@ -5720,6 +5710,7 @@ they apply.
 @itemx maude_GCJFLAGS
 @itemx maude_LFLAGS
 @itemx maude_OBJCFLAGS
address@hidden maude_OBJCXXFLAGS
 @itemx maude_RFLAGS
 @itemx maude_UPCFLAGS
 @itemx maude_YFLAGS
@@ -5737,6 +5728,7 @@ Automake.  These @dfn{per-target compilation flags} are
 @samp{_GCJFLAGS},
 @samp{_LFLAGS},
 @samp{_OBJCFLAGS},
address@hidden,
 @samp{_RFLAGS},
 @samp{_UPCFLAGS}, and
 @samp{_YFLAGS}.
@@ -6313,6 +6305,41 @@ The command used to actually link an Objective C program.
 @end vtable
 
 
address@hidden Objective C++ Support
address@hidden Objective C++ Support
+
address@hidden Objective C++ support
address@hidden Support for Objective C++
+
+Automake includes some support for Objective C++.
+
+Any package including Objective C++ code must define the output variable
address@hidden in @file{configure.ac}; the simplest way to do this is to use
+the @code{AC_PROG_OBJCXX} macro (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}).
+
+A few additional variables are defined when an Objective C++ source file
+is seen:
+
address@hidden @code
address@hidden OBJCXX
+The name of the Objective C++ compiler.
+
address@hidden OBJCXXFLAGS
+Any flags to pass to the Objective C++ compiler.
+
address@hidden AM_OBJCXXFLAGS
+The maintainer's variant of @code{OBJCXXFLAGS}.
+
address@hidden OBJCXXCOMPILE
+The command used to actually compile an Objective C++ source file.  The
+file name is appended to form the complete command line.
+
address@hidden OBJCXXLINK
+The command used to actually link an Objective C++ program.
address@hidden vtable
+
+
 @node Unified Parallel C Support
 @section Unified Parallel C Support
 
@@ -6578,6 +6605,9 @@ parentheses are the variables containing the link 
command.)
 @vindex GCJLINK
 Native Java (@code{GCJLINK})
 @item
address@hidden OBJCXXLINK
+Objective C++ (@code{OBJCXXLINK})
address@hidden
 @vindex CXXLINK
 C++ (@code{CXXLINK})
 @item
@@ -6786,7 +6816,9 @@ source file.
 @section Support for Other Languages
 
 Automake currently only includes full support for C, C++ (@pxref{C++
-Support}), Objective C (@pxref{Objective C Support}), Fortran 77
+Support}), Objective C (@pxref{Objective C Support}),
+Objective C++ (@pxref{Objective C++ Support}),
+Fortran 77
 (@pxref{Fortran 77 Support}), Fortran 9x (@pxref{Fortran 9x Support}),
 and Java (@pxref{Java Support with gcj}).  There is only rudimentary
 support for other languages, support for which will be improved based
@@ -9921,15 +9953,12 @@ then @samp{portability} warnings will be 
@emph{disabled} in
 @item @option{gnits}
 @itemx @option{gnu}
 @itemx @option{foreign}
address@hidden @option{cygnus}
 @cindex Option, @option{gnits}
 @cindex Option, @option{gnu}
 @cindex Option, @option{foreign}
address@hidden Option, @option{cygnus}
 @opindex gnits
 @opindex gnu
 @opindex foreign
address@hidden cygnus
 
 Set the strictness as appropriate.  The @option{gnits} option also
 implies options @option{readme-alpha} and @option{check-news}.
@@ -10895,64 +10924,6 @@ The file @file{THANKS} is required.
 @end itemize
 
 
address@hidden Cygnus
address@hidden The effect of @option{--cygnus}
-
address@hidden @option{cygnus} strictness
-
address@hidden features described in this section are deprecated; you must
-not use any of them in new code, and should remove their use from older
-but still maintained code: they will be withdrawn in a future Automake
-release.}
-
-Some packages, notably GNU GCC and GNU gdb, used to have a build
-environment originally written at Cygnus Support (subsequently renamed
-Cygnus Solutions, and then later purchased by Red Hat).  Packages with
-this ancestry are sometimes referred to as ``Cygnus'' trees.
-
-A Cygnus tree has slightly different rules for how a
address@hidden is to be constructed.  Passing @option{--cygnus} to
address@hidden will cause any generated @file{Makefile.in} to
-comply with Cygnus rules.
-
-Here are the precise effects of @option{--cygnus}:
-
address@hidden @bullet
-
address@hidden
-The @option{foreign} strictness is implied.
-
address@hidden
-The options @option{no-installinfo}, @option{no-dependencies} and
address@hidden are implied (@pxref{Options}).
-
address@hidden
-The macro @code{AM_MAINTAINER_MODE} is required.
-
address@hidden
-Info files are always created in the build directory, and not in the
-source directory.  Packages that don't use the @option{cygnus} option
-can emulate this effect by using the @option{no-installinfo} option
-and listing the generated info files in the @code{CLEANFILES} variable.
-
address@hidden
address@hidden is not required if a Texinfo source file is
-specified.  The assumption is that the file will be supplied, but in a
-place that Automake cannot find -- it is an artifact of how Cygnus
-packages are typically bundled.  This effect can be emulated in
-packages not using the @option{cygnus} option with a proper definition
-of the @code{TEXINFO_TEX} variable (@pxref{Texinfo}).
-
address@hidden
-Certain tools will be searched for in the build tree as well as in the
-user's @env{PATH}.  These tools are @command{runtest}, @command{expect},
address@hidden and @command{texi2dvi}.
-
address@hidden
-The @code{check} target doesn't depend on @code{all}.
address@hidden itemize
-
-
 @node Not Enough
 @chapter When Automake Isn't Enough
 
@@ -12045,6 +12016,7 @@ flags, not appended.
 @cindex @code{AM_LFLAGS} and @code{LFLAGS}
 @cindex @code{AM_LIBTOOLFLAGS} and @code{LIBTOOLFLAGS}
 @cindex @code{AM_OBJCFLAGS} and @code{OBJCFLAGS}
address@hidden @code{AM_OBJCXXFLAGS} and @code{OBJXXCFLAGS}
 @cindex @code{AM_RFLAGS} and @code{RFLAGS}
 @cindex @code{AM_UPCFLAGS} and @code{UPCFLAGS}
 @cindex @code{AM_YFLAGS} and @code{YFLAGS}
@@ -12059,6 +12031,7 @@ flags, not appended.
 @cindex @code{LFLAGS} and @code{AM_LFLAGS}
 @cindex @code{LIBTOOLFLAGS} and @code{AM_LIBTOOLFLAGS}
 @cindex @code{OBJCFLAGS} and @code{AM_OBJCFLAGS}
address@hidden @code{OBJCXXFLAGS} and @code{AM_OBJCXXFLAGS}
 @cindex @code{RFLAGS} and @code{AM_RFLAGS}
 @cindex @code{UPCFLAGS} and @code{AM_UPCFLAGS}
 @cindex @code{YFLAGS} and @code{AM_YFLAGS}
@@ -12068,8 +12041,8 @@ mostly discuss @code{CPPFLAGS} in our examples, but 
actually the
 answer holds for all the compile flags used in Automake:
 @code{CCASFLAGS}, @code{CFLAGS}, @code{CPPFLAGS}, @code{CXXFLAGS},
 @code{FCFLAGS}, @code{FFLAGS}, @code{GCJFLAGS}, @code{LDFLAGS},
address@hidden, @code{LIBTOOLFLAGS}, @code{OBJCFLAGS}, @code{RFLAGS},
address@hidden, and @code{YFLAGS}.
address@hidden, @code{LIBTOOLFLAGS}, @code{OBJCFLAGS}, @code{OBJCXXFLAGS},
address@hidden, @code{UPCFLAGS}, and @code{YFLAGS}.
 
 @code{CPPFLAGS}, @code{AM_CPPFLAGS}, and @code{mumble_CPPFLAGS} are
 three variables that can be used to pass flags to the C preprocessor
@@ -12827,8 +12800,8 @@ generated by @command{automake} effectively:
 
 @itemize
 @item
-If less verbose output has been enabled in the package with the
address@hidden option (@pxref{Options}), you can use
+If less verbose output has been enabled in the package with the use
+of silent rules (@pxref{Automake Silent Rules}), you can use
 @code{make V=1} to see the commands being executed.
 @item
 @code{make -n} can help show what would be done without actually doing
@@ -12945,7 +12918,7 @@ suite failures, please attach the 
@file{tests/test-suite.log} file.
 @c  LocalWords:  texinfo setfilename settitle setchapternewpage texi direntry
 @c  LocalWords:  dircategory in's aclocal ifinfo titlepage Tromey vskip pt sp
 @c  LocalWords:  filll defcodeindex ov cv op tr syncodeindex fn cp vr ifnottex
address@hidden  LocalWords:  dir Automake's ac Dist Gnits gnits cygnus dfn 
Autoconf's pxref
address@hidden  LocalWords:  dir Automake's ac Dist Gnits gnits dfn Autoconf's 
pxref
 @c  LocalWords:  cindex Autoconf autoconf perl samp cvs dist trindex SUBST foo
 @c  LocalWords:  xs emph FIXME ref vindex pkglibdir pkgincludedir pkgdatadir mt
 @c  LocalWords:  pkg libdir cpio bindir sbindir rmt pax sbin zar zardir acindex
@@ -12971,6 +12944,7 @@ suite failures, please attach the 
@file{tests/test-suite.log} file.
 @c  LocalWords:  subsubsection OBJEXT esac lib LTLIBRARIES liblob LIBADD AR ar
 @c  LocalWords:  ARFLAGS cru ing maude libgettext lo LTLIBOBJS rpath SGI PRE yy
 @c  LocalWords:  libmaude CCLD CXXFLAGS FFLAGS LFLAGS OBJCFLAGS RFLAGS DEFS cc
address@hidden  LocalWords:  OBJCXXFLAGS
 @c  LocalWords:  SHORTNAME vtable srcdir nostdinc basename yxx cxx ll lxx gdb
 @c  LocalWords:  lexers yymaxdepth maxdepth yyparse yylex yyerror yylval lval
 @c  LocalWords:  yychar yydebug yypact yyr yydef def yychk chk yypgo pgo yyact
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index e8c5289..3f38b41 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -269,7 +269,6 @@ sub _is_valid_easy_option ($)
   return scalar grep { $opt eq $_ } qw(
     check-news
     color-tests
-    cygnus
     dejagnu
     dist-bzip2
     dist-lzip
@@ -321,6 +320,10 @@ sub _process_option_list (\%@)
           error ($where,
                  "automatic de-ANSI-fication support has been removed");
         }
+      elsif ($_ eq 'cygnus')
+        {
+          error $where, "support for Cygnus-style trees has been removed";
+        }
       elsif ($_ eq 'dist-lzma')
         {
           error ($where, "support for lzma-compressed distribution " .
@@ -340,10 +343,6 @@ sub _process_option_list (\%@)
           delete $options->{$_};
           $options->{'filename-length-max'} = [$_, $1];
         }
-      elsif ($_ eq 'silent-rules')
-        {
-          _option_must_be_from_configure ($_, $where);
-        }
       elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
         {
           _option_must_be_from_configure ($_, $where);
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 46d8cfb..ab9baad 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -185,6 +185,8 @@ my %_ac_macro_for_var =
    FCFLAGS => 'AC_PROG_FC',
    OBJC => 'AC_PROG_OBJC',
    OBJCFLAGS => 'AC_PROG_OBJC',
+   OBJCXX => 'AC_PROG_OBJCXX',
+   OBJCXXFLAGS => 'AC_PROG_OBJCXX',
    RANLIB => 'AC_PROG_RANLIB',
    UPC => 'AM_PROG_UPC',
    UPCFLAGS => 'AM_PROG_UPC',
diff --git a/lib/am/check.am b/lib/am/check.am
index 05264c6..f158e16 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -66,9 +66,128 @@ if %?PARALLEL_TESTS%
 am__cooked_tests = $(patsubst $(srcdir)/%,%,$(strip $(TESTS)))
 am__cooked_xfail_tests = $(patsubst $(srcdir)/%,%,$(strip $(XFAIL_TESTS)))
 
-# Restructured Text title and section.
+am__recheck_rx = ^[    ]*:recheck:[    ]*
+am__global_test_result_rx = ^[         ]*:global-test-result:[         ]*
+am__copy_in_global_log_rx = ^[         ]*:copy-in-global-log:[         ]*
+
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+## By default, we assume the test is to be re-run.
+  recheck = 1; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        { \
+## If we've encountered an I/O error here, there are three possibilities:
+##
+##  [1] The '.log' file exists, but the '.trs' does not; in this case,
+##      we "gracefully" recover by assuming the corresponding test is
+##      to be re-run (which will re-create the missing '.trs' file).
+##
+##  [2] Both the '.log' and '.trs' files are missing; this means that
+##      the corresponding test has not been run, and is thus *not* to
+##      be re-run.
+##
+##  [3] We have encountered some corner-case problem (e.g., a '.log' or
+##      '.trs' files somehow made unreadable, or issues with a bad NFS
+##      connection, or whatever); we don't handle such corner cases.
+##
+          if ((getline line2 < ($$0 ".log")) < 0) \
+           recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+## A directive explicitly specifying the test is *not* to be re-run.
+        { \
+          recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+        { \
+## A directive explicitly specifying the test *is* to be re-run.
+          break; \
+        } \
+## else continue with the next iteration.
+    }; \
+  if (recheck) \
+    print $$0; \
+## Don't leak open file descriptors, as this could cause serious
+## problems when there are many tests (yes, even on Linux).
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+## Don't leak open file descriptors, as this could cause serious
+## problems when there are many tests (yes, even on Linux).
+function close_current() \
+{ \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+} \
+function error(msg) \
+{ \
+  print msg | "cat >&2"; \
+  exit_status = 1; \
+} \
+function input_error(file) \
+{ \
+  error("awk" ": cannot read \"" file "\""); \
+  close_current(); \
+  next; \
+} \
+function rst_section(header) \
+{ \
+  print header; \
+  len = length(header); \
+  for (i = 1; i <= len; i = i + 1) \
+    printf "="; \
+  printf "\n\n"; \
+} \
+BEGIN { exit_status = 0; } \
+{ \
+## By default, we assume the test log is to be copied in the global log,
+## and that its result is simply "RUN" (i.e., we still don't know what
+## it outcome was, but we know that at least it has run).
+  copy_in_global_log = 1; \
+  global_test_result = "RUN"; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        input_error($$0 ".trs"); \
+      if (line ~ /$(am__global_test_result_rx)/) \
+        { \
+          sub("$(am__global_test_result_rx)", "", line); \
+          sub("[       ]*$$", "", line); \
+          global_test_result = line; \
+        } \
+      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+        copy_in_global_log = 0; \
+    }; \
+  if (copy_in_global_log) \
+    { \
+      rst_section(global_test_result ": " $$0); \
+      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+      { \
+        if (rc < 0) \
+          input_error($$0 ".log"); \
+        print line; \
+      }; \
+    }; \
+  close_current(); \
+} \
+END { \
+  if (exit_status != 0) \
+    error("fatal: making $@: I/O error reading test results"); \
+  exit(exit_status); \
+}'
+
+# Restructured Text title.
 am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-am__rst_section = { sed 'p;s/./=/g;' && echo; }
 
 # Solaris 10 'make', and several other traditional 'make' implementations,
 # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
@@ -206,32 +325,16 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) $(am__TEST_RESULTS)
          echo;                                                         \
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
-         bases='$(am__TEST_BASES)'; for i in $$bases; do               \
-## FIXME: one fork per test -- this is horrendously inefficient!
-           if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \
-                >/dev/null; then continue; \
-           fi; \
-## Get the declared "global result" of the test.
-## FIXME: yet another one fork per test here!
-           glob_res=`sed -n -e "s/$$ws*$$//" \
-                            -e "s/^$$ws*:global-test-result:$$ws*//p" \
-                       $$i.trs`; \
-## If no global result is explicitly declared, we'll merely mark the
-## test as "RUN" in the global test log.
-           test -n "$$glob_res" || glob_res=RUN; \
-## Write the name and result of the test as an RST section title.
-           echo "$$glob_res: $$i" | $(am__rst_section); \
-## Register any failure in reading test logs, to report an error later.
-           cat $$i.log || st=1; \
-           echo; \
-         done; \
-         test $$st -eq 0; \
-       } >$(TEST_SUITE_LOG).tmp; then \
-         mv -f $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
-       else \
-         rm -f $(TEST_SUITE_LOG).tmp; \
-         fatal "I/O error reading test logs"; \
-       fi; \
+         bases='$(am__TEST_BASES)';                                    \
+         for b in $$bases; do echo $$b; done                           \
+           | $(am__create_global_log);                                 \
+       } >$(TEST_SUITE_LOG).tmp; then                                  \
+         mv -f $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                \
+       else                                                            \
+## The awk program in $(am__create_global_log) should have already emitted
+## a proper error message about I/O error, no need to repeat it.
+         rm -f $(TEST_SUITE_LOG).tmp; exit 1;                          \
+       fi;                                                             \
 ## Emit the test summary on the console.
        if $$success; then                                              \
          col="$$grn";                                                  \
@@ -284,22 +387,17 @@ check-TESTS recheck:
 ## cannot use '$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-       @ws='[  ]'; \
-       log_list='' trs_list=''; bases='$(am__TEST_BASES)'; \
-       for i in $$bases; do \
+       @bases='$(am__TEST_BASES)'; \
+       if test $@ = recheck; then \
 ## If running a "make recheck", we must only consider tests that had an
-## unexpected outcome (FAIL or XPASS) in the earlier run.  In particular,
-## skip tests that haven't been run.  But recover gracefully from deleted
-## '.trs' files.
-         if test $@ = recheck; then \
-           test -f $$i.trs || test -f $$i.log || continue; \
-## FIXME: one fork per test -- this is horrendously inefficient!
-           grep "^$$ws*:recheck:$$ws*no$$ws*$$" $$i.trs \
-             >/dev/null 2>&1 && continue; \
-         else :; fi; \
-         log_list="$$log_list $$i.log"; \
-         trs_list="$$trs_list $$i.trs"; \
-       done; \
+## unexpected outcome (FAIL or XPASS) in the earlier run.
+         bases=`for i in $$bases; do echo $$i; done \
+                  | $(am__list_recheck_tests)` || exit 1; \
+       fi; \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+       trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+## Remove newlines and normalize whitespace.
+       log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
 ## Under "make recheck", remove the .log and .trs files associated
 ## with the files to recheck, so that those will be rerun by the
 ## "make test-suite.log" recursive invocation below.  But use a proper
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index f1ee471..50c1f51 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -20,24 +20,8 @@ DEJATOOL = $(PACKAGE)
 ## Default flags to pass to dejagnu.  The user can override this.
 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
 
-## In Cygnus mode, these are found in the build tree.
-## Otherwise they are looked for in $PATH.
-if %?CYGNUS%
-EXPECT = `if test -f $(top_builddir)/../expect/expect; then \
-           echo $(top_builddir)/../expect/expect; \
-         else \
-           echo expect; \
-         fi`
-
-RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then \
-            echo $(top_srcdir)/../dejagnu/runtest; \
-          else \
-            echo runtest; \
-          fi`
-else ! %?CYGNUS%
 EXPECT = expect
 RUNTEST = runtest
-endif ! %?CYGNUS%
 
 
 .PHONY: check-DEJAGNU
@@ -45,21 +29,14 @@ check-DEJAGNU: site.exp
 ## Life is easiest with an absolute srcdir, so do that.
        srcdir='$(srcdir)'; export srcdir; \
        EXPECT=$(EXPECT); export EXPECT; \
-## Allow this to work when expect and DejaGnu are in tree.
-## Only required when --cygnus in force.
-?CYGNUS?       if [ -f $(top_builddir)/../expect/expect ]; then \
-?CYGNUS?         TCL_LIBRARY=`$(am__cd) $(top_srcdir)/../tcl/library && pwd`; \
-?CYGNUS?         export TCL_LIBRARY; \
-?CYGNUS?       fi; \
-       runtest=$(RUNTEST); \
 ## If runtest can't be found, print a warning but don't die.  It is
 ## pointless to cause a failure if the tests cannot be run at all.
-       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+       if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
          exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
-           if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) 
$(RUNTESTFLAGS); \
+           if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) 
$(RUNTESTFLAGS); \
            then :; else exit_status=1; fi; \
          done; \
-       else echo "WARNING: could not find 'runtest'" 1>&2; :;\
+       else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
        fi; \
        exit $$exit_status
 
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index bb2d2a7..2c7307f 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -14,7 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-## DIST_COMMON comes first so that README can be the very first file.
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
 if %?TOPDIR_P%
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 42787c7..e78cded 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -20,26 +20,7 @@
 ## ----------- ##
 
 if %?LOCAL-TEXIS%
-if ! %?CYGNUS%
 TEXI2DVI = texi2dvi
-
-else %?CYGNUS%
-
-## Find these programs wherever they may lie.  Yes, this has
-## intimate knowledge of the structure of the texinfo distribution.
-MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
-            echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
-          else \
-            echo makeinfo; \
-          fi`
-
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
-             echo $(top_srcdir)/../texinfo/util/texi2dvi; \
-           else \
-             echo texi2dvi; \
-           fi`
-endif %?CYGNUS%
-
 TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
@@ -428,6 +409,4 @@ maintainer-clean-aminfo:
 ?MAINTCLEAN?   -test -z "%MAINTCLEAN%" \
 ?MAINTCLEAN?   || rm -rf %MAINTCLEAN%
 
-?CYGNUS?.PHONY: clean-info
-?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo
 endif %?LOCAL-TEXIS%
diff --git a/m4/acdir/README b/m4/acdir/README
index c2bf903..7c6f487 100644
--- a/m4/acdir/README
+++ b/m4/acdir/README
@@ -5,5 +5,5 @@ program.
 The .m4 files placed here could be shared among different versions
 of aclocal, so be careful.
 
-Even no actual .m4 files are present, this directory is required
+Even if no actual .m4 files are present, this directory is required
 in order for aclocal to work properly.  Please do not remove it.
diff --git a/m4/depend.m4 b/m4/depend.m4
index 9ddfd9a..0c1112e 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 16
+# serial 17
 
 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -17,7 +17,7 @@
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 # We try a few techniques and use that to set a single cache variable.
 #
 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -31,6 +31,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
                     [depcc="$$1"   am_compiler_list=])
diff --git a/m4/init.m4 b/m4/init.m4
index f479114..bbef046 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -6,7 +6,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 18
+# serial 19
 
 # 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.
@@ -99,6 +99,13 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
                  [_AM_DEPENDENCIES([OBJC])],
                  [define([AC_PROG_OBJC],
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+dnl Support for Objective C++ was only introduced in Autoconf 2.65,
+dnl but we still cater to Autoconf 2.62.
+m4_ifdef([AC_PROG_OBJCXX],
+[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+                 [_AM_DEPENDENCIES([OBJCXX])],
+                 [define([AC_PROG_OBJCXX],
+                         
defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
 ])
 AC_REQUIRE([AM_SILENT_RULES])dnl
 dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 86bd352..10e1fcf 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -38,6 +38,7 @@ ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name 
'*.am' -print)
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
 syntax_check_rules = \
+$(sc_tests_plain_check_rules) \
 sc_test_names \
 sc_diff_automake_in_automake \
 sc_diff_aclocal_in_aclocal \
@@ -65,21 +66,12 @@ sc_docs_no_make_e \
 sc_make_simple_include \
 sc_tests_make_simple_include \
 sc_tests_obsolete_variables \
-sc_tests_plain_make \
-sc_tests_plain_autoconf \
-sc_tests_plain_autoupdate \
-sc_tests_plain_automake \
-sc_tests_plain_autom4te \
-sc_tests_plain_autoheader \
-sc_tests_plain_autoreconf \
 sc_tests_here_document_format \
 sc_tests_Exit_not_exit \
 sc_tests_automake_fails \
-sc_tests_plain_aclocal \
-sc_tests_plain_perl \
 sc_tests_required_after_defs \
 sc_tests_plain_sleep \
-sc_tests_plain_egrep_fgrep \
+sc_m4_am_plain_egrep_fgrep \
 sc_tests_no_configure_in \
 sc_tests_PATH_SEPARATOR \
 sc_tests_logs_duplicate_prefixes \
@@ -89,10 +81,6 @@ sc_unquoted_DESTDIR \
 sc_tabs_in_texi \
 sc_at_in_texi
 
-$(syntax_check_rules): automake aclocal
-maintainer-check: $(syntax_check_rules)
-.PHONY: maintainer-check $(syntax_check_rules)
-
 ## Look for test whose names can cause spurious failures when used as
 ## first argument to AC_INIT (chiefly because they might contain an
 ## m4/m4sugar builtin or macro name).
@@ -410,53 +398,36 @@ sc_tests_obsolete_variables:
          exit 1; \
        else :; fi
 
-## Tests should never call make directly.
-sc_tests_plain_make:
-       @if grep -v '^#' $(xtests) | $(EGREP) ':[       ]*make( |$$)'; then \
-         echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 
1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never call autoconf directly.
-sc_tests_plain_autoconf:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoconf\>'; then \
-         echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" 
instead.' 1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never call autoupdate directly.
-sc_tests_plain_autoupdate:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoupdate\>'; then \
-         echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" 
instead.' 1>&2; \
-         exit 1; \
-       fi
-
-## Tests should never call automake directly.
-sc_tests_plain_automake:
-       @if grep -v '^#' $(xtests) | grep -E ':[        ]*automake\>([^:]|$$)'; 
then \
-         echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call autoheader directly.
-sc_tests_plain_autoheader:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoheader\>'; then \
-         echo 'Do not run "autoheader" in the above tests.  Use "$$AUTOHEADER" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call autoreconf directly.
-sc_tests_plain_autoreconf:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autoreconf\>'; then \
-         echo 'Do not run "autoreconf" in the above tests.  Use "$$AUTORECONF" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call autom4te directly.
-sc_tests_plain_autom4te:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*autom4te\>'; then \
-         echo 'Do not run "autom4te" in the above tests.  Use "$$AUTOM4TE" 
instead.' 1>&2;  \
-         exit 1; \
+## Tests should never call some programs directly, but only through the
+## corresponding variable (e.g., '$MAKE', not 'make').  This will allow
+## the programs to be overridden at configure time (for less brittleness)
+## or by the user at make time (to allow better testsuite coverage).
+sc_tests_plain_check_rules = \
+  sc_tests_plain_egrep \
+  sc_tests_plain_fgrep \
+  sc_tests_plain_make \
+  sc_tests_plain_perl \
+  sc_tests_plain_automake \
+  sc_tests_plain_aclocal \
+  sc_tests_plain_autoconf \
+  sc_tests_plain_autoupdate \
+  sc_tests_plain_autom4te \
+  sc_tests_plain_autoheader \
+  sc_tests_plain_autoreconf
+
+toupper = $(shell echo $(1) | LC_ALL=C tr '[a-z]' '[A-Z]')
+
+$(sc_tests_plain_check_rules): sc_tests_plain_% :
+       @# The leading ':' in the grep below is what is printed by the
+       @# preceding 'grep -v' after the file name.
+       @# It works here as a poor man's substitute for beginning-of-line
+       @# marker.
+       @if grep -v '^[         ]*#' $(xtests) \
+          | $(EGREP) '(:|\bif|\bnot|[;!{\|\(]|&&|\|\|)[        ]*?$*\b'; \
+        then \
+          echo 'Do not run "$*" in the above tests.' \
+               'Use "$$$(call toupper,$*)" instead.' 1>&2; \
+          exit 1; \
        fi
 
 ## Tests should only use END and EOF for here documents
@@ -492,20 +463,6 @@ sc_tests_automake_fails:
          exit 1; \
        fi
 
-## Tests should never call aclocal directly.
-sc_tests_plain_aclocal:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*aclocal\>'; then \
-         echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
-         exit 1; \
-       fi
-
-## Tests should never call perl directly.
-sc_tests_plain_perl:
-       @if grep -v '^#' $(xtests) | grep ':[   ]*perl\>'; then \
-         echo 'Do not run "perl" in the above tests.  Use "$$PERL" instead.' 
1>&2; \
-         exit 1; \
-       fi
-
 ## Setting 'required' after sourcing './defs' is a bug.
 sc_tests_required_after_defs:
        @for file in $(xtests); do \
@@ -525,13 +482,10 @@ sc_tests_plain_sleep:
        fi
 
 ## fgrep and egrep are not required by POSIX.
-sc_tests_plain_egrep_fgrep:
-       @if grep -E '\b[ef]grep\b' $(xtests) ; then \
-         echo 'Do not use egrep or fgrep in test cases.  Use $$FGREP or 
$$EGREP.' 1>&2; \
-         exit 1; \
-       fi
+sc_m4_am_plain_egrep_fgrep:
        @if grep -E '\b[ef]grep\b' $(ams) $(srcdir)/m4/*.m4; then \
-         echo 'Do not use egrep or fgrep in the above files, they are not 
portable.' 1>&2; \
+         echo 'Do not use egrep or fgrep in the above files,' \
+              'they are not portable.' 1>&2; \
          exit 1; \
        fi
 
@@ -631,3 +585,7 @@ sc_at_in_texi:
          echo 'Unescaped @.' 1>&2; \
          exit 1; \
        fi
+
+$(syntax_check_rules): automake aclocal
+maintainer-check: $(syntax_check_rules)
+.PHONY: maintainer-check $(syntax_check_rules)
diff --git a/t/aclocal.sh b/t/aclocal.sh
index 4030b13..3e0cac6 100755
--- a/t/aclocal.sh
+++ b/t/aclocal.sh
@@ -34,6 +34,11 @@ cat stderr >&2
 grep 'unrecognized option.*--unknown-option' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
 
+$ACLOCAL foobar 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'non-option argument.*foobar' stderr
+grep '[Tt]ry.*--help.*for more information' stderr
+
 $ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized option.*--ver' stderr
diff --git a/t/auxdir-autodetect.sh b/t/auxdir-autodetect.sh
index 790d1b1..41a73d5 100755
--- a/t/auxdir-autodetect.sh
+++ b/t/auxdir-autodetect.sh
@@ -121,7 +121,7 @@ grep '%%d[013]' out2 && Exit 1
 rm -f ../../missing ../../install-sh
 
 # --------------------------------------------------------- #
-:  AC_CONFIG_AUX_DIR will not be found: automake must fail  #
+:  AC_CONFIG_AUX_DIR will not be found: Automake must fail  #
 # --------------------------------------------------------- #
 
 AUTOMAKE_fails
diff --git a/t/clean2.sh b/t/clean2.sh
deleted file mode 100755
index 2599e97..0000000
--- a/t/clean2.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2004-2012 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/>.
-
-# Make sure distclean works in cygnus mode.
-# Report from Daniel Jacobowitz.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-
-data_DATA = bar
-
-bar:
-       touch $@
-
-DISTCLEANFILES = bar
-END
-
-mkdir sub
-
-cat > sub/Makefile.am << 'END'
-data_DATA = foo
-
-foo:
-       touch $@
-
-CLEANFILES = $(data_DATA)
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus
-
-./configure
-$MAKE
-ls -l
-test -f bar
-test -f sub/foo
-$MAKE distclean
-ls -l
-test ! -r bar
-test ! -r sub/foo
-test ! -r Makefile
-test ! -r config.status
-test -f Makefile.in
-test -f configure
-
-:
diff --git a/t/cond5.sh b/t/cond5.sh
index dd45678..3961303 100755
--- a/t/cond5.sh
+++ b/t/cond5.sh
@@ -64,6 +64,6 @@ while test $try -le 30; do
   fi
 done
 # The automake process probably hung.  Kill it, and exit with failure.
-echo "$me: automake process $pid hung"
+echo "$me: Automake process $pid hung"
 kill $pid
 Exit 1
diff --git a/t/cygnus-check-without-all.sh b/t/cygnus-check-without-all.sh
deleted file mode 100755
index f428e95..0000000
--- a/t/cygnus-check-without-all.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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, in cygnus mode, target "check" does not depend target
-# "all".
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-all-local:
-       : > all-target-has-failed
-       exit 1
-check-local:
-       touch check-target-has-run
-END
-
-$ACLOCAL
-$AUTOMAKE --cygnus
-
-$EGREP '(^| )all.*(:|:.* )check' Makefile.in && Exit 1
-
-$AUTOCONF
-./configure
-
-$MAKE check
-test -f check-target-has-run
-test ! -r all-target-has-failed
-# Sanity checks.
-$MAKE && Exit 1
-test -f all-target-has-failed
-
-:
diff --git a/t/cygnus-dependency-tracking.sh b/t/cygnus-dependency-tracking.sh
deleted file mode 100755
index f07c6fc..0000000
--- a/t/cygnus-dependency-tracking.sh
+++ /dev/null
@@ -1,73 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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 cygnus mode disables automatic dependency tracking.
-# And check that this *cannot* be overridden.
-
-required=cc
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-.PHONY: test-nodeps
-test-nodeps:
-       test ! -d .deps
-       test ! -d _deps
-       test ! -d '$(DEPDIR)'
-END
-
-cat > foo.c <<'END'
-#include "bar.h"
-int main ()
-{
-  GIVE_BACK 0;
-}
-END
-
-cat > bar.sav <<'END'
-#define GIVE_BACK return
-END
-
-cp bar.sav bar.h
-
-$ACLOCAL
-$AUTOMAKE --include-deps --cygnus --include-deps
-$AUTOCONF
-
-# Unknown options should cause just warnings from configure.
-./configure --enable-dependency-tracking
-$MAKE
-$MAKE test-nodeps
-
-: > bar.h
-$MAKE
-$MAKE test-nodeps
-
-# Sanity check.
-$MAKE clean
-$MAKE >out 2>&1 && { cat out; Exit 1; }
-cat out
-# Not all compilers mention the undefined symbol in the error message.
-grep GIVE_BACK out || grep main out
-
-:
diff --git a/t/cygnus-imply-foreign.sh b/t/cygnus-imply-foreign.sh
deleted file mode 100755
index 3dcf671..0000000
--- a/t/cygnus-imply-foreign.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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 'cygnus' mode imply 'foreign' mode.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-# This is *required* in cygnus mode
-AM_MAINTAINER_MODE
-END
-
-$ACLOCAL
-
-: > Makefile.am
-
-# We want complete control automake flags, while honouring the
-# user overrides for $AUTOMAKE.
-AUTOMAKE=$am_original_AUTOMAKE
-
-# Sanity check: gnu mode must complain about missing files and
-# portability problems.
-AUTOMAKE_fails
-grep 'required file.*README' stderr
-
-# But cygnus mode should imply foreign mode, so no complaints.
-# And cygnus mode should by able to override gnu and gnits modes.
-$AUTOMAKE --cygnus -Werror
-$AUTOMAKE --gnu --cygnus -Werror
-$AUTOMAKE --gnits --cygnus -Werror
-
-# Try again, this time enabling cygnus mode from Makefile.am.
-cp Makefile.am Makefile.sav
-echo 'AUTOMAKE_OPTIONS = gnu cygnus' >> Makefile.am
-$AUTOMAKE -Werror
-mv -f Makefile.sav Makefile.am
-
-# Try again, this time enabling cygnus mode from configure.ac.
-cp configure.ac configure.sav
-sed 's/^AM_INIT_AUTOMAKE$/&([gnits cygnus])/' configure.sav >configure.ac
-cmp configure.ac configure.sav && fatal_ 'failed to edit configure.ac'
-
-$ACLOCAL --force
-$AUTOMAKE -Werror
-mv -f configure.sav configure.ac
-
-:
diff --git a/t/cygnus-no-dist.sh b/t/cygnus-no-dist.sh
deleted file mode 100755
index 519f0c2..0000000
--- a/t/cygnus-no-dist.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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 cygnus mode forbids creation of distribution tarball.
-
-. ./defs || Exit 1
-
-echo AM_MAINTAINER_MODE >> configure.ac
-mv -f configure.ac configure.stub
-
-cat configure.stub - > configure.ac <<'END'
-AC_OUTPUT
-END
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus
-
-./configure
-$MAKE
-
-for target in dist distdir distcheck dist-all dist-gzip; do
-  $MAKE -n $target >out 2>&1 && { cat out; Exit 1; }
-  cat out
-  grep $target out
-done
-
-# Now check that cygnus mode in a subdirectory disables
-# distribution-building in that subdirectory.
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub1 sub2
-END
-
-mkdir sub1 sub2
-: > sub1/Makefile.am
-cat > sub2/Makefile.am <<'END'
-# The '-Wall' after 'cygnus' should ensure no warning gets
-# unintentionally disabled.  We are particularly interested
-# in override warnings, for when (below) we add the 'distdir'
-# target.
-AUTOMAKE_OPTIONS = cygnus -Wall
-END
-
-cat configure.stub - > configure.ac <<'END'
-AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_OUTPUT
-END
-
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-$MAKE
-cd sub2
-$MAKE -n distdir >out 2>&1 && { cat out; Exit 1; }
-grep distdir out
-cd ..
-
-cat >> sub2/Makefile.am <<'END'
-distdir:
-END
-$AUTOMAKE sub2/Makefile
-./config.status sub2/Makefile
-
-$MAKE distdir
-$MAKE dist
-
-:
diff --git a/t/cygnus-no-installinfo.sh b/t/cygnus-no-installinfo.sh
deleted file mode 100755
index 6f3f322..0000000
--- a/t/cygnus-no-installinfo.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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 cygnus mode enables the 'no-installinfo' option.
-
-required=makeinfo
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-info_TEXINFOS = foo.texi
-END
-
-cat > foo.texi <<'END'
address@hidden foo.info
-END
-
-$ACLOCAL
-# FIXME: -Wno-override works around a buglet in definition of $(MAKEINFO)
-# in cygnus mode; see also xfailing test 'txinfo5.test'.
-$AUTOMAKE --cygnus -Wno-override
-$AUTOCONF
-
-cwd=`pwd` || Exit 1
-./configure --prefix="$cwd"/_inst
-$MAKE
-$MAKE install
-test ! -d _inst
-test ! -r foo.info
-test ! -d _inst/share/info
-$MAKE install-info
-ls -l _inst
-test -f foo.info
-test -f _inst/share/info/foo.info
-
-:
diff --git a/t/cygnus-no-more.sh b/t/cygnus-no-more.sh
new file mode 100755
index 0000000..4be0561
--- /dev/null
+++ b/t/cygnus-no-more.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Copyright (C) 2012 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 support for Cygnus-style trees is deprecated.
+# That feature will be removed in the next major Automake release.
+# See automake bug#11034.
+
+. ./defs || Exit 1
+
+warn_rx='support for Cygnus.*trees.*removed'
+
+$ACLOCAL
+
+# Use of 'cygnus' option must raise an unconditional error, not a
+# warning.
+AUTOMAKE="$am_original_AUTOMAKE -Wnone -Wno-error"
+
+# 'cygnus' option in Makefile.am
+echo "AUTOMAKE_OPTIONS = cygnus" > Makefile.am
+AUTOMAKE_fails
+grep "^Makefile\.am:1:.*$warn_rx" stderr
+
+rm -rf autom4te*.cache
+
+# 'cygnus' option in configure.ac
+: > Makefile.am
+sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([cygnus])|" configure.ac > t
+diff configure.ac t && fatal_ "failed to edit configure.ac"
+mv -f t configure.ac
+AUTOMAKE_fails
+grep "^configure\.ac:2:.*$warn_rx" stderr
+
+:
diff --git a/t/cygnus-requires-maintainer-mode.sh 
b/t/cygnus-requires-maintainer-mode.sh
deleted file mode 100755
index b01dfbc..0000000
--- a/t/cygnus-requires-maintainer-mode.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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, in cygnus mode, maintainer mode is required.
-
-. ./defs || Exit 1
-
-: > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails --cygnus
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
-
-cat >> configure.ac <<'END'
-AC_CONFIG_FILES([sub/Makefile])
-END
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub
-END
-
-mkdir sub
-cat > sub/Makefile.am <<'END'
-AUTOMAKE_OPTIONS = cygnus
-END
-
-rm -rf autom4te.cache
-$ACLOCAL
-AUTOMAKE_fails
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-END
-
-rm -rf autom4te.cache
-$ACLOCAL
-$AUTOMAKE --cygnus
-
-:
diff --git a/t/dist-formats.tap b/t/dist-formats.tap
index d11971c..5e4b142 100755
--- a/t/dist-formats.tap
+++ b/t/dist-formats.tap
@@ -158,7 +158,7 @@ can_compress ()
   command_ok_if_have_compressor "'make dist-$format' work by default" \
     eval '
       rm -rf *$tarname* \
-        && make dist-$format \
+        && $MAKE dist-$format \
         && test -f $tarname-1.0.$suffix \
         && ls -l *$tarname* \
         && test "`ls *$tarname*`" = $tarname-1.0.$suffix'
diff --git a/t/distcom4.sh b/t/distcom4.sh
index dc37fcf..6f9d871 100755
--- a/t/distcom4.sh
+++ b/t/distcom4.sh
@@ -18,7 +18,6 @@
 # This tries to distribute a file from a subdirectory, without
 # Makefile in that directory.  distcom5.test performs the same
 # test with a Makefile in the directory.
-# Also make sure that README appears first in DIST_COMMON.
 
 . ./defs || Exit 1
 
@@ -71,7 +70,5 @@ cat dc.txt # For debugging.
 
 test 1 = `grep tests dc.txt | wc -l`
 grep configure dc.txt
-# README must come first.
-grep 'DIST_COMMON = README' Makefile.in
 
 :
diff --git a/t/ext.sh b/t/ext.sh
index dd92e85..c62dbd3 100755
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -22,18 +22,24 @@ cat >> configure.ac << 'END'
 AC_PROG_F77
 AC_PROG_FC
 AC_PROG_OBJC
+# FIXME: this is to cater to older autoconf; remove this once we
+# FIXME: automake requires Autoconf 2.65 or later.
+m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
+  AC_SUBST([OBJCXX], [whocares])
+  AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
+])
 AM_PROG_UPC
 END
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
-foo_SOURCES = 1.f 2.for 3.f90 4.f95 5.F 6.F90 7.F95 8.r 9.m 10.upc
+foo_SOURCES = 1.f 2.for 3.f90 4.f95 5.F 6.F90 7.F95 8.r 9.m 10.mm 11.upc
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-for ext in f for f90 f95 F F90 F95 r m upc
+for ext in f for f90 f95 F F90 F95 r m mm upc
 do
    # Some versions of the BSD shell wrongly exit when 'set -e' is active
    # if the last command within a compound statement fails and is guarded
diff --git a/t/flavor.sh b/t/flavor.sh
index f532406..8b999cc 100755
--- a/t/flavor.sh
+++ b/t/flavor.sh
@@ -35,8 +35,8 @@ END
 $ACLOCAL
 $AUTOCONF
 # Order flavors so that all needed files are installed early.
-for flavor in --gnits --gnu --foreign --cygnus --ignore-deps
-do
+for flavor in --gnits --gnu --foreign --ignore-deps; do
+
   $AUTOMAKE --add-missing $flavor
   ./configure --enable-maintainer-mode
   grep " $flavor" Makefile
@@ -54,6 +54,7 @@ do
   touch Makefile.am
   $MAKE
   grep " $flavor" Makefile
+
 done
 
 :
diff --git a/t/library.sh b/t/library.sh
index dffe658..1bf34de 100755
--- a/t/library.sh
+++ b/t/library.sh
@@ -20,13 +20,11 @@
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
-AM_MAINTAINER_MODE
 AC_PROG_CC
 AM_PROG_AR
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = dejagnu cygnus
 lib_LIBRARIES = libfoo.a
 libfoo_a_DEPENDENCIES = libzot.a
 END
diff --git a/t/location.sh b/t/location.sh
index e496ca6..f9dd289 100755
--- a/t/location.sh
+++ b/t/location.sh
@@ -48,10 +48,10 @@ END
 # Smash the useless difference of lib file locations.
 smash_useless_diffs ()
 {
-  # FIXME: we could get rid of the second 's|||' once we improve our
+  # FIXME: we could get rid of the second 's,,,' once we improve our
   # wrapper scripts ...
-  sed -e "s|^$am_amdir/\\([a-z]*\.am\\)|\\1|" \
-      -e "s|^automake-$APIVERSION:|automake:|" ${1+"$@"};
+  sed -e "s,^$am_amdir/\\([a-z]*\.am\\),\\1," \
+      -e "s,^automake-$APIVERSION:,automake:," ${1+"$@"};
 }
 
 $ACLOCAL
@@ -59,26 +59,28 @@ AUTOMAKE_fails -Wno-error
 
 smash_useless_diffs stderr >observed
 
-cat >expected <<\EOF
-Makefile.am:12: warning: VAR multiply defined in condition TRUE ...
-Makefile.am:8: ... 'VAR' previously defined here
-automake: error: libfoo_a_OBJECTS should not be defined
-Makefile.am:3:   while processing library 'libfoo.a'
-automake: error: use 'libfoo_a_LDADD', not 'libfoo_a_LIBADD'
-Makefile.am:3:   while processing library 'libfoo.a'
-library.am: warning: deprecated feature: target 'libfoo.a' overrides 
'libfoo.a$(EXEEXT)'
-library.am: change your target to read 'libfoo.a$(EXEEXT)'
-Makefile.am:3:   while processing library 'libfoo.a'
-program.am: target 'libfoo.a$(EXEEXT)' was defined here
-Makefile.am:1:   while processing program 'libfoo.a'
-program.am: warning: redefinition of 'libfoo.a$(EXEEXT)' ...
-Makefile.am:1:   while processing program 'libfoo.a'
-library.am: ... 'libfoo.a' previously defined here
-Makefile.am:3:   while processing library 'libfoo.a'
-tags.am: warning: redefinition of 'ctags' ...
-program.am: ... 'ctags$(EXEEXT)' previously defined here
-Makefile.am:6:   while processing program 'ctags'
-EOF
+# Apparently useless use of sed here required to avoid spuriously
+# triggering some maintainer-checks failures.
+sed 's/^> //' > expected << 'END'
+> Makefile.am:12: warning: VAR multiply defined in condition TRUE ...
+> Makefile.am:8: ... 'VAR' previously defined here
+> automake: error: libfoo_a_OBJECTS should not be defined
+> Makefile.am:3:   while processing library 'libfoo.a'
+> automake: error: use 'libfoo_a_LDADD', not 'libfoo_a_LIBADD'
+> Makefile.am:3:   while processing library 'libfoo.a'
+> library.am: warning: deprecated feature: target 'libfoo.a' overrides 
'libfoo.a$(EXEEXT)'
+> library.am: change your target to read 'libfoo.a$(EXEEXT)'
+> Makefile.am:3:   while processing library 'libfoo.a'
+> program.am: target 'libfoo.a$(EXEEXT)' was defined here
+> Makefile.am:1:   while processing program 'libfoo.a'
+> program.am: warning: redefinition of 'libfoo.a$(EXEEXT)' ...
+> Makefile.am:1:   while processing program 'libfoo.a'
+> library.am: ... 'libfoo.a' previously defined here
+> Makefile.am:3:   while processing library 'libfoo.a'
+> tags.am: warning: redefinition of 'ctags' ...
+> program.am: ... 'ctags$(EXEEXT)' previously defined here
+> Makefile.am:6:   while processing program 'ctags'
+END
 
 cat expected
 cat observed
diff --git a/t/nodep2.sh b/t/nodep2.sh
index edf0fa9..cc80058 100755
--- a/t/nodep2.sh
+++ b/t/nodep2.sh
@@ -20,7 +20,7 @@
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
-foo_SOURCES = a.c b.cpp c.m d.S e.java f.upc
+foo_SOURCES = a.c b.cpp c.m cxx.mm d.S e.java f.upc
 END
 
 cat > configure.ac << 'END'
@@ -30,6 +30,12 @@ AC_CONFIG_FILES([Makefile])
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_OBJC
+# FIXME: this is to cater to older autoconf; remove this once we
+# FIXME: automake requires Autoconf 2.65 or later.
+m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
+  AC_SUBST([OBJCXX], [whocares])
+  AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
+])
 AM_PROG_AS
 AM_PROG_GCJ
 AM_PROG_UPC
diff --git a/t/objc2.sh b/t/objc-basic.sh
similarity index 58%
rename from t/objc2.sh
rename to t/objc-basic.sh
index 290bf26..f608fbc 100755
--- a/t/objc2.sh
+++ b/t/objc-basic.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
@@ -10,22 +10,29 @@
 # 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 that Automake suggests using AC_PROG_OBJC if Objective C sources
-# are used.
+# Basic tests on the Objective C support that don't actually
+# require an Objective-C compiler.
+# See also sister test 'objcxx-basic.sh'.
 
 . ./defs || Exit 1
 
-echo AC_PROG_CC >>configure.ac
-
-cat >Makefile.am <<'END'
+cat > Makefile.am <<'END'
 bin_PROGRAMS = hello
 hello_SOURCES = hello.m
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AC_PROG_OBJC stderr
+grep "'OBJC'.* undefined" stderr
+grep "add .*'AC_PROG_OBJC'" stderr
+
+rm -rf autom4te*.cache
+
+echo AC_PROG_OBJC >> configure.ac
+
+$ACLOCAL
+$AUTOMAKE
+$EGREP '^\.SUFFIXES:.* \.m( |$)' Makefile.in
+
+:
diff --git a/t/interp3.sh b/t/objc-deps.sh
similarity index 52%
copy from t/interp3.sh
copy to t/objc-deps.sh
index 1394c6d..a2e4212 100755
--- a/t/interp3.sh
+++ b/t/objc-deps.sh
@@ -14,47 +14,59 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Variable interpolation should work even when GNU make functions are
-# involved.  This is unfortunately not the case currently, due to
-# historical and hard-to-lift limitations (this is also documented in
-# the manual, using an example that is a stripped-down version of this
-# test case).
+# Automatic dependency tracking for Objective C.
+# See also sister test 'objcxx-deps.sh'.
 
-required=cc
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
-AC_PROG_CC
+AC_PROG_OBJC
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
-xs = one two
-foo_SOURCES = main.c $(foreach base, $(xs), $(base).c $(base).h)
+foo_SOURCES = bar.m baz.h baz2.h
 END
 
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
+cat > baz.h << 'END'
+#include <stdio.h>
+#include <stdlib.h>
+#include "baz2.h"
+END
 
-echo 'int one (void) { return 1; }' > one.c
-echo 'extern int one (void);' > one.h
-echo 'int two (void) { return 2; }' > two.c
-echo 'extern int two (void);' > two.h
+cat > baz2.h << 'END'
+#define MSG "Hello, World"
+END
 
-cat > main.c <<'END'
-#include "one.h"
-#include "two.h"
-int maint (void)
+cat > bar.m << 'END'
+/* The use of #import makes this valid Object C but invalid C. */
+#import "baz.h"
+int main (void)
 {
-  return one () + two ();
+    fprintf (stdout, "%s\n", MSG);
+    return EXIT_SUCCESS;
 }
 END
 
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure --enable-dependency-tracking
 $MAKE
+cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+$sleep
+: > old
+echo '#define MSG "Howdy, Earth"' > baz2.h
+$MAKE
+if test -f foo; then
+  is_newest foo old
+else
+  is_newest foo.exe old
+fi
+cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+
 $MAKE distcheck
 
 :
diff --git a/t/objc-flags.sh b/t/objc-flags.sh
new file mode 100755
index 0000000..6c2b1e6
--- /dev/null
+++ b/t/objc-flags.sh
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2012 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 Objective C compilation flags.
+
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_OBJC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AM_DEFAULT_SOURCE_EXT = .m
+bin_PROGRAMS = foo2 foo4
+AM_OBJCFLAGS = -DVALUE=2 -DERROR=1
+foo4_OBJCFLAGS = -DVALUE=4 -DERROR=1
+END
+
+for i in 2 4; do
+  unindent > foo$i.m << END
+    /* Let's make this file valid Objective C but invalid C. */
+    #import <stdlib.h>
+    @interface Who_Cares { } @end
+    #ifdef ERROR
+    #  error "macro ERROR is defined for foo.m"
+    #else
+    #  if VALUE == $i
+         int main (void) { exit (0); }
+    #  else
+    #    error "VALUE is != $i in foo.m"
+    #  endif
+    #endif
+END
+done
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+$FGREP OBJCFLAGS Makefile.in # For debugging.
+grep '\$(OBJCFLAGS).*\$(AM_OBJCFLAGS)'       Makefile.in && Exit 1
+grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)'    Makefile.in && Exit 1
+grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && Exit 1
+
+./configure OBJCFLAGS=-UERROR
+$MAKE 
+
+:
diff --git a/t/objc-megademo.sh b/t/objc-megademo.sh
new file mode 100755
index 0000000..bad2aee
--- /dev/null
+++ b/t/objc-megademo.sh
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Copyright (C) 2012 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/>.
+
+# Stress test on Objective C/C++.
+
+required=libtoolize
+. ./defs || Exit 1
+
+## Autotools Input Files.
+
+cat > configure.ac << 'END'
+AC_INIT([play], [1.3], address@hidden)
+
+dnl Support for Object C++ was introduced only in Autoconf 2.65.
+AC_PREREQ([2.65])
+AC_CONFIG_SRCDIR([play.c])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE
+
+AM_PROG_AR
+LT_INIT
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_OBJC
+AC_PROG_OBJCXX
+
+AC_LANG_PUSH([Objective C])
+AC_CACHE_CHECK(
+  [whether the Objective C compiler really works],
+  [my_cv_objc_works],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#import <stdio.h>]],
+                                   [[printf ("foo\n");]])],
+                  [my_cv_objc_works=yes],
+                  [my_cv_objc_works=no])])
+AC_LANG_POP([Objective C])
+
+AC_LANG_PUSH([Objective C++])
+AC_CACHE_CHECK(
+  [whether the Objective C++ compiler really works],
+  [my_cv_objcxx_works],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#import <iostream>]],
+                                   [[std::cout << "foo" << "\n";]])],
+                  [my_cv_objcxx_works=yes],
+                  [my_cv_objcxx_works=no])])
+AC_LANG_POP([Objective C++])
+
+if test $my_cv_objc_works != yes; then
+  AC_MSG_ERROR([couldn't find a working Objective C compiler], [77])
+fi
+
+if test $my_cv_objcxx_works != yes; then
+  AC_MSG_ERROR([couldn't find a working Objective C++ compiler], [77])
+fi
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = play
+play_SOURCES = play.h play.c playxx.cxx playo.m playoxx.mm
+play_LDADD = libfoo.la
+play_LDFLAGS = -lobjc
+lib_LTLIBRARIES = libfoo.la
+libfoo_la_SOURCES = foo.h foo.c fooxx.cxx fooo.m foooxx.mm
+END
+
+## Run Autotools.
+
+libtoolize
+if $ACLOCAL; then
+  : We have a modern enough autoconf, go ahead.
+elif test $? -eq 63; then
+  skip_ "Object C++ support requires Autoconf 2.65 or later"
+else
+  Exit 1 # Some other aclocal failure.
+fi
+$AUTOHEADER
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+## Program Sources.
+
+cat > play.h << 'END'
+#ifndef PLAY_H
+#define PLAY_H
+
+#include "foo.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void hello_cxx (void);
+void hello_objc (void);
+void hello_objcxx (void);
+
+#ifdef __OBJC__
address@hidden Hello_ObjC
+{ }
++ (void)display;
address@hidden
+#endif /* __OBJC__ */
+
+#ifdef __cplusplus
+}
+
+class Hello_CXX
+{
+  public:
+    Hello_CXX() { }
+    virtual ~Hello_CXX () { }
+    void hello_cxx ();
+};
+
+#ifdef __OBJC__
address@hidden Hello_ObjCXX
+{ }
++ (void)display;
address@hidden
+
+class Hello_OBJCXX
+{
+  public:
+    Hello_OBJCXX () { }
+    virtual ~Hello_OBJCXX () { }
+    void hello_objcxx();
+};
+#endif /* __OBJC__ */
+
+#endif /* __cplusplus */
+
+#endif /* PLAY_H */
+END
+
+cat > play.c << 'END'
+#include "play.h"
+int main (void)
+{
+  printf ("[Hello C,");
+  world_c ();
+  hello_cxx ();
+  hello_objc ();
+  hello_objcxx ();
+  return 0;
+}
+END
+
+cat > playxx.cxx << 'END'
+#include "play.h"
+
+void hello_cxx(void)
+{
+  Hello_CXX *hello = new Hello_CXX;
+  hello->hello_cxx();
+}
+
+void Hello_CXX::hello_cxx()
+{
+  std::cout << "[Hello C++,";
+  World_CXX *world = new World_CXX;
+  world->world_cxx();
+}
+END
+
+cat > playo.m << 'END'
+#import "play.h"
+
+void hello_objc (void)
+{
+  [Hello_ObjC display];
+}
+
address@hidden Hello_ObjC
++ (void)display
+{
+  printf ("[Hello ObjC,");
+  [World_ObjC display];
+}
address@hidden
+END
+
+cat > playoxx.mm << 'END'
+#import "play.h"
+
+// Calling: C -> C++ -> ObjC
+
+void hello_objcxx (void)
+{
+  Hello_OBJCXX *hello = new Hello_OBJCXX;
+  hello->hello_objcxx ();
+}
+
+void Hello_OBJCXX::hello_objcxx ()
+{
+  [Hello_ObjCXX display];
+}
+
address@hidden Hello_ObjCXX
++ (void)display
+{
+  std::cout << "[Hello ObjC++,";
+  [World_ObjCXX display];
+}
address@hidden
+END
+
+## Library Sources.
+
+cat > foo.h << 'END'
+#ifndef FOO_H
+#define FOO_H
+
+#ifdef __cplusplus
+#include <iostream>
+extern "C" {
+#else
+#include <stdio.h>
+#endif
+
+void world_c (void);
+
+#ifdef __OBJC__
address@hidden World_ObjC
+{ }
++ (void)display;
address@hidden
+#endif /* __OBJC__ */
+
+#ifdef __cplusplus
+}
+
+class World_CXX
+{
+  public:
+    World_CXX() { }
+    virtual ~World_CXX () { }
+    void world_cxx ();
+};
+
+#ifdef __OBJC__
+class World_OBJCXX
+{
+  public:
+    World_OBJCXX () { }
+    virtual ~World_OBJCXX () { }
+    void world_objcxx ();
+};
+
address@hidden World_ObjCXX
+{ }
++ (void)display;
address@hidden
+#endif /* __OBJC__ */
+
+#endif /* __cplusplus */
+
+#endif /* FOO_H */
+END
+
+cat > foo.c << 'END'
+#include "foo.h"
+
+void world_c (void)
+{
+  printf (" world C]\n");
+}
+END
+
+cat > fooxx.cxx << 'END'
+#include "foo.h"
+
+void World_CXX::world_cxx ()
+{
+  std::cout << " world C++]" << "\n";
+}
+END
+
+cat > fooo.m << 'END'
+#import "foo.h"
+
address@hidden World_ObjC
++ (void)display
+{
+  printf (" world ObjC]\n");
+}
address@hidden
+END
+
+cat > foooxx.mm << 'END'
+#import "foo.h"
+
+// Calling: ObjC -> C++
+
address@hidden World_ObjCXX
++ (void)display
+{
+  World_OBJCXX *world = new World_OBJCXX;
+  world->world_objcxx ();
+}
address@hidden
+
+void World_OBJCXX::world_objcxx ()
+{
+  std::cout << " world ObjC++]" << "\n";
+}
+END
+
+## Configure and build.
+
+./configure
+$MAKE
+
+if cross_compiling; then :; else
+  unindent > exp << 'END'
+    [Hello C, world C]
+    [Hello C++, world C++]
+    [Hello ObjC, world ObjC]
+    [Hello ObjC++, world ObjC++]
+END
+  ./play > got || { cat got; Exit 1; }
+  cat exp
+  cat got
+  diff exp got
+fi
+
+$MAKE distcheck
+
+:
diff --git a/t/objc-minidemo.sh b/t/objc-minidemo.sh
new file mode 100755
index 0000000..acd7e19
--- /dev/null
+++ b/t/objc-minidemo.sh
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2012 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/>.
+
+# Dummy demo package using Objective C and doing distcheck.
+# See also sister test 'objcxx-minidemo.sh'.
+
+required=native
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_OBJC
+AC_CONFIG_HEADERS([config.h])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AM_DEFAULT_SOURCE_EXT = .m
+bin_PROGRAMS = ok
+noinst_PROGRAMS = ko
+TESTS = $(bin_PROGRAMS) $(XFAIL_TESTS)
+XFAIL_TESTS = $(noinst_PROGRAMS)
+END
+
+cat > ok.m << 'END'
+/* The use of #import makes this valid Object C but invalid C. */
+#import <stdio.h>
+#import <config.h>
+int main (void)
+{
+    printf ("Success (%s)\n", PACKAGE_STRING);
+    return 0;
+}
+END
+
+cat > ko.m << 'END'
+/* The use of #import makes this valid Object C but invalid C. */
+#import <stdio.h>
+int main (void)
+{
+    printf("Failure\n");
+    return 1;
+}
+END
+
+if $ACLOCAL; then
+  : We have a modern enough autoconf, go ahead.
+elif test $? -eq 63; then
+  skip_ "Object C++ support requires Autoconf 2.65 or later"
+else
+  Exit 1 # Some other aclocal failure.
+fi
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/objc.sh b/t/objc.sh
deleted file mode 100755
index f56c76d..0000000
--- a/t/objc.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001-2012 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 that '.m' extension works.
-# From Ralf Corsepius (for C++).
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_OBJC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = hello
-hello_SOURCES = hello.m
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep '^\.SUFFIXES:.*\.m' Makefile.in
-
-:
diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh
new file mode 100755
index 0000000..be2cdf7
--- /dev/null
+++ b/t/objcxx-basic.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 2012 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.
+
+# Basic tests on the Objective C++ support that don't actually
+# require an Objective-C++ compiler.
+# See also sister test 'objc-basic.sh'.
+
+. ./defs || Exit 1
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = hello
+hello_SOURCES = hello.mm
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep "'OBJCXX'.* undefined" stderr
+grep "add .*'AC_PROG_OBJCXX'" stderr
+
+rm -rf autom4te*.cache
+
+cat >> configure.ac <<'END'
+dnl Support for Object C++ was introduced only in Autoconf 2.65.
+AC_PREREQ([2.65])
+AC_PROG_OBJCXX
+END
+
+if $ACLOCAL; then
+  : We have a modern enough autoconf, go ahead.
+elif test $? -eq 63; then
+  skip_ "Object C++ support requires Autoconf 2.65 or later"
+else
+  Exit 1 # Some other aclocal failure.
+fi
+
+$AUTOMAKE
+$EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
+
+:
diff --git a/t/objcxx-deps.sh b/t/objcxx-deps.sh
new file mode 100755
index 0000000..782193a
--- /dev/null
+++ b/t/objcxx-deps.sh
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2012 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/>.
+
+# Automatic dependency tracking for Objective C++.
+# See also sister test 'objc-deps.sh'.
+
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+dnl Support for Object C++ was introduced only in Autoconf 2.65.
+AC_PREREQ([2.65])
+AC_PROG_OBJCXX
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = bar.mm baz.h++ baz2.hh
+END
+
+cat > baz.h++ << 'END'
+#include <iostream>
+#include "baz2.hh"
+END
+
+cat > baz2.hh << 'END'
+#define MSG "Hello, World"
+END
+
+cat > bar.mm << 'END'
+/* The use of #import makes this valid Object C++ but invalid C++. */
+#import "baz.h++"
+int main (void)
+{
+    std::cout << MSG << "\n";
+    return 0;
+}
+END
+
+if $ACLOCAL; then
+  : We have a modern enough autoconf, go ahead.
+elif test $? -eq 63; then
+  skip_ "Object C++ support requires Autoconf 2.65 or later"
+else
+  Exit 1 # Some other aclocal failure.
+fi
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure --enable-dependency-tracking
+$MAKE
+cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+
+$sleep
+: > old
+echo '#define MSG "Howdy, Earth"' > baz2.hh
+$MAKE
+if test -f foo; then
+  is_newest foo old
+else
+  is_newest foo.exe old
+fi
+cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+
+$MAKE distcheck
+
+:
diff --git a/t/objcxx-flags.sh b/t/objcxx-flags.sh
new file mode 100755
index 0000000..aea7e19
--- /dev/null
+++ b/t/objcxx-flags.sh
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2012 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 Objective C++ compilation flags.
+# See also sister test 'objc-flags.sh'.
+
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+dnl Support for Object C++ was introduced only in Autoconf 2.65.
+AC_PREREQ([2.65])
+AC_PROG_OBJCXX
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AM_DEFAULT_SOURCE_EXT = .mm
+bin_PROGRAMS = foo2 foo4
+AM_OBJCXXFLAGS = -DVALUE=2 -DERROR=1
+foo4_OBJCXXFLAGS = -DVALUE=4 -DERROR=1
+END
+
+for i in 2 4; do
+  unindent > foo$i.mm << END
+    /* Let's make this file valid Objective C but invalid C. */
+    #import <stdlib.h>
+    @interface Who_Cares { } @end
+    #ifdef ERROR
+    #  error "macro ERROR is defined for foo.mm"
+    #else
+    #  if VALUE == $i
+         int main (void) { exit (0); }
+    #  else
+    #    error "VALUE is != $i in foo.mm"
+    #  endif
+    #endif
+END
+done
+
+if $ACLOCAL; then
+  : We have a modern enough autoconf, go ahead.
+elif test $? -eq 63; then
+  skip_ "Object C++ support requires Autoconf 2.65 or later"
+else
+  Exit 1 # Some other aclocal failure.
+fi
+
+$AUTOCONF
+$AUTOMAKE -a
+
+$FGREP OBJCXXFLAGS Makefile.in # For debugging.
+grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)'       Makefile.in && Exit 1
+grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)'    Makefile.in && Exit 1
+grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && Exit 1
+
+./configure OBJCXXFLAGS=-UERROR
+$MAKE 
+
+:
diff --git a/t/objcxx-minidemo.sh b/t/objcxx-minidemo.sh
new file mode 100755
index 0000000..74e152c
--- /dev/null
+++ b/t/objcxx-minidemo.sh
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2012 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/>.
+
+# Dummy demo package using Objective C++ and doing distcheck.
+# See also sister test 'objc-minidemo.sh'.
+
+required=native
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+dnl Support for Object C++ was introduced only in Autoconf 2.65.
+AC_PREREQ([2.65])
+AC_PROG_OBJCXX
+AC_CONFIG_HEADERS([config.h])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AM_DEFAULT_SOURCE_EXT = .mm
+bin_PROGRAMS = ok
+noinst_PROGRAMS = ko
+TESTS = $(bin_PROGRAMS) $(XFAIL_TESTS)
+XFAIL_TESTS = $(noinst_PROGRAMS)
+END
+
+cat > ok.mm << 'END'
+/* The use of #import makes this valid Object C++ but invalid C++. */
+#import <iostream>
+#import <config.h>
+int main (void)
+{
+    std::cout << "Success (" << PACKAGE_STRING << ")\n";
+    return 0;
+}
+END
+
+cat > ko.mm << 'END'
+/* The use of #import makes this valid Object C++ but invalid C++. */
+#import <cstdio>
+int main (void)
+{
+    printf("Failure\n");
+    return 1;
+}
+END
+
+if $ACLOCAL; then
+  : We have a modern enough autoconf, go ahead.
+elif test $? -eq 63; then
+  skip_ "Object C++ support requires Autoconf 2.65 or later"
+else
+  Exit 1 # Some other aclocal failure.
+fi
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/parallel-tests-unreadable.sh b/t/parallel-tests-unreadable.sh
index 02b711d..6bc9fba 100755
--- a/t/parallel-tests-unreadable.sh
+++ b/t/parallel-tests-unreadable.sh
@@ -75,16 +75,19 @@ could_not_read ()
   #   $ grep foo unreadable-file # Solaris 10
   #   grep: can't open "unreadable"
   #
+  # Plus, we must cater to error messages displayed by our own awk
+  # script: "cannot read "unreadable"".
+  #
   # FIXME: this might still needs adjustments on other systems ...
   #
   grep "$1:.*[pP]ermission denied" stderr \
-    || $EGREP "can(no|')t open [\"'\`]?$1" stderr
+    || $EGREP "can(no|')t (open|read) [\"'\`]?$1" stderr
 }
 
 for lst in bar.log 'foo.log bar.log'; do
   doit $lst
   could_not_read bar.log
-  grep 'test-suite\.log:.* I/O error reading test logs' stderr
+  grep 'test-suite\.log:.* I/O error reading test results' stderr
 done
 
 doit foo.trs
diff --git a/t/rst-formatting.sh b/t/rst-formatting.sh
deleted file mode 100755
index f23c28c..0000000
--- a/t/rst-formatting.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2012 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/>.
-
-# Parallel testsuite harness: check APIs for the registering the
-# "global test result" in '*.trs' files, as documented in the automake
-# manual.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-sed -n '/^am__rst_[a-z_][a-z_]* =/p' "$am_amdir"/check.am > Makefile \
-  || framework_failure_ "fetching definitions from check.am"
-
-cat >> Makefile << 'END'
-test:
-       printf '%s\n' "$$in" | $(am__rst_title) > title-got
-       printf '%s\n' "$$in" | $(am__rst_section) > section-got
-       cat title-exp
-       cat title-got
-       diff title-exp title-got
-       cat section-exp
-       cat section-got
-       diff section-exp section-got
-END
-
-# -------------------------------------------------------------------------
-
-cat > title-exp <<'END'
-==============
-   ab cd ef
-==============
-
-END
-
-cat > section-exp <<'END'
-ab cd ef
-========
-
-END
-
-env in='ab cd ef' $MAKE test
-
-# -------------------------------------------------------------------------
-
-cat > title-exp <<'END'
-============================================================================
-   0123456789012345678901234567890123456789012345678901234567890123456789
-============================================================================
-
-END
-
-cat > section-exp <<'END'
-0123456789012345678901234567890123456789012345678901234567890123456789
-======================================================================
-
-END
-
-in=0123456789012345678901234567890123456789012345678901234567890123456789
-env in=$in $MAKE test
-
-# -------------------------------------------------------------------------
-
-cat > title-exp <<'END'
-=======
-   x
-=======
-
-END
-
-cat > section-exp <<'END'
-x
-=
-
-END
-
-env in=x $MAKE test
-
-# -------------------------------------------------------------------------
-
-:
diff --git a/t/suffix.sh b/t/suffix.sh
index f9944cb..600aedf 100755
--- a/t/suffix.sh
+++ b/t/suffix.sh
@@ -32,6 +32,8 @@ END
 
 for use_arlib in false :; do
 
+  rm -rf autom4te*.cache
+
   if $use_arlib; then
     am_warns=
     echo AM_PROG_AR >> configure.ac
@@ -40,7 +42,7 @@ for use_arlib in false :; do
     am_warns=-Wno-extra-portability
   fi
 
-  $ACLOCAL --force
+  $ACLOCAL
 
   $AUTOMAKE $am_warns -i
   grep '^ *\.c' Makefile.in # For debugging.
diff --git a/t/tap-signal.tap b/t/tap-signal.tap
index 867b762..d35ee6f 100755
--- a/t/tap-signal.tap
+++ b/t/tap-signal.tap
@@ -49,7 +49,7 @@ for sig in $all_signals; do
   # to themselves consistently).  The shebang is dummy here, as we prefer
   # to rely on the definition of TEST_LOG_COMPILER instead.
   unindent > signal-$sig.test <<END
-    #! perl
+    #! /usr/bin/env perl
     # We need autoflush to avoid losing output, which could cause spurious
     # "no test plan seen" in the TAP driver.
     BEGIN { $| = 1 }
@@ -95,7 +95,8 @@ signal_caught ()
   wbound_re="($|[^a-zA-Z0-9_-])"
   pfx_re="^ERROR: signal-$numeric\\.test"
   case $am_tap_implementation in
-    perl) rx="$pfx_re - terminated by signal $sig_re$";;
+    # Dummy escape to please maintainer-check.
+    per\l) rx="$pfx_re - terminated by signal $sig_re$";;
     shell) rx="$pfx_re .*terminated by signal $sig_re$wbound_re";;
     *) fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'";;
   esac
diff --git a/t/testsuite-recheck-speed.sh b/t/testsuite-recheck-speed.sh
new file mode 100755
index 0000000..9b37262
--- /dev/null
+++ b/t/testsuite-recheck-speed.sh
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2012 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 performance of recheck target in the face of many failed tests.
+# FIXME: this test is not currently able to detect whether the measured
+# FIXME: performance is too low, and FAIL accordingly; it just offers an
+# FIXME: easy way to verify how effective a performance optimization is.
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+count=5000
+
+cat >> configure.ac <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+count_expected = $count
+TEST_EXTENSIONS = .t
+## Updated later.
+TESTS =
+END
+
+# This should ensure that our timing won't be disturbed by the time
+# that would be actually required to run any of:
+#  - the test cases
+#  - the test driver executing them
+#  - the recipe to create the final test-suite log.
+cat >> Makefile.am << 'END'
+AUTOMAKE_OPTIONS = -Wno-override
+## These should never be run.
+T_LOG_COMPILER = false
+T_LOG_DRIVER = false
+
+# The recipe of this also serves as a sanity check.
+$(TEST_SUITE_LOG):
+## For debugging.
+       @echo "RE-RUN:"; for i in $(TEST_LOGS); do echo "  $$i"; done
+## All the test cases should have been re-run.
+       @count_got=`for i in $(TEST_LOGS); do echo $$i; done | wc -l` \
+         && echo "Count expected: $(count_expected)" \
+         && echo "Count obtained: $$count_got" \
+         && test $$count_got -eq $(count_expected)
+## Pre-existing log files of the tests to re-run should have been
+## removed by the 'recheck' target
+       @for i in $(TEST_LOGS); do \
+         test ! -f $$i.log || { echo "$$i.log exists!"; exit 1; }; \
+       done
+## Actually create the target file, for extra safety.
+       @echo dummy > $@
+END
+
+# Updated later.
+: > all
+
+# Temporarily disable shell traces, to avoid bloating the log file.
+set +x
+
+for i in `seq_ 1 $count`; do
+  echo dummy $i > $i.log
+  echo :global-test-result: PASS > $i.trs
+  echo :test-result: PASS >> $i.trs
+  echo :recheck: yes >> $i.trs
+  echo TESTS += $i.t >> Makefile.am
+  echo $i >> all
+done
+
+# Re-enable shell traces.
+set -x
+
+# So that we don't need to create a ton of dummy tests.
+echo '$(TESTS):' >> Makefile.am
+
+head -n 100 Makefile.am || : # For debugging.
+tail -n 100 Makefile.am || : # Likewise.
+cat $count.trs               # Likewise, just the last specimen though.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE recheck
+
+:
diff --git a/t/testsuite-summary-count-many.sh 
b/t/testsuite-summary-count-many.sh
index 58157ad..ff38097 100755
--- a/t/testsuite-summary-count-many.sh
+++ b/t/testsuite-summary-count-many.sh
@@ -56,9 +56,7 @@ $PERL -w -e '
   use warnings FATAL => "all";
   use strict;
 
-  # FIXME: we would like this to be 1000 or even 10000, but the current
-  # implementation is too slow to handle that :-(
-  my $base = 5;
+  my $base = 1000;
   my %count = (
     TOTAL => $base * 1000,
     PASS  => $base * 700,
diff --git a/t/testsuite-summary-speed.sh b/t/testsuite-summary-speed.sh
new file mode 100755
index 0000000..4d18c61
--- /dev/null
+++ b/t/testsuite-summary-speed.sh
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2012 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 performanceof recipe generating test-suite.log file and testsuite
+# summary.  That has suffered of huge inefficiencies in the past.
+# FIXME: this test is not currently able to detect whether the measured
+# FIXME: performance is too low, and FAIL accordingly; it just offers
+# FIXME: an easy way verify how effective a performance optimization is.
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+count=10000
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+TEST_EXTENSIONS = .t
+## Will be updated later.
+TESTS =
+## None of these should ever be run.
+T_LOG_COMPILER = false
+T_LOG_DRIVER = false
+END
+
+# Temporarily disable shell traces, to avoid bloating the log file.
+set +x
+
+for i in `seq_ 1 $count`; do
+  echo false > $i.t
+  echo dummy $i > $i.log
+  echo :global-test-result: PASS > $i.trs
+  echo :test-result: PASS >> $i.trs
+  echo :copy-in-global-log: yes >> $i.trs
+  echo TESTS += $i.t
+done >> Makefile.am 
+
+# Re-enable shell traces.
+set -x
+
+head -n 100 Makefile.am || : # For debugging.
+tail -n 100 Makefile.am || : # Likewise.
+cat $count.trs               # Likewise, just the last specimen though.
+
+# So that we don't need to create a ton of dummy tests.
+#echo '$(TESTS):' >> Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+# Sanity checks.
+grep "^# TOTAL: $count$" stdout
+grep "^dummy $count$" test-suite.log
+specimen=347 # Could be any number <= $count.
+grep "^dummy $specimen$" test-suite.log
+
+:
diff --git a/t/txinfo5.sh b/t/txinfo5.sh
deleted file mode 100755
index 9e42823..0000000
--- a/t/txinfo5.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-2012 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 that texinfo.tex is not required by --cygnus.
-# Also check that TEXINFOS + cygnus work without requiring the
-# '-Wno-override' option.
-# See also sister test txinfo5b.test.
-# Report from Ian Taylor.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus
-
-:
diff --git a/t/txinfo5b.sh b/t/txinfo5b.sh
deleted file mode 100755
index c4eac53..0000000
--- a/t/txinfo5b.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-2012 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 that texinfo.tex is not required by --cygnus.
-# See also sister test txinfo5.test.
-# Report from Ian Taylor.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-# Disable 'override' warning to work around an unrelated
-# texi+cygnus bug.
-AUTOMAKE_OPTIONS = -Wno-override
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus
-$AUTOMAKE -a --cygnus
-test ! -f texinfo.tex
-
-:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]