Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 29 Feb 2012 18:50:18 +0000 (19:50 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 29 Feb 2012 18:50:18 +0000 (19:50 +0100)
* maint:
  vala: fix 'valac' calls for projects with mixed Vala/C
  vala: expose automake bug#10894

1  2 
THANKS
automake.in
tests/list-of-tests.mk

diff --combined THANKS
--- 1/THANKS
--- 2/THANKS
+++ b/THANKS
@@@ -69,10 -69,7 +69,10 @@@ danbp                       danpb@nospam.postmaster.co.u
  Daniel Jacobowitz     drow@false.org
  Daniel Kahn Gillmor   dkg@fifthhorseman.net
  Daniel Richard G.     skunk@iskunk.org
 +Debarshi Ray          rishi@gnu.org
  Dave Brolley          brolley@redhat.com
 +Dave Goodell          goodell@mcs.anl.gov
 +Dave Hart             davehart@gmail.com
  Dave Korn             dave.korn.cygwin@googlemail.com
  Dave Morrison         dave@bnl.gov
  David A. Swierczek    swiercze@mr.med.ge.com
@@@ -153,7 -150,6 +153,7 @@@ Jared Davis                abiword@aiksaurus.co
  Jason Duell           jcduell@lbl.gov
  Jason Molenda         crash@cygnus.co.jp
  Jeff Bailey           Jbailey@phn.ca
 +Jeff A. Daily         jeff.daily@pnl.gov
  Jeff Garzik           jgarzik@pobox.com
  Jeff Squyres          jsquyres@lam-mpi.org
  Jens Elkner           elkner@imsgroup.de
@@@ -268,7 -264,7 +268,7 @@@ Olivier Louchart-Fletcher olivier@zipwo
  Olly Betts            olly@muscat.co.uk
  Oren Ben-Kiki         oren@ben-kiki.org
  Owen Taylor           otaylor@redhat.com
 -Quentin Glidic                sardemff7+gnu@sardemff7.net
 +Panther Martin                mrsmiley98@lycos.com
  Patrick Welche                prlw1@newn.cam.ac.uk
  Patrik Weiskircher    me@justp.at
  Paul Berrevoets               paul@swi.com
@@@ -299,6 -295,6 +299,7 @@@ Phil Nelson                phil@cs.wwu.ed
  Philip Fong           pwlfong@users.sourceforge.net
  Philip S Tellis               philip@ncst.ernet.in
  Пухальский Юрий Андреевич pooh@cryptopro.ru
++Quentin Glidic                sardemff7+gnu@sardemff7.net
  Rainer Orth           ro@techfak.uni-bielefeld.de
  Rafael Laboissiere    laboissiere@psy.mpg.de
  Rainer Tammer         tammer@tammer.net
@@@ -321,7 -317,6 +322,7 @@@ Roberto Bagnara            bagnara@cs.unipr.i
  Roman Fietze          roman.fietze@telemotive.de
  Ronald Landheer               ronald@landheer.com
  Roumen Petrov         bugtrack@roumenpetrov.info
 +Russ Allbery          rra@stanford.edu
  Rusty Ballinger               rusty@rlyeh.engr.sgi.com
  Ryan Lortie           desrt@desrt.ca
  Ryan T. Sammartino    ryants@shaw.ca
@@@ -361,7 -356,6 +362,7 @@@ Thomas Tanner              tanner@ffii.or
  Toralf Förster               toralf.foerster@gmx.de
  Tim Goodwin           tjg@star.le.ac.uk
  Tim Mooney            mooney@dogbert.cc.ndsu.NoDak.edu
 +Tim Retout            diocles@debian.org
  Tim Rice              tim@multitalents.net
  Tim Van Holder                tim.van.holder@pandora.be
  Toshio Kuratomi               toshio@tiki-lounge.com
@@@ -371,7 -365,6 +372,7 @@@ Ulrich Eckhardt            eckhardt@satorlaser.co
  Václav Haisman               V.Haisman@sh.cvut.cz
  Vadim Zeitlin         Vadim.zeitlin@dptmaths.ens-cachan.fr
  Vincent Lefevre               vincent@vinc17.org
 +Vladimir Serbinenko   phcoder@gmail.com
  Volker Boerchers      vboerchers@tecon.de
  Werner John           john@oswf.de
  Werner Koch           wk@isil.d.shuttle.de
diff --combined automake.in
@@@ -6,7 -6,9 +6,7 @@@ eval 'case $# in 0) exec @PERL@ -S "$0"
      if 0;
  
  # automake - create Makefile.in from Makefile.am
 -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
 -# Software Foundation, Inc.
 +# Copyright (C) 1994-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
@@@ -35,7 -37,7 +35,7 @@@ BEGI
    # Override SHELL.  This is required on DJGPP so that system() uses
    # bash, not COMMAND.COM which doesn't quote arguments properly.
    # Other systems aren't expected to use $SHELL when Automake
 -  # runs, but it should be safe to drop the `if DJGPP' guard if
 +  # runs, but it should be safe to drop the "if DJGPP" guard if
    # it turns up other systems need the same thing.  After all,
    # if SHELL is used, ./configure's SHELL is always better than
    # the user's SHELL (which may be something like tcsh).
@@@ -51,7 -53,8 +51,7 @@@ struct (# Short name of the language (c
        # List of configure variables which must be defined.
        'config_vars' => '@',
  
 -      'ansi'    => "\$",
 -      # `pure' is `1' or `'.  A `pure' language is one where, if
 +      # 'pure' is '1' or ''.  A 'pure' language is one where, if
        # all the files in a directory are of that language, then we
        # do not require the C compiler or any code to call it.
        'pure'   => "\$",
@@@ -186,7 -189,7 +186,7 @@@ my $RULE_PATTERN 
  
  # Only recognize leading spaces, not leading tabs.  If we recognize
  # leading tabs here then we need to make the reader smarter, because
 -# otherwise it will think rules like `foo=bar; \' are errors.
 +# otherwise it will think rules like 'foo=bar; \' are errors.
  my $ASSIGNMENT_PATTERN = '^ *([^ \t=:+]*)\s*([:+]?)=\s*(.*)' . "\$";
  # This pattern recognizes a Gnits version id and sets $1 if the
  # release is an alpha release.  We also allow a suffix which can be
@@@ -205,6 -208,8 +205,6 @@@ my $INCLUDE_PATTERN = ('^include\s+
                       . '|(\$\(srcdir\)/' . $PATH_PATTERN . ')'
                       . '|([^/\$]' . $PATH_PATTERN . '))\s*(#.*)?' . "\$");
  
 -# Match `-d' as a command-line argument in a string.
 -my $DASH_D_PATTERN = "(^|\\s)-d(\\s|\$)";
  # Directories installed during 'install-exec' phase.
  my $EXEC_DIR_PATTERN =
    '^(?:bin|sbin|libexec|sysconf|localstate|lib|pkglib|.*exec.*)' . "\$";
@@@ -230,9 -235,9 +230,9 @@@ my @libtool_sometimes = qw(ltconfig ltc
  my @common_files =
      (qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
        COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
 -      ansi2knr.1 ansi2knr.c compile config.guess config.rpath config.sub
 -      depcomp elisp-comp install-sh libversion.in mdate-sh missing
 -      mkinstalldirs py-compile texinfo.tex ylwrap),
 +      ar-lib compile config.guess config.rpath
 +      config.sub depcomp elisp-comp install-sh libversion.in mdate-sh
 +      missing mkinstalldirs py-compile texinfo.tex ylwrap),
       @libtool_files, @libtool_sometimes);
  
  # Commonly used files we auto-include, but only sometimes.  This list
@@@ -268,7 -273,7 +268,7 @@@ my $gen_copyright = "
  # These constants are returned by the lang_*_rewrite functions.
  # LANG_SUBDIR means that the resulting object file should be in a
  # subdir if the source file is.  In this case the file name cannot
 -# have `..' components.
 +# have '..' components.
  use constant LANG_IGNORE  => 0;
  use constant LANG_PROCESS => 1;
  use constant LANG_SUBDIR  => 2;
@@@ -287,6 -292,7 +287,6 @@@ use constant QUEUE_MESSAGE   => "msg"
  use constant QUEUE_CONF_FILE => "conf file";
  use constant QUEUE_LOCATION  => "location";
  use constant QUEUE_STRING    => "string";
 -\f
  
  ## ---------------------------------- ##
  ## Variables related to the options.  ##
@@@ -324,6 -330,10 +324,6 @@@ my @config_headers = ()
  # Names used in AC_CONFIG_LINKS call.
  my @config_links = ();
  
 -# Directory where output files go.  Actually, output files are
 -# relative to this directory.
 -my $output_directory;
 -
  # List of Makefile.am's to process, and their corresponding outputs.
  my @input_files = ();
  my %output_files = ();
@@@ -343,7 -353,7 +343,7 @@@ my %ac_config_files_condition = ()
  # Directory to search for configure-required files.  This
  # will be computed by &locate_aux_dir and can be set using
  # AC_CONFIG_AUX_DIR in configure.ac.
 -# $CONFIG_AUX_DIR is the `raw' directory, valid only in the source-tree.
 +# $CONFIG_AUX_DIR is the 'raw' directory, valid only in the source-tree.
  my $config_aux_dir = '';
  my $config_aux_dir_set_in_configure_ac = 0;
  # $AM_CONFIG_AUX_DIR is prefixed with $(top_srcdir), so it can be used
@@@ -383,8 -393,8 +383,8 @@@ my $package_version = ''
  # Where version is defined.
  my $package_version_location;
  
 -# TRUE if we've seen AM_ENABLE_MULTILIB.
 -my $seen_multilib = 0;
 +# TRUE if we've seen AM_PROG_AR
 +my $seen_ar = 0;
  
  # TRUE if we've seen AM_PROG_CC_C_O
  my $seen_cc_c_o = 0;
@@@ -399,7 -409,7 +399,7 @@@ my $seen_init_automake = 0
  my $seen_automake_version = 0;
  
  # Hash table of discovered configure substitutions.  Keys are names,
 -# values are `FILE:LINE' strings which are used by error message
 +# values are 'FILE:LINE' strings which are used by error message
  # generation.
  my %configure_vars = ();
  
@@@ -420,7 -430,7 +420,7 @@@ my %configure_cond = ()
  my %extension_map = ();
  
  # List of the DIST_COMMON files we discovered while reading
 -# configure.in
 +# configure.ac.
  my $configure_dist_common = '';
  
  # This maps languages names onto objects.
@@@ -467,11 -477,13 +467,11 @@@ my %required_targets 
     'install-man' => 1,
    );
  
 -# Set to 1 if this run will create the Makefile.in that distributes
 -# the files in config_aux_dir.
 -my $automake_will_process_aux_dir = 0;
 +# Queue to push require_conf_file requirements to.
 +my $required_conf_file_queue;
  
  # The name of the Makefile currently being processed.
  my $am_file = 'BUG';
 -\f
  
  ################################################################
  
@@@ -529,7 -541,7 +529,7 @@@ my %compile_clean_files
  # to delete.
  my %libtool_clean_directories;
  
 -# Value of `$(SOURCES)', used by tags.am.
 +# Value of $(SOURCES), used by tags.am.
  my @sources;
  # Sources which go in the distribution.
  my @dist_sources;
@@@ -548,7 -560,7 +548,7 @@@ my %object_compilation_map
  # This keeps track of the directories for which we've already
  # created dirstamp code.  Keys are directories, values are stamp files.
  # Several keys can share the same stamp files if they are equivalent
 -# (as are `.//foo' and `foo').
 +# (as are './/foo' and 'foo').
  my %directory_map;
  
  # All .P files.
@@@ -562,6 -574,12 +562,6 @@@ my @dist_targets
  my %known_programs;
  my %known_libraries;
  
 -# Keys in this hash are the basenames of files which must depend on
 -# ansi2knr.  Values are either the empty string, or the directory in
 -# which the ANSI source file appears; the directory must have a
 -# trailing `/'.
 -my %de_ansi_files;
 -
  # This keeps track of which extensions we've seen (that we care
  # about).
  my %extension_seen;
@@@ -574,7 -592,7 +574,7 @@@ my %language_scratch
  # handling on a per-language basis.
  my %lang_specific_files;
  
 -# This is set when `handle_dist' has finished.  Once this happens,
 +# This is set when 'handle_dist' has finished.  Once this happens,
  # we should no longer push on dist_common.
  my $handle_dist_run;
  
  # under consideration.
  my %linkers_used;
  
 -# True if we need `LINK' defined.  This is a hack.
 +# True if we need 'LINK' defined.  This is a hack.
  my $need_link;
  
 -# Was get_object_extension run?
 -# FIXME: This is a hack. a better switch should be found.
 -my $get_object_extension_was_run;
 +# Does the generated Makefile have to build some compiled object
 +# (for binary programs, or plain or libtool libraries)?
 +my $must_handle_compiled_objects;
  
  # Record each file processed by make_paragraphs.
  my %transformed_files;
 -\f
  
  ################################################################
  
@@@ -668,7 -687,7 +668,7 @@@ sub initialize_per_input (
      %clean_files = ();
      %compile_clean_files = ();
  
 -    # We always include `.'.  This isn't strictly correct.
 +    # We always include '.'.  This isn't strictly correct.
      %libtool_clean_directories = ('.' => 1);
  
      @sources = ();
      %known_programs = ();
      %known_libraries= ();
  
 -    %de_ansi_files = ();
 -
      %extension_seen = ();
  
      %language_scratch = ();
  
      $need_link = 0;
  
 -    $get_object_extension_was_run = 0;
 +    $must_handle_compiled_objects = 0;
  
      %transformed_files = ();
  }
  register_language ('name' => 'c',
                   'Name' => 'C',
                   'config_vars' => ['CC'],
 -                 'ansi' => 1,
                   'autodep' => '',
                   'flags' => ['CFLAGS', 'CPPFLAGS'],
                   'ccer' => 'CC',
                   'link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
                   'compile_flag' => '-c',
                   'libtool_tag' => 'CC',
 -                 'extensions' => ['.c'],
 -                 '_finish' => \&lang_c_finish);
 +                 'extensions' => ['.c']);
  
  # C++.
  register_language ('name' => 'cxx',
@@@ -878,7 -901,10 +878,7 @@@ register_language ('name' => 'asm'
                   'compiler' => 'CCASCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
 -                 'extensions' => ['.s'],
 -
 -                 # With assembly we still use the C linker.
 -                 '_finish' => \&lang_c_finish);
 +                 'extensions' => ['.s']);
  
  # Preprocessed Assembler.
  register_language ('name' => 'cppasm',
                   'compiler' => 'CPPASCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
 -                 'extensions' => ['.S', '.sx'],
 -
 -                 # With assembly we still use the C linker.
 -                 '_finish' => \&lang_c_finish);
 +                 'extensions' => ['.S', '.sx']);
  
  # Fortran 77
  register_language ('name' => 'f77',
@@@ -951,12 -980,11 +951,12 @@@ register_language ('name' => 'ppfc'
  # Preprocessed Fortran 77
  #
  # The current support for preprocessing Fortran 77 just involves
 -# passing `$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)
 -# $(CPPFLAGS)' as additional flags to the Fortran 77 compiler, since
 -# this is how GNU Make does it; see the `GNU Make Manual, Edition 0.51
 -# for `make' Version 3.76 Beta' (specifically, from info file
 -# `(make)Catalogue of Rules').
 +# passing "$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)
 +# $(CPPFLAGS)" as additional flags to the Fortran 77 compiler, since
 +# this is how GNU Make does it; see the "GNU Make Manual, Edition 0.51
 +# for `make' Version 3.76 Beta" (specifically, from info file
 +# for `make' Version 3.76 Beta" (specifically, from info file
 +# '(make)Catalogue of Rules').
  #
  # A better approach would be to write an Autoconf test
  # (i.e. AC_PROG_FPP) for a Fortran 77 preprocessor, because not all
@@@ -1075,11 -1103,11 +1075,11 @@@ sub subst ($
  
  
  # $BACKPATH
 -# &backname ($REL-DIR)
 +# &backname ($RELDIR)
  # --------------------
 -# If I `cd $REL-DIR', then to come back, I should `cd $BACKPATH'.
 -# For instance `src/foo' => `../..'.
 -# Works with non strictly increasing paths, i.e., `src/../lib' => `..'.
 +# If I "cd $RELDIR", then to come back, I should "cd $BACKPATH".
 +# For instance 'src/foo' => '../..'.
 +# Works with non strictly increasing paths, i.e., 'src/../lib' => '..'.
  sub backname ($)
  {
      my ($file) = @_;
        if ($_ eq '..')
        {
            pop @res
 -            or prog_error ("trying to reverse path `$file' pointing outside tree");
 +            or prog_error ("trying to reverse path '$file' pointing outside tree");
        }
        else
        {
  
  ################################################################
  
 -# `silent-rules' mode handling functions.
 +# 'silent-rules' mode handling functions.
  
  # verbose_var (NAME)
  # ------------------
 -# The public variable stem used to implement `silent-rules'.
 +# The public variable stem used to implement 'silent-rules'.
  sub verbose_var ($)
  {
      my ($name) = @_;
  
  # verbose_private_var (NAME)
  # --------------------------
 -# The naming policy for the private variables for `silent-rules'.
 +# The naming policy for the private variables for 'silent-rules'.
  sub verbose_private_var ($)
  {
      my ($name) = @_;
  
  # define_verbose_var (NAME, VAL)
  # ------------------------------
 -# For `silent-rules' mode, setup VAR and dispatcher, to expand to VAL if silent.
 +# For 'silent-rules' mode, setup VAR and dispatcher, to expand to VAL if silent.
  sub define_verbose_var ($$)
  {
      my ($name, $val) = @_;
      my $silent_var = $pvar . '_0';
      if (option 'silent-rules')
        {
 -      # For typical `make's, `configure' replaces AM_V (inside @@) with $(V)
 +      # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
        # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
 -      # For strict POSIX 2008 `make's, it replaces them with 0 or 1 instead.
 +      # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
        # See AM_SILENT_RULES in m4/silent.m4.
        define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
        define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', INTERNAL);
@@@ -1168,7 -1196,7 +1168,7 @@@ sub verbose_nodep_flag ($
  
  # silent_flag
  # -----------
 -# Contents of %SILENT%: variable to expand to `@' when silent.
 +# Contents of %SILENT%: variable to expand to '@' when silent.
  sub silent_flag ()
  {
      return verbose_flag ('at');
  
  # define_verbose_tagvar (NAME)
  # ----------------------------
 -# Engage the needed `silent-rules' machinery for tag NAME.
 +# Engage the needed 'silent-rules' machinery for tag NAME.
  sub define_verbose_tagvar ($)
  {
      my ($name) = @_;
      if (option 'silent-rules')
        {
 -      define_verbose_var ($name, '@echo "  '. $name . ' ' x (6 - length ($name)) . '" $@;');
 +      define_verbose_var ($name, '@echo "  '. $name . ' ' x (8 - length ($name)) . '" $@;');
        define_verbose_var ('at', '@');
        }
  }
  
 +# define_verbose_texinfo
 +# ----------------------
 +# Engage the needed 'silent-rules' machinery for assorted texinfo commands.
 +sub define_verbose_texinfo ()
 +{
 +  my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF');
 +  foreach my $tag (@tagvars)
 +    {
 +      define_verbose_tagvar($tag);
 +    }
 +  define_verbose_var('texinfo', '-q');
 +  define_verbose_var('texidevnull', '> /dev/null');
 +}
 +
  # define_verbose_libtool
  # ----------------------
 -# Engage the needed `silent-rules' machinery for `libtool --silent'.
 +# Engage the needed 'silent-rules' machinery for 'libtool --silent'.
  sub define_verbose_libtool ()
  {
      define_verbose_var ('lt', '--silent');
@@@ -1223,12 -1237,14 +1223,12 @@@ sub handle_option
        if ($var->has_conditional_contents)
        {
          msg_var ('unsupported', $var,
 -                 "`AUTOMAKE_OPTIONS' cannot have conditional contents");
 -      }
 -      foreach my $locvals ($var->value_as_list_recursive (cond_filter => TRUE,
 -                                                        location => 1))
 -      {
 -        my ($loc, $value) = @$locvals;
 -        return 1 if (process_option_list ($loc, $value))
 +                 "'AUTOMAKE_OPTIONS' cannot have conditional contents");
        }
 +      my @options = map { { option => $_->[1], where => $_->[0] } }
 +                      $var->value_as_list_recursive (cond_filter => TRUE,
 +                                                     location => 1);
 +      return 1 if process_option_list (@options);
      }
  
    # Override portability-recursive warning.
@@@ -1265,6 -1281,22 +1265,6 @@@ sub shadow_unconditionally ($$
    return "\$($varname)"
  }
  
 -# get_object_extension ($EXTENSION)
 -# ---------------------------------
 -# Prefix $EXTENSION with $U if ansi2knr is in use.
 -sub get_object_extension ($)
 -{
 -    my ($extension) = @_;
 -
 -    # Check for automatic de-ANSI-fication.
 -    $extension = '$U' . $extension
 -      if option 'ansi2knr';
 -
 -    $get_object_extension_was_run = 1;
 -
 -    return $extension;
 -}
 -
  # check_user_variables (@LIST)
  # ----------------------------
  # Make sure each variable VAR in @LIST does not exist, suggest using AM_VAR
@@@ -1282,9 -1314,9 +1282,9 @@@ sub check_user_variables (@
              if ($var->rdef ($cond)->owner == VAR_MAKEFILE)
                {
                  msg_cond_var ('gnu', $cond, $flag,
 -                              "`$flag' is a user variable, "
 +                              "'$flag' is a user variable, "
                                . "you should not override it;\n"
 -                              . "use `AM_$flag' instead.");
 +                              . "use 'AM_$flag' instead");
                }
            }
        }
@@@ -1309,7 -1341,7 +1309,7 @@@ sub handle_language
            require_conf_file ("$am_file.am", FOREIGN, 'depcomp');
  
            my @deplist = sort keys %dep_files;
 -          # Generate each `include' individually.  Irix 6 make will
 +          # Generate each 'include' individually.  Irix 6 make will
            # not properly include several files resulting from a
            # variable expansion; generating many separate includes
            # seems safest.
            # This is not used by depend2.am.
            my $der_ext = (&{$lang->output_extensions} ($ext))[0];
  
 -          # When we output an inference rule like `.c.o:' we
 +          # When we output an inference rule like '.c.o:' we
            # have two cases to consider: either subdir-objects
            # is used, or it is not.
            #
            # In the latter case the rule is used to build objects
            # in the current directory, and dependencies always
 -          # go into `./$(DEPDIR)/'.  We can hard-code this value.
 +          # go into './$(DEPDIR)/'.  We can hard-code this value.
            #
            # In the former case the rule can be used to build
            # objects in sub-directories too.  Dependencies should
            # go into the appropriate sub-directories, e.g.,
 -          # `sub/$(DEPDIR)/'.  The value of this directory
 +          # 'sub/$(DEPDIR)/'.  The value of this directory
            # needs to be computed on-the-fly.
            #
            # DEPBASE holds the name of this directory, plus the
            # basename part of the object file (extensions Po, TPo,
            # Plo, TPlo will be added later as appropriate).  It is
 -          # either hardcoded, or a shell variable (`$depbase') that
 +          # either hardcoded, or a shell variable ('$depbase') that
            # will be computed by the rule.
            my $depbase =
              option ('subdir-objects') ? '$$depbase' : '$(DEPDIR)/$*';
  
            my $obj_compile = $lang->compile;
  
 -          # Rewrite each occurrence of `AM_$flag' in the compile
 -          # rule into `${derived}_$flag' if it exists.
 +          # Rewrite each occurrence of 'AM_$flag' in the compile
 +          # rule into '${derived}_$flag' if it exists.
            for my $flag (@{$lang->flags})
              {
                my $val = "${derived}_$flag";
              "\$(LIBTOOL) $ltverbose $libtool_tag\$($ptltflags) \$(LIBTOOLFLAGS) "
              . "--mode=compile $obj_compile";
  
 -          # We _need_ `-o' for per object rules.
 +          # We _need_ '-o' for per object rules.
            my $output_flag = $lang->output_flag || '-o';
  
            my $depbase = dirname ($obj);
                unless $depbase eq '';
            $depbase .= '$(DEPDIR)/' . basename ($obj);
  
 -          # Support for deansified files in subdirectories is ugly
 -          # enough to deserve an explanation.
 -          #
 -          # A Note about normal ansi2knr processing first.  On
 -          #
 -          #   AUTOMAKE_OPTIONS = ansi2knr
 -          #   bin_PROGRAMS = foo
 -          #   foo_SOURCES = foo.c
 -          #
 -          # we generate rules similar to:
 -          #
 -          #   foo: foo$U.o; link ...
 -          #   foo$U.o: foo$U.c; compile ...
 -          #   foo_.c: foo.c; ansi2knr ...
 -          #
 -          # this is fairly compact, and will call ansi2knr depending
 -          # on the value of $U (`' or `_').
 -          #
 -          # It's harder with subdir sources. On
 -          #
 -          #   AUTOMAKE_OPTIONS = ansi2knr
 -          #   bin_PROGRAMS = foo
 -          #   foo_SOURCES = sub/foo.c
 -          #
 -          # we have to create foo_.c in the current directory.
 -          # (Unless the user asks 'subdir-objects'.)  This is important
 -          # in case the same file (`foo.c') is compiled from other
 -          # directories with different cpp options: foo_.c would
 -          # be preprocessed for only one set of options if it were
 -          # put in the subdirectory.
 -          #
 -          # Because foo$U.o must be built from either foo_.c or
 -          # sub/foo.c we can't be as concise as in the first example.
 -          # Instead we output
 -          #
 -          #   foo: foo$U.o; link ...
 -          #   foo_.o: foo_.c; compile ...
 -          #   foo.o: sub/foo.c; compile ...
 -          #   foo_.c: foo.c; ansi2knr ...
 -          #
 -          # This is why we'll now transform $rule_file twice
 -          # if we detect this case.
 -          # A first time we output the compile rule with `$U'
 -          # replaced by `_' and the source directory removed,
 -          # and another time we simply remove `$U'.
 -          #
 -          # Note that at this point $source (as computed by
 -          # &handle_single_transform) is `sub/foo$U.c'.
 -          # This can be confusing: it can be used as-is when
 -          # subdir-objects is set, otherwise you have to know
 -          # it really means `foo_.c' or `sub/foo.c'.
 -          my $objdir = dirname ($obj);
 -          my $srcdir = dirname ($source);
 -          if ($lang->ansi && $obj =~ /\$U/)
 -            {
 -              prog_error "`$obj' contains \$U, but `$source' doesn't."
 -                if $source !~ /\$U/;
 -
 -              (my $source_ = $source) =~ s/\$U/_/g;
 -              # Output an additional rule if _.c and .c are not in
 -              # the same directory.  (_.c is always in $objdir.)
 -              if ($objdir ne $srcdir)
 -                {
 -                  (my $obj_ = $obj) =~ s/\$U/_/g;
 -                  (my $depbase_ = $depbase) =~ s/\$U/_/g;
 -                  $source_ = basename ($source_);
 -
 -                  $output_rules .=
 -                    file_contents ($rule_file,
 -                                   new Automake::Location,
 -                                   %transform,
 -                                   GENERIC   => 0,
 -
 -                                   DEPBASE   => $depbase_,
 -                                   BASE      => $obj_,
 -                                   SOURCE    => $source_,
 -                                   SOURCEFLAG => $sourceflags{$srcext} || '',
 -                                   OBJ       => "$obj_$myext",
 -                                   OBJOBJ    => "$obj_.obj",
 -                                   LTOBJ     => "$obj_.lo",
 -
 -                                   COMPILE   => $obj_compile,
 -                                   LTCOMPILE => $obj_ltcompile,
 -                                   -o        => $output_flag,
 -                                   %file_transform);
 -                  $obj =~ s/\$U//g;
 -                  $depbase =~ s/\$U//g;
 -                  $source =~ s/\$U//g;
 -                }
 -            }
 -
            $output_rules .=
              file_contents ($rule_file,
                             new Automake::Location,
                             BASE      => $obj,
                             SOURCE    => $source,
                             SOURCEFLAG => $sourceflags{$srcext} || '',
 -                           # Use $myext and not `.o' here, in case
 +                           # Use $myext and not '.o' here, in case
                             # we are actually building a new source
                             # file -- e.g. via yacc.
                             OBJ       => "$obj$myext",
                                        %transform, %lang);
  
        # If the source to a program consists entirely of code from a
 -      # `pure' language, for instance C++ or Fortran 77, then we
 +      # 'pure' language, for instance C++ or Fortran 77, then we
        # don't need the C compiler code.  However if we run into
        # something unusual then we do generate the C code.  There are
        # probably corner cases here that do not work properly.
        # Call the finisher.
        $lang->finish;
  
 -      # Flags listed in `->flags' are user variables (per GNU Standards),
 +      # Flags listed in '->flags' are user variables (per GNU Standards),
        # they should not be overridden in the Makefile...
        my @dont_override = @{$lang->flags};
        # ... and so is LDFLAGS.
        define_linker_variable ($languages{'c'});
        }
  
 -    # Always provide the user with `AM_V_GEN' for `silent-rules' mode.
 +    # Always provide the user with 'AM_V_GEN' for 'silent-rules' mode.
      define_verbose_tagvar ('GEN');
  }
  
@@@ -1628,7 -1751,7 +1628,7 @@@ sub check_libobjs_source
        foreach my $file (@files)
        {
          err_var ($prefix . $one_file . '_SOURCES',
 -                 "automatically discovered file `$file' should not" .
 +                 "automatically discovered file '$file' should not" .
                   " be explicitly mentioned")
            if defined $libsources{$file};
        }
  #   $VAR is the name of the variable that the source filenames come from
  #   $TOPPARENT is the name of the _SOURCES variable which is being processed
  #   $DERIVED is the name of resulting executable or library
 -#   $OBJ is the object extension (e.g., `$U.lo')
 +#   $OBJ is the object extension (e.g., '.lo')
  #   $FILE the source file to transform
  #   %TRANSFORM contains extras arguments to pass to file_contents
  #     when producing explicit rules
@@@ -1655,6 -1778,8 +1655,6 @@@ sub handle_single_transform ($$$$$%
      my ($var, $topparent, $derived, $obj, $_file, %transform) = @_;
      my @files = ($_file);
      my @result = ();
 -    my $nonansi_obj = $obj;
 -    $nonansi_obj =~ s/\$U//g;
  
      # Turn sources into objects.  We use a while loop like this
      # because we might add to @files in the loop.
        if (/^\@.*\@$/)
        {
          my $parent_msg = '';
 -        $parent_msg = "\nand is referred to from `$topparent'"
 +        $parent_msg = "\nand is referred to from '$topparent'"
            if $topparent ne $var->name;
          err_var ($var,
 -                 "`" . $var->name . "' includes configure substitution `$_'"
 +                 "'" . $var->name . "' includes configure substitution '$_'"
                   . $parent_msg . ";\nconfigure " .
                   "substitutions are not allowed in _SOURCES variables");
          next;
        }
  
 -      # If the source file is in a subdirectory then the `.o' is put
 +      # If the source file is in a subdirectory then the '.o' is put
        # into the current directory, unless the subdir-objects option
        # is in effect.
  
        # yacc output).
        my $derived_source = 0;
  
 -      # This holds the `aggregate context' of the file we are
 +      # This holds the 'aggregate context' of the file we are
        # currently examining.  If the file is compiled with
        # per-object flags, then it will be the name of the object.
 -      # Otherwise it will be `AM'.  This is used by the target hook
 +      # Otherwise it will be 'AM'.  This is used by the target hook
        # language function.
        my $aggregate = 'AM';
  
 -      $extension = &derive_suffix ($extension, $nonansi_obj);
 +      $extension = &derive_suffix ($extension, $obj);
        my $lang;
        if ($extension_map{$extension} &&
            ($lang = $languages{$extension_map{$extension}}))
            # Do we have per-executable flags for this executable?
            my $have_per_exec_flags = 0;
            my @peflags = @{$lang->flags};
 -          push @peflags, 'LIBTOOLFLAGS' if $nonansi_obj eq '.lo';
 +          push @peflags, 'LIBTOOLFLAGS' if $obj eq '.lo';
            foreach my $flag (@peflags)
              {
                if (set_seen ("${derived}_$flag"))
            my $subr = \&{'lang_' . $lang->name . '_rewrite'};
            my ($r, $source_extension)
                = &$subr ($directory, $base, $extension,
 -                        $nonansi_obj, $have_per_exec_flags, $var);
 +                        $obj, $have_per_exec_flags, $var);
            # Skip this entry if we were asked not to process it.
            next if $r == LANG_IGNORE;
  
                $this_obj_ext = $source_extension;
                $derived_source = 1;
            }
 -          elsif ($lang->ansi)
 -          {
 -              $this_obj_ext = $obj;
 -          }
            else
            {
 -              $this_obj_ext = $nonansi_obj;
 +              $this_obj_ext = $obj;
            }
            $object = $base . $this_obj_ext;
  
                # object.  In this case we rewrite the object's
                # name to ensure it is unique.
  
 -              # We choose the name `DERIVED_OBJECT' to ensure
 +              # We choose the name 'DERIVED_OBJECT' to ensure
                # (1) uniqueness, and (2) continuity between
                # invocations.  However, this will result in a
                # name that is too long for losing systems, in
                        $full_ansi = $base . $extension;
                  }
  
 -              if ($lang->ansi && option 'ansi2knr')
 -                {
 -                  $full_ansi =~ s/$KNOWN_EXTENSIONS_PATTERN$/\$U$&/;
 -                  $obj_sans_ext .= '$U';
 -                }
 -
                my @specifics = ($full_ansi, $obj_sans_ext,
                                 # Only use $this_obj_ext in the derived
                                 # source case because in the other case we
                # Each item on this list is a reference to a list consisting
                # of four values followed by additional transform flags for
                # file_contents.  The four values are the derived flag prefix
 -              # (e.g. for `foo_CFLAGS', it is `foo'), the name of the
 +              # (e.g. for 'foo_CFLAGS', it is 'foo'), the name of the
                # source file, the base name of the output file, and
                # the extension for the object file.
                push (@{$lang_specific_files{$lang->name}},
                      [@specifics, %transform]);
            }
        }
 -      elsif ($extension eq $nonansi_obj)
 +      elsif ($extension eq $obj)
        {
            # This is probably the result of a direct suffix rule.
            # In this case we just accept the rewrite.
            next;
        }
  
 -      err_am "object `$object' created by `$full' and `$object_map{$object}'"
 +      err_am "object '$object' created by '$full' and '$object_map{$object}'"
          if (defined $object_map{$object}
              && $object_map{$object} ne $full);
  
                != (COMPILE_LIBTOOL | COMPILE_ORDINARY))
            && $object_compilation_map{$comp_obj} != $comp_val)
          {
 -          err_am "object `$comp_obj' created both with libtool and without";
 +          err_am "object '$comp_obj' created both with libtool and without";
          }
        $object_compilation_map{$comp_obj} |= $comp_val;
  
                # project
  
                # For Java, the way we're handling it right now, a
 -              # `..' component doesn't make sense.
 +              # '..' component doesn't make sense.
                if ($lang && $lang->name eq 'java' && $object =~ /(\/|^)\.\.\//)
                  {
 -                  err_am "`$full' should not contain a `..' component";
 +                  err_am "'$full' should not contain a '..' component";
                  }
  
 -              # Make sure object is removed by `make mostlyclean'.
 +              # Make sure object is removed by 'make mostlyclean'.
                $compile_clean_files{$object} = MOSTLY_CLEAN;
                # If we have a libtool object then we also must remove
                # the ordinary .o.
  #   $NODEFINE is a boolean: if true, $OBJVAR will not be defined (but
  #     work done to determine the linker will be).
  #   $ONE_FILE is the canonical (transformed) name of object to build
 -#   $OBJ is the object extension (i.e. either `.o' or `.lo').
 +#   $OBJ is the object extension (i.e. either '.o' or '.lo').
  #   $TOPPARENT is the _SOURCES variable being processed.
  #   $WHERE context into which this definition is done
  #   %TRANSFORM extra arguments to pass to file_contents when producing
@@@ -2050,11 -2185,11 +2050,11 @@@ sub define_objects_from_sources ($$$$$$
  # Arguments are:
  #   canonical (transformed) name of target to build
  #   actual target of object to build
 -#   object extension (i.e., either `.o' or `$o')
 +#   object extension (i.e., either '.o' or '$o')
  #   location of the source variable
  #   extra arguments to pass to file_contents when producing rules
  # Return the name of the linker variable that must be used.
 -# Empty return means just use `LINK'.
 +# Empty return means just use 'LINK'.
  sub handle_source_transform ($$$$%)
  {
      # one_file is canonical name.  unxformed is given name.  obj is
            my $loc = $where->clone;
            $loc->pop_context;
            msg ('obsolete', $loc,
 -               "the default source for `$unxformed' has been changed "
 -               . "to `$default_source'.\n(Using `$old_default_source' for "
 +               "the default source for '$unxformed' has been changed "
 +               . "to '$default_source'.\n(Using '$old_default_source' for "
                 . "backward compatibility.)");
            $default_source = $old_default_source;
          }
        define_pretty_variable ($one_file . '_OBJECTS', TRUE, $where, @keys);
      }
  
 -    # If we want to use `LINK' we must make sure it is defined.
 +    # If we want to use 'LINK' we must make sure it is defined.
      if ($linker eq '')
      {
        $need_link = 1;
@@@ -2181,9 -2316,9 +2181,9 @@@ sub handle_lib_object
    my ($xname, $varname) = @_;
  
    my $var = var ($varname);
 -  prog_error "handle_lib_objects: `$varname' undefined"
 +  prog_error "'$varname' undefined"
      unless $var;
 -  prog_error "handle_lib_objects: unexpected variable name `$varname'"
 +  prog_error "unexpected variable name '$varname'"
      unless $varname =~ /^(.*)(?:LIB|LD)ADD$/;
    my $prefix = $1 || 'AM_';
  
               $flagvar = 1;
               # FIXME: should display a stack of nested variables
               # as context when $var != $subvar.
 -             err_var ($var, "linker flags such as `$val' belong in "
 -                      . "`${prefix}LDFLAGS");
 +             err_var ($var, "linker flags such as '$val' belong in "
 +                      . "'${prefix}LDFLAGS'");
             }
           return ();
         }
@@@ -2263,7 -2398,7 +2263,7 @@@ sub handle_LIBOBJS_or_ALLOCA ($
    # If LIBOBJS files must be built in another directory we have
    # to define LIBOBJDIR and ensure the files get cleaned.
    # Otherwise LIBOBJDIR can be left undefined, and the cleaning
 -  # is achieved by `rm -f *.$(OBJEXT)' in compile.am.
 +  # is achieved by 'rm -f *.$(OBJEXT)' in compile.am.
    if ($config_libobj_dir
        && $relative_dir ne $config_libobj_dir)
      {
        }
        else
        {
 -        error ("`\$($var)' cannot be used outside `$config_libobj_dir' if"
 -               . " `subdir-objects' is not set");
 +        error ("'\$($var)' cannot be used outside '$config_libobj_dir' if"
 +               . " 'subdir-objects' is not set");
        }
      }
  
@@@ -2363,7 -2498,7 +2363,7 @@@ sub check_canonical_spellin
      {
        foreach my $xt (@suffixes)
        {
 -        reject_var ("$name$xt", "use `$xname$xt', not `$name$xt'");
 +        reject_var ("$name$xt", "use '$xname$xt', not '$name$xt'");
        }
      }
  
  # Set up the compile suite.
  sub handle_compile ()
  {
 -    return
 -      unless $get_object_extension_was_run;
 +   return if ! $must_handle_compiled_objects;
  
      # Boilerplate.
      my $default_includes = '';
                push @incs, '-I' . dirname ($hdr);
              }
          }
 -      # We want `-I. -I$(srcdir)', but the latter -I is redundant
 +      # We want '-I. -I$(srcdir)', but the latter -I is redundant
        # and unaesthetic in non-VPATH builds.  We use `-I.@am__isrc@`
        # instead.  It will be replaced by '-I.' or '-I. -I$(srcdir)'.
        # Items in CONFIG_HEADER are never in $(srcdir) so it is safe
 -      # to just put @am__isrc@ right after `-I.', without a space.
 +      # to just put @am__isrc@ right after '-I.', without a space.
        ($default_includes = ' ' . uniq (@incs)) =~ s/ @/@/;
        }
  
                                'DISTRMS' => join ("\n", @dist_rms)));
      $output_vars .= $vars;
      $output_rules .= "$coms$rules";
 -
 -    # Check for automatic de-ANSI-fication.
 -    if (option 'ansi2knr')
 -      {
 -      my ($ansi2knr_filename, $ansi2knr_where) = @{option 'ansi2knr'};
 -      my $ansi2knr_dir = '';
 -
 -      require_variables ($ansi2knr_where, "option `ansi2knr' is used",
 -                         TRUE, "ANSI2KNR", "U");
 -
 -      # topdir is where ansi2knr should be.
 -      if ($ansi2knr_filename eq 'ansi2knr')
 -        {
 -          # Only require ansi2knr files if they should appear in
 -          # this directory.
 -          require_file ($ansi2knr_where, FOREIGN,
 -                        'ansi2knr.c', 'ansi2knr.1');
 -
 -          # ansi2knr needs to be built before subdirs, so unshift it
 -          # rather then pushing it.
 -          unshift (@all, '$(ANSI2KNR)');
 -        }
 -      else
 -        {
 -          $ansi2knr_dir = dirname ($ansi2knr_filename);
 -        }
 -
 -      $output_rules .= &file_contents ('ansi2knr',
 -                                       new Automake::Location,
 -                                       'ANSI2KNR-DIR' => $ansi2knr_dir);
 -
 -    }
  }
  
  # handle_libtool ()
@@@ -2465,7 -2633,6 +2465,7 @@@ sub handle_program
                                  'bin', 'sbin', 'libexec', 'pkglibexec',
                                  'noinst', 'check');
    return if ! @proglist;
 +  $must_handle_compiled_objects = 1;
  
    my $seen_global_libobjs =
      var ('LDADD') && &handle_lib_objects ('', 'LDADD');
        my ($where, $one_file) = @$pair;
  
        my $seen_libobjs = 0;
 -      my $obj = get_object_extension '.$(OBJEXT)';
 +      my $obj = '.$(OBJEXT)';
  
        $known_programs{$one_file} = $where;
  
                                             '_SOURCES', '_OBJECTS',
                                             '_DEPENDENCIES');
  
 -      $where->push_context ("while processing program `$one_file'");
 +      $where->push_context ("while processing program '$one_file'");
        $where->set (INTERNAL->get);
  
        my $linker = &handle_source_transform ($xname, $one_file, $obj, $where,
        }
  
        reject_var ($xname . '_LIBADD',
 -                "use `${xname}_LDADD', not `${xname}_LIBADD'");
 +                "use '${xname}_LDADD', not '${xname}_LIBADD'");
  
        set_seen ($xname . '_DEPENDENCIES');
        set_seen ('EXTRA_' . $xname . '_DEPENDENCIES');
@@@ -2556,7 -2723,6 +2556,7 @@@ sub handle_librarie
    my @liblist = &am_install_var ('libs', 'LIBRARIES',
                                 'lib', 'pkglib', 'noinst', 'check');
    return if ! @liblist;
 +  $must_handle_compiled_objects = 1;
  
    my @prefix = am_primary_prefixes ('LIBRARIES', 0, 'lib', 'pkglib',
                                    'noinst', 'check');
          my $suggestion = dirname ($onelib) . "/$bn";
          $suggestion =~ s|^\./||g;
          msg ('error-gnu/warn', $where,
 -             "`$onelib' is not a standard library name\n"
 -             . "did you mean `$suggestion'?")
 +             "'$onelib' is not a standard library name\n"
 +             . "did you mean '$suggestion'?")
        }
  
        ($known_libraries{$onelib} = $bn) =~ s/\.a$//;
  
 -      $where->push_context ("while processing library `$onelib'");
 +      $where->push_context ("while processing library '$onelib'");
        $where->set (INTERNAL->get);
  
 -      my $obj = get_object_extension '.$(OBJEXT)';
 +      my $obj = '.$(OBJEXT)';
  
        # Canonicalize names and check for misspellings.
        my $xlib = &check_canonical_spelling ($onelib, '_LIBADD', '_SOURCES',
        }
  
        reject_var ($xlib . '_LDADD',
 -                "use `${xlib}_LIBADD', not `${xlib}_LDADD'");
 +                "use '${xlib}_LIBADD', not '${xlib}_LDADD'");
  
        # Make sure we at look at this.
        set_seen ($xlib . '_DEPENDENCIES');
              &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
            }
        }
 +
 +      if (! $seen_ar)
 +      {
 +        msg ('extra-portability', $where,
 +             "'$onelib': linking libraries using a non-POSIX\n"
 +             . "archiver requires 'AM_PROG_AR' in '$configure_ac'")
 +      }
      }
  }
  
@@@ -2669,7 -2828,6 +2669,7 @@@ sub handle_ltlibrarie
    my @liblist = &am_install_var ('ltlib', 'LTLIBRARIES',
                                 'noinst', 'lib', 'pkglib', 'check');
    return if ! @liblist;
 +  $must_handle_compiled_objects = 1;
  
    my @prefix = am_primary_prefixes ('LTLIBRARIES', 0, 'lib', 'pkglib',
                                    'noinst', 'check');
  
        # We reject libraries which are installed in several places
        # in the same condition, because we can only specify one
 -      # `-rpath' option.
 +      # '-rpath' option.
        $var->traverse_recursively
        (sub
         {
               if ($msg)
                 {
                   error ($where, $msg, partial => 1);
 -                 my $dirtxt = "installed " . ($strip_subdir ? "in" : "below") . " `$dir'";
 -                 $dirtxt = "built for `$dir'"
 +                 my $dirtxt = "installed " . ($strip_subdir ? "in" : "below") . " '$dir'";
 +                 $dirtxt = "built for '$dir'"
                     if $dir eq 'EXTRA' || $dir eq 'noinst' || $dir eq 'check';
                   my $dircond =
                     $full_cond->true ? "" : " in condition $hcond";
  
 -                 error ($where, "`$val' should be $dirtxt$dircond ...",
 +                 error ($where, "'$val' should be $dirtxt$dircond ...",
                          partial => 1);
  
                   my $hacond = $acond->human;
                   my $adir = $instdirs{$val}{$acond};
 -                 my $adirtxt = "installed in `$adir'";
 -                 $adirtxt = "built for `$adir'"
 +                 my $adirtxt = "installed in '$adir'";
 +                 $adirtxt = "built for '$adir'"
                     if ($adir eq 'EXTRA' || $adir eq 'noinst'
                         || $adir eq 'check');
                   my $adircond = $acond->true ? "" : " in condition $hacond";
  
                   my $onlyone = ($dir ne $adir) ?
                     ("\nLibtool libraries can be built for only one "
 -                    . "destination.") : "";
 +                    . "destination") : "";
  
                   error ($liblocations{$val}{$acond},
                          "... and should also be $adirtxt$adircond.$onlyone");
        my ($where, $onelib) = @$pair;
  
        my $seen_libobjs = 0;
 -      my $obj = get_object_extension '.lo';
 +      my $obj = '.lo';
  
        # Canonicalize names and check for misspellings.
        my $xlib = &check_canonical_spelling ($onelib, '_LIBADD', '_LDFLAGS',
          my $suggestion = dirname ($onelib) . "/$bn";
          $suggestion =~ s|^\./||g;
          msg ('error-gnu/warn', $where,
 -             "`$onelib' is not a standard libtool $type name\n"
 -             . "did you mean `$suggestion'?")
 +             "'$onelib' is not a standard libtool $type name\n"
 +             . "did you mean '$suggestion'?")
        }
  
        ($known_libraries{$onelib} = $bn) =~ s/\.la$//;
  
 -      $where->push_context ("while processing Libtool library `$onelib'");
 +      $where->push_context ("while processing Libtool library '$onelib'");
        $where->set (INTERNAL->get);
  
        # Make sure we look at these.
        }
  
        reject_var ("${xlib}_LDADD",
 -                "use `${xlib}_LIBADD', not `${xlib}_LDADD'");
 +                "use '${xlib}_LIBADD', not '${xlib}_LDADD'");
  
  
        my $linker = &handle_source_transform ($xlib, $onelib, $obj, $where,
              &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
            }
        }
 +
 +      if (! $seen_ar)
 +      {
 +        msg ('extra-portability', $where,
 +             "'$onelib': linking libtool libraries using a non-POSIX\n"
 +             . "archiver requires 'AM_PROG_AR' in '$configure_ac'")
 +      }
      }
  }
  
@@@ -2922,9 -3073,9 +2922,9 @@@ sub check_typos (
  
          for my $cond ($var->conditions->conds)
            {
 -            $varname =~ /^(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
 -            msg_var ('syntax', $var, "variable `$varname' is defined but no"
 -                     . " program or\nlibrary has `$1' as canonical name"
 +            $varname =~ /^(?:EXTRA_)?(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
 +            msg_var ('syntax', $var, "variable '$varname' is defined but no"
 +                     . " program or\nlibrary has '$1' as canonical name"
                       . " (possible typo)")
                unless $var->rdef ($cond)->seen;
            }
@@@ -2997,7 -3148,7 +2997,7 @@@ sub scan_texinfo_file ($
          if ($outfile =~ /\.([^.]+)$/ && $1 ne 'info')
            {
              error ("$filename:$.",
 -                   "output `$outfile' has unrecognized extension");
 +                   "output '$outfile' has unrecognized extension");
              return;
            }
        }
  
    if (! $outfile)
      {
 -      err_am "`$filename' missing \@setfilename";
 +      err_am "'$filename' missing \@setfilename";
        return;
      }
  
@@@ -3050,7 -3201,7 +3050,7 @@@ sub output_texinfo_build_rules ($$$@
  {
    my ($source, $dest, $insrc, @deps) = @_;
  
 -  # Split `a.texi' into `a' and `.texi'.
 +  # Split 'a.texi' into 'a' and '.texi'.
    my ($spfx, $ssfx) = ($source =~ /^(.*?)(\.[^.]*)?$/);
    my ($dpfx, $dsfx) = ($dest =~ /^(.*?)(\.[^.]*)?$/);
  
  
    $output_rules .= file_contents ('texibuild',
                                  new Automake::Location,
 +                                  AM_V_MAKEINFO    => verbose_flag('MAKEINFO'),
 +                                  AM_V_TEXI2DVI    => verbose_flag('TEXI2DVI'),
 +                                  AM_V_TEXI2PDF    => verbose_flag('TEXI2PDF'),
                                  DEPS             => "@deps",
                                  DEST_PREFIX      => $dpfx,
                                  DEST_INFO_PREFIX => $dipfx,
                                  GENERIC_INFO     => $generic_info,
                                  INSRC            => $insrc,
                                  MAKEINFOFLAGS    => $makeinfoflags,
 +                                  SILENT           => silent_flag(),
                                  SOURCE           => ($generic
                                                       ? '$<' : $source),
                                  SOURCE_INFO      => ($generic_info
                                                       ? '$<' : $source),
                                  SOURCE_REAL      => $source,
                                  SOURCE_SUFFIX    => $ssfx,
 +                                  TEXIQUIET        => verbose_flag('texinfo'),
 +                                  TEXIDEVNULL      => verbose_flag('texidevnull'),
                                  );
    return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
  }
@@@ -3167,7 -3312,7 +3167,7 @@@ sub handle_texinfo_helper ($
        if ($infobase eq $texi)
        {
          # FIXME: report line number.
 -        err_am "texinfo file `$texi' has unrecognized extension";
 +        err_am "texinfo file '$texi' has unrecognized extension";
          next;
        }
  
        #       make would not rebuild it in the build tree.
        #   (2) having two copies of .info files, one in the source tree
        #       and one (newer) in the build tree is not a problem
 -      #       because `make dist' always pick files in the build tree
 +      #       because 'make dist' always pick files in the build tree
        #       first.
        # However it turned out the be a bad idea for several reasons:
        #   * Tru64, OpenBSD, and FreeBSD (not NetBSD) Make do not behave
        #     build tree can be annoying during development because
        #     - if the files is kept under CVS, you really want it
        #       to be updated in the source tree
 -      #     - it is confusing that `make distclean' does not erase
 +      #     - it is confusing that 'make distclean' does not erase
        #       all files in the build tree.
        #
        # Consequently, starting with Automake 1.8, .info files are
        # If a vers*.texi file is needed, emit the rule.
        if ($vtexi)
        {
 -        err_am ("`$vtexi', included in `$texi', "
 -                . "also included in `$versions{$vtexi}'")
 +        err_am ("'$vtexi', included in '$texi', "
 +                . "also included in '$versions{$vtexi}'")
            if defined $versions{$vtexi};
          $versions{$vtexi} = $texi;
  
  # Handle all Texinfo source.
  sub handle_texinfo ()
  {
 -  reject_var 'TEXINFOS', "`TEXINFOS' is an anachronism; use `info_TEXINFOS'";
 +  reject_var 'TEXINFOS', "'TEXINFOS' is an anachronism; use 'info_TEXINFOS'";
    # FIXME: I think this is an obsolete future feature name.
    reject_var 'html_TEXINFOS', "HTML generation not yet supported";
  
    my ($mostlyclean, $clean, $maintclean) = ('', '', '');
    if ($info_texinfos)
      {
 +      define_verbose_texinfo;
        ($mostlyclean, $clean, $maintclean) = handle_texinfo_helper ($info_texinfos);
        chomp $mostlyclean;
        chomp $clean;
  
    $output_rules .=  file_contents ('texinfos',
                                   new Automake::Location,
 +                                   AM_V_DVIPS    => verbose_flag('DVIPS'),
                                   MOSTLYCLEAN   => $mostlyclean,
                                   TEXICLEAN     => $clean,
                                   MAINTCLEAN    => $maintclean,
 -                                 'LOCAL-TEXIS' => !!$info_texinfos);
 +                                 'LOCAL-TEXIS' => !!$info_texinfos,
 +                                   TEXIQUIET     => verbose_flag('texinfo'));
  }
  
  
  # Handle any man pages.
  sub handle_man_pages
  {
 -  reject_var 'MANS', "`MANS' is an anachronism; use `man_MANS'";
 +  reject_var 'MANS', "'MANS' is an anachronism; use 'man_MANS'";
  
    # Find all the sections in use.  We do this by first looking for
    # "standard" sections, and then looking for any additional
            {
              foreach ($var->value_as_list_recursive)
                {
 -                # A page like `foo.1c' goes into man1dir.
 +                # A page like 'foo.1c' goes into man1dir.
                  if (/\.([0-9a-z])([a-z]*)$/)
                    {
                      $sections{$1} = 1;
@@@ -3611,7 -3753,6 +3611,7 @@@ sub handle_tag
  {
      my @tag_deps = ();
      my @ctag_deps = ();
 +    my @cscope_deps = ();
      if (var ('SUBDIRS'))
      {
        $output_rules .= ("tags-recursive:\n"
        push (@ctag_deps, 'ctags-recursive');
        &depend ('.PHONY', 'ctags-recursive');
        &depend ('.MAKE', 'ctags-recursive');
 +
 +      $output_rules .= ("cscopelist-recursive:\n"
 +                        . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n"
 +                        # Never fail here if a subdir fails; it
 +                        # isn't important.
 +                        . "\t  test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
 +                        . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
 +                        . "\tdone\n");
 +      push (@cscope_deps, 'cscopelist-recursive');
 +      &depend ('.PHONY', 'cscopelist-recursive');
 +      &depend ('.MAKE', 'cscopelist-recursive');
      }
  
      if (&saw_sources_p (1)
                                         new Automake::Location,
                                         CONFIG    => "@config",
                                         TAGSDIRS  => "@tag_deps",
 -                                       CTAGSDIRS => "@ctag_deps");
 +                                       CTAGSDIRS => "@ctag_deps",
 +                                       CSCOPEDIRS => "@cscope_deps");
  
        set_seen 'TAGS_DEPENDENCIES';
      }
      elsif (reject_var ('TAGS_DEPENDENCIES',
 -                     "doesn't make sense to define `TAGS_DEPENDENCIES'"
 -                     . "without\nsources or `ETAGS_ARGS'"))
 +                     "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
 +                     . " without\nsources or 'ETAGS_ARGS'"))
      {
      }
      else
        # Otherwise, it would be possible for a top-level "make TAGS"
        # to fail because some subdirectory failed.
        $output_rules .= "tags: TAGS\nTAGS:\n\n";
 -      # Ditto ctags.
 +      # Ditto ctags and cscope.
        $output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
 -    }
 -}
 -
 -# Handle multilib support.
 -sub handle_multilib
 -{
 -  if ($seen_multilib && $relative_dir eq '.')
 -    {
 -      $output_rules .= &file_contents ('multilib', new Automake::Location);
 -      push (@all, 'all-multi');
 +      $output_rules .= "cscope cscopelist:\n\n";
      }
  }
  
@@@ -3745,7 -3883,7 +3745,7 @@@ sub handle_dist (
    my %transform;
  
    # Define DIST_SUBDIRS.  This must always be done, regardless of the
 -  # no-dist setting: target like `distclean' or `maintainer-clean' use it.
 +  # no-dist setting: target like 'distclean' or 'maintainer-clean' use it.
    my $subdirs = var ('SUBDIRS');
    if ($subdirs)
      {
        }
        else
        {
 -        # We always define this because that is what `distclean'
 +        # We always define this because that is what 'distclean'
          # wants.
          define_pretty_variable ('DIST_SUBDIRS', TRUE, INTERNAL,
                                  '$(SUBDIRS)');
        $archive_defined ||=
        grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz);
        error (option 'no-dist-gzip',
 -           "no-dist-gzip specified but no dist-* specified, "
 +           "no-dist-gzip specified but no dist-* specified,\n"
             . "at least one archive format must be enabled")
        unless $archive_defined;
      }
          &push_dist_common ($cfile);
        }
  
 -      # Don't use `elsif' here because a file might meaningfully
 +      # Don't use 'elsif' here because a file might meaningfully
        # appear in both directories.
        if ($check_aux && dir_has_case_matching_file ($config_aux_dir, $cfile))
        {
    # %dist_common if we think we need to.  If the file appears in our
    # directory, we would have discovered it already, so we don't
    # check that.  But if the file is in a subdir without a Makefile,
 -  # we want to distribute it here if we are doing `.'.  Ugly!
 +  # we want to distribute it here if we are doing '.'.  Ugly!
 +  # Also, in some corner cases, it's possible that the following code
 +  # will cause the same file to appear in the $(DIST_COMMON) variables
 +  # of two distinct Makefiles; but this is not a problem, since the
 +  # 'distdir' target in 'lib/am/distdir.am' can deal with the same
 +  # file being distributed multiple times.
 +  # See also automake bug#9651.
    if ($relative_dir eq '.')
      {
        foreach my $file (split (' ' , $configure_dist_common))
        {
 +        my $dir = dirname ($file);
          push_dist_common ($file)
 -          unless is_make_dir (dirname ($file));
 +          if ($dir eq '.' || ! is_make_dir ($dir));
        }
      }
  
    # Files to distributed.  Don't use ->value_as_list_recursive
 -  # as it recursively expands `$(dist_pkgdata_DATA)' etc.
 +  # 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));
    variable_delete 'DIST_COMMON';
    $transform{'DISTCHECK-HOOK'} = !! rule 'distcheck-hook';
    $transform{'GETTEXT'} = $seen_gettext && !$seen_gettext_external;
  
 -  # If the target `dist-hook' exists, make sure it is run.  This
 +  # If the target 'dist-hook' exists, make sure it is run.  This
    # allows users to do random weird things to the distribution
    # before it is packaged up.
    push (@dist_targets, 'dist-hook')
  }
  
  
 -# check_directory ($NAME, $WHERE)
 -# -------------------------------
 -# Ensure $NAME is a directory, and that it uses a sane name.
 -# Use $WHERE as a location in the diagnostic, if any.
 -sub check_directory ($$)
 +# check_directory ($NAME, $WHERE [, $RELATIVE_DIR = "."])
 +# -------------------------------------------------------
 +# Ensure $NAME is a directory (in $RELATIVE_DIR), and that it uses a sane
 +# name.  Use $WHERE as a location in the diagnostic, if any.
 +sub check_directory ($$;$)
  {
 -  my ($dir, $where) = @_;
 +  my ($dir, $where, $reldir) = @_;
 +  $reldir = '.' unless defined $reldir;
  
 -  error $where, "required directory $relative_dir/$dir does not exist"
 -    unless -d "$relative_dir/$dir";
 +  error $where, "required directory $reldir/$dir does not exist"
 +    unless -d "$reldir/$dir";
  
 -  # If an `obj/' directory exists, BSD make will enter it before
 -  # reading `Makefile'.  Hence the `Makefile' in the current directory
 +  # If an 'obj/' directory exists, BSD make will enter it before
 +  # reading 'Makefile'.  Hence the 'Makefile' in the current directory
    # will not be read.
    #
    #  % cat Makefile
    #  echo World
    #  World
    msg ('portability', $where,
 -       "naming a subdirectory `obj' causes troubles with BSD make")
 +       "naming a subdirectory 'obj' causes troubles with BSD make")
      if $dir eq 'obj';
  
 -  # `aux' is probably the most important of the following forbidden name,
 +  # 'aux' is probably the most important of the following forbidden name,
    # since it's tempting to use it as an AC_CONFIG_AUX_DIR.
    msg ('portability', $where,
 -       "name `$dir' is reserved on W32 and DOS platforms")
 +       "name '$dir' is reserved on W32 and DOS platforms")
      if grep (/^\Q$dir\E$/i, qw/aux lpt1 lpt2 lpt3 com1 com2 com3 com4 con prn/);
  }
  
@@@ -3929,7 -4059,7 +3929,7 @@@ sub check_directories_in_var ($
      (sub
       {
         my ($var, $val, $cond, $full_cond) = @_;
 -       check_directory ($val, $var->rdef ($cond)->location);
 +       check_directory ($val, $var->rdef ($cond)->location, $relative_dir);
         return ();
       },
       undef,
@@@ -3982,8 -4112,8 +3982,8 @@@ sub scan_aclocal_m4 (
      {
        push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
        msg_var ('obsolete', 'ACLOCAL_M4_SOURCES',
 -             "`ACLOCAL_M4_SOURCES' is obsolete.\n"
 -             . "It should be safe to simply remove it.");
 +             "'ACLOCAL_M4_SOURCES' is obsolete.\n"
 +             . "It should be safe to simply remove it");
      }
  
    # Note that it might be possible that aclocal.m4 doesn't exist but
@@@ -4076,7 -4206,7 +4076,7 @@@ sub rewrite_inputs_into_dependencies ($
        else
        {
          msg ('error', $ac_config_files_location{$file},
 -             "required file `$i' not found")
 +             "required file '$i' not found")
            unless $i =~ /\$/ || exists $output_files{$i} || -f $i;
          ($i) = prepend_srcdir ($i);
          push_dist_common ($i);
@@@ -4241,8 -4371,8 +4241,8 @@@ sub handle_configure ($$$@
      }
  
    reject_var ('CONFIG_HEADER',
 -            "`CONFIG_HEADER' is an anachronism; now determined "
 -            . "automatically\nfrom `$configure_ac'");
 +            "'CONFIG_HEADER' is an anachronism; now determined "
 +            . "automatically\nfrom '$configure_ac'");
  
    my @config_h;
    foreach my $spec (@config_headers)
  
        # We skip files that aren't in this directory.  However, if
        # the file's directory does not have a Makefile, and we are
 -      # currently doing `.', then we create a rule to rebuild the
 +      # currently doing '.', then we create a rule to rebuild the
        # file in the subdir.
        my $fd = dirname ($file);
        if ($fd ne $relative_dir)
        {
          # We skip links that aren't in this directory.  However, if
          # the link's directory does not have a Makefile, and we are
 -        # currently doing `.', then we add the link to CONFIG_CLEAN_FILES
 -        # in `.'s Makefile.in.
 +        # currently doing '.', then we add the link to CONFIG_CLEAN_FILES
 +        # in '.'s Makefile.in.
          my $local = basename ($link);
          my $fd = dirname ($link);
          if ($fd ne $relative_dir)
          my $fd = dirname ($file);
  
          # We distribute files that are in this directory.
 -        # At the top-level (`.') we also distribute files whose
 +        # At the top-level ('.') we also distribute files whose
          # directory does not have a Makefile.
          if (($fd eq $relative_dir)
              || ($relative_dir eq '.' && ! &is_make_dir ($fd)))
@@@ -4444,20 -4574,20 +4444,20 @@@ sub handle_gettex
        my @subdirs = $subdirs->value_as_list_recursive;
  
        msg_var ('syntax', $subdirs,
 -             "AM_GNU_GETTEXT used but `po' not in SUBDIRS")
 +             "AM_GNU_GETTEXT used but 'po' not in SUBDIRS")
        if ! grep ($_ eq 'po', @subdirs);
  
        # intl/ is not required when AM_GNU_GETTEXT is called with the
 -      # `external' option and AM_GNU_GETTEXT_INTL_SUBDIR is not called.
 +      # 'external' option and AM_GNU_GETTEXT_INTL_SUBDIR is not called.
        msg_var ('syntax', $subdirs,
 -             "AM_GNU_GETTEXT used but `intl' not in SUBDIRS")
 +             "AM_GNU_GETTEXT used but 'intl' not in SUBDIRS")
        if (! ($seen_gettext_external && ! $seen_gettext_intl)
            && ! grep ($_ eq 'intl', @subdirs));
  
        # intl/ should not be used with AM_GNU_GETTEXT([external]), except
        # if AM_GNU_GETTEXT_INTL_SUBDIR is called.
        msg_var ('syntax', $subdirs,
 -             "`intl' should not be in SUBDIRS when "
 +             "'intl' should not be in SUBDIRS when "
               . "AM_GNU_GETTEXT([external]) is used")
        if ($seen_gettext_external && ! $seen_gettext_intl
            && grep ($_ eq 'intl', @subdirs));
  sub handle_footer
  {
      reject_rule ('.SUFFIXES',
 -               "use variable `SUFFIXES', not target `.SUFFIXES'");
 +               "use variable 'SUFFIXES', not target '.SUFFIXES'");
  
      # Note: AIX 4.1 /bin/make will fail if any suffix rule appears
      # before .SUFFIXES.  So we make sure that .SUFFIXES appears before
  }
  
  
 -# Generate `make install' rules.
 +# Generate 'make install' rules.
  sub handle_install ()
  {
    $output_rules .= &file_contents
@@@ -4523,7 -4653,7 +4523,7 @@@ sub handle_all ($
  {
      my ($makefile) = @_;
  
 -    # Output `all-am'.
 +    # Output 'all-am'.
  
      # Put this at the beginning for the sake of non-GNU makes.  This
      # is still wrong if these makes can run parallel jobs.  But it is
          if dirname ($out) eq $relative_dir;
        }
  
 -    # Install `all' hooks.
 +    # Install 'all' hooks.
      push (@all, "all-local")
        if user_phony_rule "all-local";
  
      &depend ('.PHONY', 'all-am', 'all');
  
  
 -    # Output `all'.
 +    # Output 'all'.
  
      my @local_headers = ();
      push @local_headers, '$(BUILT_SOURCES)'
        {
        # We need to make sure config.h is built before we recurse.
        # We also want to make sure that built sources are built
 -      # before any ordinary `all' targets are run.  We can't do this
 +      # before any ordinary 'all' targets are run.  We can't do this
        # by changing the order of dependencies to the "all" because
        # that breaks when using parallel makes.  Instead we handle
        # things explicitly.
@@@ -4598,7 -4728,7 +4598,7 @@@ sub do_check_merge_target (
    else
      {
        # The check target must depend on the local equivalent of
 -      # `all', to ensure all the primary targets are built.  Then it
 +      # '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)
      }
  
    depend '.PHONY', 'check', 'check-am';
 -  # Handle recursion.  We have to honor BUILT_SOURCES like for `all:'.
 +  # Handle recursion.  We have to honor BUILT_SOURCES like for 'all:'.
    $output_rules .= ("check: "
                    . (var ('BUILT_SOURCES')
                       ? "\$(BUILT_SOURCES)\n\t\$(MAKE) \$(AM_MAKEFLAGS) "
@@@ -4661,7 -4791,7 +4661,7 @@@ sub handle_clean ($
        unless exists $rms{$when};
  
        my $rm = "rm -f $file";
 -      # If file is a variable, make sure when don't call `rm -f' without args.
 +      # If file is a variable, make sure when don't call 'rm -f' without args.
        $rm ="test -z \"$file\" || $rm"
        if ($file =~ /^\s*\$(\(.*\)|\{.*\})\s*$/);
  
  
  # &target_cmp ($A, $B)
  # --------------------
 -# Subroutine for &handle_factored_dependencies to let `.PHONY' and
 -# other `.TARGETS' be last.
 +# Subroutine for &handle_factored_dependencies to let '.PHONY' and
 +# other '.TARGETS' be last.
  sub target_cmp
  {
    return 0 if $a eq $b;
@@@ -4715,16 -4845,16 +4715,16 @@@ sub handle_factored_dependencie
      {
        my $x = $utarg;
        $x =~ s/-.*-/-/;
 -      reject_rule ($utarg, "use `$x', not `$utarg'");
 +      reject_rule ($utarg, "use '$x', not '$utarg'");
      }
  
    reject_rule ('install-local',
 -             "use `install-data-local' or `install-exec-local', "
 -             . "not `install-local'");
 +             "use 'install-data-local' or 'install-exec-local', "
 +             . "not 'install-local'");
  
    reject_rule ('install-hook',
 -             "use `install-data-hook' or `install-exec-hook', "
 -             . "not `install-hook'");
 +             "use 'install-data-hook' or 'install-exec-hook', "
 +             . "not 'install-hook'");
  
    # Install the -local hooks.
    foreach (keys %dependencies)
        # to append dependencies.  This would not work if Automake
        # refrained from defining its own .PHONY target as it does
        # with other overridden targets.
 -      # Likewise for `.MAKE'.
 +      # Likewise for '.MAKE'.
        my @undefined_conds = (TRUE,);
        if ($_ ne '.PHONY' && $_ ne '.MAKE')
        {
@@@ -4795,58 -4925,6 +4795,58 @@@ sub handle_tests_dejagn
      $output_rules .= file_contents ('dejagnu', new Automake::Location);
  }
  
 +sub handle_per_suffix_test
 +{
 +  my ($test_suffix, %transform) = @_;
 +  my ($pfx, $generic, $parallel_tests_option, $am_exeext);
 +  prog_error ("called with 'parallel-tests' option not set")
 +    unless $parallel_tests_option = option 'parallel-tests';
 +  if ($test_suffix eq '')
 +    {
 +      $pfx = '';
 +      $generic = 0;
 +      $am_exeext = 'FALSE';
 +    }
 +  else
 +    {
 +      prog_error ("test suffix '$test_suffix' lacks leading dot")
 +        unless $test_suffix =~ m/^\.(.*)/;
 +      $pfx = uc ($1) . '_';
 +      $generic = 1;
 +      $am_exeext = exists $configure_vars{'EXEEXT'} ? 'am__EXEEXT'
 +                                                    : 'FALSE';
 +    }
 +  # The "test driver" program, deputed to handle tests protocol used by
 +  # test scripts.  By default, it's assumed that no protocol is used,
 +  # so we fall back to the old "parallel-tests" behaviour, implemented
 +  # by the 'test-driver' auxiliary script.
 +  if (! var "${pfx}LOG_DRIVER")
 +    {
 +      require_conf_file ($parallel_tests_option->{position}, FOREIGN,
 +                        'test-driver');
 +      define_variable ("${pfx}LOG_DRIVER",
 +                       "\$(SHELL) $am_config_aux_dir/test-driver",
 +                       INTERNAL);
 +    }
 +  my $driver = '$(' . $pfx . 'LOG_DRIVER)';
 +  my $driver_flags = '$(AM_' . $pfx . 'LOG_DRIVER_FLAGS)'
 +                       . ' $(' . $pfx . 'LOG_DRIVER_FLAGS)';
 +  my $compile = "${pfx}LOG_COMPILE";
 +  define_variable ($compile,
 +                   '$(' . $pfx . 'LOG_COMPILER)'
 +                      . ' $(AM_' .  $pfx . 'LOG_FLAGS)'
 +                      . ' $(' . $pfx . 'LOG_FLAGS)',
 +                     INTERNAL);
 +  $output_rules .= file_contents ('check2', new Automake::Location,
 +                                   GENERIC => $generic,
 +                                   DRIVER => $driver,
 +                                   DRIVER_FLAGS => $driver_flags,
 +                                   COMPILE => '$(' . $compile . ')',
 +                                   EXT => $test_suffix,
 +                                   am__EXEEXT => $am_exeext,
 +                                   %transform);
 +}
 +
  # is_valid_test_extension ($EXT)
  # ------------------------------
  # Return true if $EXT can appear in $(TEST_EXTENSIONS), return false
@@@ -4872,8 -4950,8 +4872,8 @@@ sub handle_test
      {
        foreach my $c ('DEJATOOL', 'RUNTEST', 'RUNTESTFLAGS')
        {
 -        reject_var ($c, "`$c' defined but `dejagnu' not in "
 -                    . "`AUTOMAKE_OPTIONS'");
 +        reject_var ($c, "'$c' defined but 'dejagnu' not in "
 +                    . "'AUTOMAKE_OPTIONS'");
        }
      }
  
        append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
        if (var ('XFAIL_TESTS'));
  
 -      if (option 'parallel-tests')
 +      if (my $parallel_tests = option 'parallel-tests')
          {
          define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
          my $suff = '.test';
            if ($var->has_conditional_contents)
             {
             msg_var 'unsupported', $var,
 -                     "`TEST_EXTENSIONS' cannot have conditional contents";
 +                     "'TEST_EXTENSIONS' cannot have conditional contents";
             }
          my @test_suffixes = $var->value_as_list_recursive;
            if ((my @invalid_test_suffixes =
                if ($val =~ /(\$\((top_)?srcdir\))\//o)
                  {
                    msg ('error', $subvar->rdef ($cond)->location,
 -                       "parallel-tests: using `$1' in TESTS is currently broken: `$val'");
 +                       "parallel-tests: using '$1' in TESTS is currently broken: '$val'");
                  }
  
                foreach my $test_suffix (@test_suffixes)
                    return substr ($obj, 0, length ($obj) - length ($test_suffix)) . '.log'
                      if substr ($obj, - length ($test_suffix)) eq $test_suffix;
                  }
 +              my $base = $obj;
                $obj .= '.log';
 -              my $compile = 'LOG_COMPILE';
 -              define_variable ($compile,
 -                               '$(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)', INTERNAL);
 -              $output_rules .= file_contents ('check2', new Automake::Location,
 -                                              GENERIC => 0,
 -                                              OBJ => $obj,
 -                                              SOURCE => $val,
 -                                              COMPILE =>'$(' . $compile . ')',
 -                                              EXT => '',
 -                                              am__EXEEXT => 'FALSE');
 +                handle_per_suffix_test ('',
 +                                        OBJ => $obj,
 +                                        BASE => $base,
 +                                        SOURCE => $val);
                return $obj;
              });
  
              $nhelper++;
              if ($test_suffix ne $at_exeext && $test_suffix ne '')
                {
 -                (my $ext = $test_suffix) =~ s/^\.//;
 -                $ext = uc $ext;
 -                my $compile = $ext . '_LOG_COMPILE';
 -                define_variable ($compile,
 -                                 '$(' . $ext . '_LOG_COMPILER) $(AM_' .  $ext . '_LOG_FLAGS)'
 -                                 . ' $(' . $ext . '_LOG_FLAGS)', INTERNAL);
 -                my $am_exeext = $handle_exeext ? 'am__EXEEXT' : 'FALSE';
 -                $output_rules .= file_contents ('check2', new Automake::Location,
 -                                                GENERIC => 1,
 -                                                OBJ => '',
 -                                                SOURCE => '$<',
 -                                                COMPILE => '$(' . $compile . ')',
 -                                                EXT => $test_suffix,
 -                                                am__EXEEXT => $am_exeext);
 +                  handle_per_suffix_test ($test_suffix,
 +                                          OBJ => '',
 +                                          BASE => '$*',
 +                                          SOURCE => '$<');
                }
            }
 -
 -        define_variable ('TEST_LOGS_TMP', '$(TEST_LOGS:.log=.log-t)', INTERNAL);
 -
 -        $clean_files{'$(TEST_LOGS_TMP)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;
 +        $clean_files{'$(TEST_LOGS:.log=.trs)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
        }
      }
@@@ -5086,7 -5182,7 +5086,7 @@@ sub handle_minor_option
          if ($package_version !~ /^$GNITS_VERSION_PATTERN$/)
            {
              msg ('error-gnits', $package_version_location,
 -                 "version `$package_version' doesn't follow " .
 +                 "version '$package_version' doesn't follow " .
                   "Gnits standards");
            }
          if (defined $1 && -f 'README-alpha')
@@@ -5208,11 -5304,11 +5208,11 @@@ sub scan_autoconf_traces ($
                AC_SUBST_TRACE => 1,
                AM_AUTOMAKE_VERSION => 1,
                AM_CONDITIONAL => 2,
 -              AM_ENABLE_MULTILIB => 0,
                AM_GNU_GETTEXT => 0,
                AM_GNU_GETTEXT_INTL_SUBDIR => 0,
                AM_INIT_AUTOMAKE => 0,
                AM_MAINTAINER_MODE => 0,
 +              AM_PROG_AR => 0,
                AM_PROG_CC_C_O => 0,
                AM_SILENT_RULES => 0,
                _AM_SUBST_NOTMAKE => 1,
  
    my $traces = ($ENV{AUTOCONF} || '@am_AUTOCONF@') . " ";
  
 -  # Use a separator unlikely to be used, not `:', the default, which
 +  # Use a separator unlikely to be used, not ':', the default, which
    # has a precise meaning for AC_CONFIG_FILES and so on.
    $traces .= join (' ',
                   map { "--trace=$_" . ':\$f:\$l::\$d::\$n::\${::}%' }
        $where = new Automake::Location $here;
        my $macro = $args[0];
  
 -      prog_error ("unrequested trace `$macro'")
 +      prog_error ("unrequested trace '$macro'")
        unless exists $traced{$macro};
  
        # Skip and diagnose malformed calls.
          if ($seen_init_automake)
            {
              error ($where, "AC_CONFIG_AUX_DIR must be called before "
 -                   . "AM_INIT_AUTOMAKE...", partial => 1);
 +                   . "AM_INIT_AUTOMAKE ...", partial => 1);
              error ($seen_init_automake, "... AM_INIT_AUTOMAKE called here");
            }
          $config_aux_dir = $args[1];
          $config_aux_dir_set_in_configure_ac = 1;
 -        $relative_dir = '.';
          check_directory ($config_aux_dir, $where);
        }
        elsif ($macro eq 'AC_CONFIG_FILES')
        elsif ($macro eq 'AC_CONFIG_LIBOBJ_DIR')
        {
          $config_libobj_dir = $args[1];
 -        $relative_dir = '.';
          check_directory ($config_libobj_dir, $where);
        }
        elsif ($macro eq 'AC_CONFIG_LINKS')
        {
          $configure_cond{$args[1]} = $where;
        }
 -      elsif ($macro eq 'AM_ENABLE_MULTILIB')
 -      {
 -        $seen_multilib = $where;
 -      }
        elsif ($macro eq 'AM_GNU_GETTEXT')
        {
          $seen_gettext = $where;
            }
          elsif (defined $args[1])
            {
 -            exit $exit_code
 -              if (process_global_option_list ($where,
 -                                              split (' ', $args[1])));
 +            my @opts = split (' ', $args[1]);
 +            @opts = map { { option => $_, where => $where } } @opts;
 +            exit $exit_code if process_global_option_list (@opts);
            }
        }
        elsif ($macro eq 'AM_MAINTAINER_MODE')
        {
          $seen_maint_mode = $where;
        }
 +      elsif ($macro eq 'AM_PROG_AR')
 +      {
 +        $seen_ar = $where;
 +      }
        elsif ($macro eq 'AM_PROG_CC_C_O')
        {
          $seen_cc_c_o = $where;
             || $macro eq 'm4_sinclude'
             || $macro eq 'sinclude')
        {
 -        # Skip missing `sinclude'd files.
 +        # Skip missing 'sinclude'd files.
          next if $macro ne 'm4_include' && ! -f $args[1];
  
          # Some modified versions of Autoconf don't use
  
  # &scan_autoconf_files ()
  # -----------------------
 -# Check whether we use `configure.ac' or `configure.in'.
 -# Scan it (and possibly `aclocal.m4') for interesting things.
 +# Check whether we use 'configure.ac' or 'configure.in'.
 +# Scan it (and possibly 'aclocal.m4') for interesting things.
  # We must scan aclocal.m4 because there might be AC_SUBSTs and such there.
  sub scan_autoconf_files ()
  {
              . "should verify that $configure_ac invokes AM_INIT_AUTOMAKE,"
              . "\nthat aclocal.m4 is present in the top-level directory,\n"
              . "and that aclocal.m4 was recently regenerated "
 -            . "(using aclocal).");
 +            . "(using aclocal)");
      }
    else
      {
              error ($seen_init_automake,
                     "your implementation of AM_INIT_AUTOMAKE comes from " .
                     "an\nold Automake version.  You should recreate " .
 -                   "aclocal.m4\nwith aclocal and run automake again.\n",
 +                   "aclocal.m4\nwith aclocal and run automake again",
                     # $? = 63 is used to indicate version mismatch to missing.
                     exit_code => 63);
            }
            {
              error ($seen_init_automake,
                     "no proper implementation of AM_INIT_AUTOMAKE was " .
 -                   "found,\nprobably because aclocal.m4 is missing...\n" .
 +                   "found,\nprobably because aclocal.m4 is missing.\n" .
                     "You should run aclocal to create this file, then\n" .
 -                   "run automake again.\n");
 +                   "run automake again");
            }
        }
      }
  
    locate_aux_dir ();
  
 -  # Reorder @input_files so that the Makefile that distributes aux
 -  # files is processed last.  This is important because each directory
 -  # can require auxiliary scripts and we should wait until they have
 -  # been installed before distributing them.
 -
 -  # The Makefile.in that distribute the aux files is the one in
 -  # $config_aux_dir or the top-level Makefile.
 -  my $auxdirdist = is_make_dir ($config_aux_dir) ? $config_aux_dir : '.';
 -  my @new_input_files = ();
 -  while (@input_files)
 -    {
 -      my $in = pop @input_files;
 -      my @ins = split (/:/, $output_files{$in});
 -      if (dirname ($ins[0]) eq $auxdirdist)
 -      {
 -        push @new_input_files, $in;
 -        $automake_will_process_aux_dir = 1;
 -      }
 -      else
 -      {
 -        unshift @new_input_files, $in;
 -      }
 -    }
 -  @input_files = @new_input_files;
 -
 -  # If neither the auxdir/Makefile nor the ./Makefile are generated
 -  # by Automake, we won't distribute the aux files anyway.  Assume
 -  # the user know what (s)he does, and pretend we will distribute
 -  # them to disable the error in require_file_internal.
 -  $automake_will_process_aux_dir = 1 if ! is_make_dir ($auxdirdist);
 -
    # Look for some files we need.  Always check for these.  This
    # check must be done for every run, even those where we are only
    # looking at a subdir Makefile.  We must set relative_dir for
 -  # maybe_push_required_file to work.
 +  # push_required_file to work.
    # Sort the files for stable verbose output.
    $relative_dir = '.';
    foreach my $file (sort keys %required_aux_file)
      {
        require_conf_file ($required_aux_file{$file}->get, FOREIGN, $file)
      }
 -  err_am "`install.sh' is an anachronism; use `install-sh' instead"
 +  err_am "'install.sh' is an anachronism; use 'install-sh' instead"
      if -f $config_aux_dir . '/install.sh';
  
    # Preserve dist_common for later.
@@@ -5577,7 -5706,7 +5577,7 @@@ sub check_cygnu
    set_option ('no-dependencies', $cygnus);
    set_option ('no-dist', $cygnus);
  
 -  err_ac "`AM_MAINTAINER_MODE' required when --cygnus specified"
 +  err_ac "'AM_MAINTAINER_MODE' required when --cygnus specified"
      if !$seen_maint_mode;
  }
  
@@@ -5608,7 -5737,7 +5608,7 @@@ sub check_gnu_standard
    for my $opt ('no-installman', 'no-installinfo')
      {
        msg ('error-gnu', option $opt,
 -         "option `$opt' disallowed by GNU standards")
 +         "option '$opt' disallowed by GNU standards")
        if option $opt;
      }
  }
@@@ -5627,7 -5756,7 +5627,7 @@@ sub check_gnits_standard
  #
  # Functions to handle files of each language.
  
 -# Each `lang_X_rewrite($DIRECTORY, $BASE, $EXT)' function follows a
 +# Each 'lang_X_rewrite($DIRECTORY, $BASE, $EXT)' function follows a
  # simple formula: Return value is LANG_SUBDIR if the resulting object
  # file should be in a subdir if the source file is, LANG_PROCESS if
  # file is to be dealt with, LANG_IGNORE otherwise.
@@@ -5648,7 -5777,13 +5648,7 @@@ sub lang_sub_ob
  # Rewrite a single C source file.
  sub lang_c_rewrite
  {
 -  my ($directory, $base, $ext, $nonansi_obj, $have_per_exec_flags, $var) = @_;
 -
 -  if (option 'ansi2knr' && $base =~ /_$/)
 -    {
 -      # FIXME: include line number in error.
 -      err_am "C source file `$base.c' would be deleted by ansi2knr rules";
 -    }
 +  my ($directory, $base, $ext, $obj, $have_per_exec_flags, $var) = @_;
  
    my $r = LANG_PROCESS;
    if (option 'subdir-objects')
          # libtool is always able to put the object at the proper place,
          # so we do not have to require AM_PROG_CC_C_O when building .lo files.
          msg_var ('portability', $var,
 -                 "compiling `$base.c' in subdir requires "
 -                 . "`AM_PROG_CC_C_O' in `$configure_ac'",
 +                 "compiling '$base.c' in subdir requires "
 +                 . "'AM_PROG_CC_C_O' in '$configure_ac'",
                   uniq_scope => US_GLOBAL,
                   uniq_part => 'AM_PROG_CC_C_O subdir')
 -          unless $seen_cc_c_o || $nonansi_obj eq '.lo';
 +          unless $seen_cc_c_o || $obj eq '.lo';
        }
 -
 -      # In this case we already have the directory information, so
 -      # don't add it again.
 -      $de_ansi_files{$base} = '';
 -    }
 -  else
 -    {
 -      $de_ansi_files{$base} = (($directory eq '.' || $directory eq '')
 -                             ? ''
 -                             : "$directory/");
      }
  
    if (! $seen_cc_c_o
        && $have_per_exec_flags
        && ! option 'subdir-objects'
 -      && $nonansi_obj ne '.lo')
 +      && $obj ne '.lo')
      {
        msg_var ('portability',
 -             $var, "compiling `$base.c' with per-target flags requires "
 -             . "`AM_PROG_CC_C_O' in `$configure_ac'",
 +             $var, "compiling '$base.c' with per-target flags requires "
 +             . "'AM_PROG_CC_C_O' in '$configure_ac'",
               uniq_scope => US_GLOBAL,
               uniq_part => 'AM_PROG_CC_C_O per-target')
      }
@@@ -5811,25 -5956,77 +5811,24 @@@ sub lang_java_rewrit
  # language, etc.  A finish function is only called if a source file of
  # the appropriate type has been seen.
  
 -sub lang_c_finish
 -{
 -    # Push all libobjs files onto de_ansi_files.  We actually only
 -    # push files which exist in the current directory, and which are
 -    # genuine source files.
 -    foreach my $file (keys %libsources)
 -    {
 -      if ($file =~ /^(.*)\.[cly]$/ && -f "$relative_dir/$file")
 -      {
 -          $de_ansi_files{$1} = ''
 -      }
 -    }
 -
 -    if (option 'ansi2knr' && keys %de_ansi_files)
 -    {
 -      # Make all _.c files depend on their corresponding .c files.
 -      my @objects;
 -      foreach my $base (sort keys %de_ansi_files)
 -      {
 -          # Each _.c file must depend on ansi2knr; otherwise it
 -          # might be used in a parallel build before it is built.
 -          # We need to support files in the srcdir and in the build
 -          # dir (because these files might be auto-generated.  But
 -          # we can't use $< -- some makes only define $< during a
 -          # suffix rule.
 -          my $ansfile = $de_ansi_files{$base} . $base . '.c';
 -          $output_rules .= ($base . "_.c: $ansfile \$(ANSI2KNR)\n\t"
 -                            . '$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) '
 -                            . '`if test -f $(srcdir)/' . $ansfile
 -                            . '; then echo $(srcdir)/' . $ansfile
 -                            . '; else echo ' . $ansfile . '; fi` '
 -                            . "| sed 's/^# \\([0-9]\\)/#line \\1/' "
 -                            . '| $(ANSI2KNR) > $@'
 -                            # If ansi2knr fails then we shouldn't
 -                            # create the _.c file
 -                            . " || rm -f \$\@\n");
 -          push (@objects, $base . '_.$(OBJEXT)');
 -          push (@objects, $base . '_.lo')
 -            if var ('LIBTOOL');
 -
 -          # Explicitly clean the _.c files if they are in a
 -          # subdirectory. (In the current directory they get erased
 -          # by a `rm -f *_.c' rule.)
 -          $clean_files{$base . '_.c'} = MOSTLY_CLEAN
 -            if dirname ($base) ne '.';
 -      }
 -
 -      # Make all _.o (and _.lo) files depend on ansi2knr.
 -      # Use a sneaky little hack to make it print nicely.
 -      &pretty_print_rule ('', '', @objects, ':', '$(ANSI2KNR)');
 -    }
 -}
 -
  sub lang_vala_finish_target ($$)
  {
    my ($self, $name) = @_;
  
    my $derived = canonicalize ($name);
-   my $varname = $derived . '_SOURCES';
-   my $var = var ($varname);
+   my $var = var "${derived}_SOURCES";
+   return unless $var;
  
-   if ($var)
+   my @vala_sources = grep { /\.vala$/ } ($var->value_as_list_recursive);
+   foreach my $vala_file (@vala_sources)
      {
-       foreach my $file ($var->value_as_list_recursive)
-         {
-           $output_rules .= "\$(srcdir)/$file: \$(srcdir)/${derived}_vala.stamp\n"
-             . "\t\@if test -f \$@; then :; else rm -f \$(srcdir)/${derived}_vala.stamp; fi\n"
-             . "\t\@if test -f \$@; then :; else \\\n"
-             . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; \\\n"
-           . "\tfi\n"
-             if $file =~ s/(.*)\.vala$/$1.c/;
-         }
+       (my $c_file = $vala_file) =~ s/(.*)\.vala$/$1.c/;
+       $output_rules .= "\$(srcdir)/$c_file: \$(srcdir)/${derived}_vala.stamp\n"
+         . "\t\@if test -f \$@; then :; else rm -f \$(srcdir)/${derived}_vala.stamp; fi\n"
+         . "\t\@if test -f \$@; then :; else \\\n"
+         . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; \\\n"
+         . "\tfi\n"
      }
  
    # Add rebuild rules for generated header and vapi files
  
    my $compile = $self->compile;
  
 -  # Rewrite each occurrence of `AM_VALAFLAGS' in the compile
 -  # rule into `${derived}_VALAFLAGS' if it exists.
 +  # Rewrite each occurrence of 'AM_VALAFLAGS' in the compile
 +  # rule into '${derived}_VALAFLAGS' if it exists.
    my $val = "${derived}_VALAFLAGS";
    $compile =~ s/\(AM_VALAFLAGS\)/\($val\)/
      if set_seen ($val);
    my $silent = silent_flag ();
  
    $output_rules .=
-     "\$(srcdir)/${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
+     "\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
  # Since the C files generated from the vala sources depend on the
  # ${derived}_vala.stamp file, we must ensure its timestamp is older than
  # those of the C files generated by the valac invocation below (this is
  # Thus we need to create the stamp file *before* invoking valac, and to
  # move it to its final location only after valac has been invoked.
      "\t${silent}rm -f \$\@ && echo stamp > \$\@-t\n".
-     "\t${verbose}\$(am__cd) \$(srcdir) && ${compile} \$(${derived}_SOURCES)\n".
+     "\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
      "\t${silent}mv -f \$\@-t \$\@\n";
  
    push_dist_common ("${derived}_vala.stamp");
@@@ -5929,49 -6126,18 +5928,49 @@@ sub lang_yacc_target_hoo
  {
      my ($self, $aggregate, $output, $input, %transform) = @_;
  
 -    my $flag = $aggregate . "_YFLAGS";
 -    my $flagvar = var $flag;
 -    my $YFLAGSvar = var 'YFLAGS';
 -    if (($flagvar && $flagvar->variable_value =~ /$DASH_D_PATTERN/o)
 -      || ($YFLAGSvar && $YFLAGSvar->variable_value =~ /$DASH_D_PATTERN/o))
 -    {
 -      (my $output_base = $output) =~ s/$KNOWN_EXTENSIONS_PATTERN$//;
 -      my $header = $output_base . '.h';
 +    # If some relevant *YFLAGS variable contains the '-d' flag, we'll
 +    # have to to generate special code.
 +    my $yflags_contains_minus_d = 0;
  
 -      # Found a `-d' that applies to the compilation of this file.
 +    foreach my $pfx ("", "${aggregate}_")
 +      {
 +      my $yflagsvar = var ("${pfx}YFLAGS");
 +      next unless $yflagsvar;
 +      # We cannot work reliably with conditionally-defined YFLAGS.
 +      if ($yflagsvar->has_conditional_contents)
 +        {
 +          msg_var ('unsupported', $yflagsvar,
 +                   "'${pfx}YFLAGS' cannot have conditional contents");
 +        }
 +      else
 +        {
 +          $yflags_contains_minus_d = 1
 +            if grep (/^-d$/, $yflagsvar->value_as_list_recursive);
 +        }
 +      }
 +
 +    if ($yflags_contains_minus_d)
 +      {
 +      # Found a '-d' that applies to the compilation of this file.
        # Add a dependency for the generated header file, and arrange
        # for that file to be included in the distribution.
 +
 +      # The extension of the output file (e.g., '.c' or '.cxx').
 +      # We'll need it to compute the name of the generated header file.
 +      (my $output_ext = basename ($output)) =~ s/.*(\.[^.]+)$/$1/;
 +
 +      # We know that a yacc input should be turned into either a C or
 +      # C++ output file.  We depend on this fact (here and in yacc.am),
 +      # so check that it really holds.
 +      my $lang = $languages{$extension_map{$output_ext}};
 +      prog_error "invalid output name '$output' for yacc file '$input'"
 +        if (!$lang || ($lang->name ne 'c' && $lang->name ne 'cxx'));
 +
 +      (my $header_ext = $output_ext) =~ s/c/h/g;
 +        # Quote $output_ext in the regexp, so that dots in it are taken
 +        # as literal dots, not as metacharacters.
 +      (my $header = $output) =~ s/\Q$output_ext\E$/$header_ext/;
 +
        foreach my $cond (Automake::Rule::define (${header}, 'internal',
                                                  RULE_AUTOMAKE, TRUE,
                                                  INTERNAL))
        &push_dist_common ($header)
          if $transform{'DIST_SOURCE'};
  
 -      # If the files are built in the build directory, then we want
 -      # to remove them with `make clean'.  If they are in srcdir
 -      # they shouldn't be touched.  However, we can't determine this
 -      # statically, and the GNU rules say that yacc/lex output files
 -      # should be removed by maintainer-clean.  So that's what we
 -      # do.
 -      $clean_files{$header} = MAINTAINER_CLEAN;
 -    }
 -    # Erase $OUTPUT on `make maintainer-clean' (by GNU standards).
 +      # The GNU rules say that yacc/lex output files should be removed
 +      # by maintainer-clean.  However, if the files are not distributed,
 +      # then we want to remove them with "make clean"; otherwise,
 +      # "make distcheck" will fail.
 +      $clean_files{$header} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN : CLEAN;
 +      }
      # See the comment above for $HEADER.
 -    $clean_files{$output} = MAINTAINER_CLEAN;
 +    $clean_files{$output} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN : CLEAN;
  }
  
  # This is a lex helper which is called whenever we have decided to
  # compile a lex file.
  sub lang_lex_target_hook
  {
 -    my ($self, $aggregate, $output, $input) = @_;
 -    # If the files are built in the build directory, then we want to
 -    # remove them with `make clean'.  If they are in srcdir they
 -    # shouldn't be touched.  However, we can't determine this
 -    # statically, and the GNU rules say that yacc/lex output files
 -    # should be removed by maintainer-clean.  So that's what we do.
 -    $clean_files{$output} = MAINTAINER_CLEAN;
 +    my ($self, $aggregate, $output, $input, %transform) = @_;
 +    # The GNU rules say that yacc/lex output files should be removed
 +    # by maintainer-clean.  However, if the files are not distributed,
 +    # then we want to remove them with "make clean"; otherwise,
 +    # "make distcheck" will fail.
 +    $clean_files{$output} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN : CLEAN;
  }
  
  # This is a helper for both lex and yacc.
@@@ -6027,7 -6197,7 +6026,7 @@@ sub lang_yacc_finis
    return if defined $language_scratch{'yacc-done'};
    $language_scratch{'yacc-done'} = 1;
  
 -  reject_var 'YACCFLAGS', "`YACCFLAGS' obsolete; use `YFLAGS' instead";
 +  reject_var 'YACCFLAGS', "'YACCFLAGS' obsolete; use 'YFLAGS' instead";
  
    yacc_lex_finish_helper;
  }
@@@ -6140,6 -6310,8 +6139,6 @@@ sub register_language (%
    my (%option) = @_;
  
    # Set the defaults.
 -  $option{'ansi'} = 0
 -    unless defined $option{'ansi'};
    $option{'autodep'} = 'no'
      unless defined $option{'autodep'};
    $option{'linker'} = ''
      {
        if (exists $link_languages{$link})
        {
 -        prog_error ("`$link' has different definitions in "
 +        prog_error ("'$link' has different definitions in "
                      . $lang->name . " and " . $link_languages{$link}->name)
            if $lang->link ne $link_languages{$link}->link;
        }
  # derive_suffix ($EXT, $OBJ)
  # --------------------------
  # This function is used to find a path from a user-specified suffix $EXT
 -# to $OBJ or to some other suffix we recognize internally, e.g. `cc'.
 +# to $OBJ or to some other suffix we recognize internally, e.g. 'cc'.
  sub derive_suffix ($$)
  {
    my ($source_ext, $obj) = @_;
@@@ -6262,9 -6434,9 +6261,9 @@@ sub cond_stack_if ($$$
        if (exists $_am_macro_for_cond{$cond})
        {
          my $mac = $_am_macro_for_cond{$cond};
 -        $text .= "\n  The usual way to define `$cond' is to add ";
 -        $text .= ($mac =~ / /) ? $mac : "`$mac'";
 -        $text .= "\n  to `$configure_ac' and run `aclocal' and `autoconf' again.";
 +        $text .= "\n  The usual way to define '$cond' is to add ";
 +        $text .= ($mac =~ / /) ? $mac : "'$mac'";
 +        $text .= "\n  to '$configure_ac' and run 'aclocal' and 'autoconf' again";
          # These warnings appear in Automake files (depend2.am),
          # so there is no need to display them more than once:
          $scope = US_GLOBAL;
@@@ -6396,18 -6568,29 +6395,18 @@@ sub define_files_variable ($\@$$
  sub define_configure_variable ($)
  {
    my ($var) = @_;
 -
 -  my $pretty = VAR_ASIS;
 -  my $owner = VAR_CONFIGURE;
 -
    # Some variables we do not want to output.  For instance it
    # would be a bad idea to output `U = @U@` when `@U@` can be
    # substituted as `\`.
 -  $pretty = VAR_SILENT if exists $ignored_configure_vars{$var};
 -
 -  # ANSI2KNR is a variable that Automake wants to redefine, so
 -  # it must be owned by Automake.  (It is also used as a proof
 -  # that AM_C_PROTOTYPES has been run, that's why we do not simply
 -  # omit the AC_SUBST.)
 -  $owner = VAR_AUTOMAKE if $var eq 'ANSI2KNR';
 -
 -  Automake::Variable::define ($var, $owner, '', TRUE, subst $var,
 +  my $pretty = exists $ignored_configure_vars{$var} ? VAR_SILENT : VAR_ASIS;
 +  Automake::Variable::define ($var, VAR_CONFIGURE, '', TRUE, subst $var,
                              '', $configure_vars{$var}, $pretty);
  }
  
  
  # define_compiler_variable ($LANG)
  # --------------------------------
 -# Define a compiler variable.  We also handle defining the `LT'
 +# Define a compiler variable.  We also handle defining the 'LT'
  # version of the command when using libtool.
  sub define_compiler_variable ($)
  {
@@@ -6466,7 -6649,7 +6465,7 @@@ sub define_per_target_linker_variable (
    my $xlink = $linker ? $linker : 'LINK';
  
    my $lang = $link_languages{$xlink};
 -  prog_error "Unknown language for linker variable `$xlink'"
 +  prog_error "Unknown language for linker variable '$xlink'"
      unless $lang;
  
    my $link_command = $lang->link;
        . "--mode=link " . $link_command;
      }
  
 -  # Rewrite each occurrence of `AM_$flag' in the link
 -  # command into `${derived}_$flag' if it exists.
 +  # Rewrite each occurrence of 'AM_$flag' in the link
 +  # command into '${derived}_$flag' if it exists.
    my $orig_command = $link_command;
    my @flags = (@{$lang->flags}, 'LDFLAGS');
    push @flags, 'LIBTOOLFLAGS' if var 'LIBTOOL';
@@@ -6513,7 -6696,7 +6512,7 @@@ sub check_trailing_slash ($\$
  {
    my ($where, $line) = @_;
  
 -  # Ignore `##' lines.
 +  # Ignore '##' lines.
    return 0 if $$line =~ /$IGNORE_PATTERN/o;
  
    # Catch and fix a common error.
@@@ -6651,7 -6834,7 +6650,7 @@@ sub read_am_file ($$
            }
            elsif ($prev_state == IN_COMMENT)
            {
 -              # If the line doesn't start with a `#', add it.
 +              # If the line doesn't start with a '#', add it.
                # We do this because a continued comment like
                #   # A = foo \
                #         bar \
            $last_where = $where->clone;
            if ($3 ne '' && substr ($3, -1) eq "\\")
              {
 -              # We preserve the `\' because otherwise the long lines
 +              # We preserve the '\' because otherwise the long lines
                # that are generated will be truncated by broken
 -              # `sed's.
 +              # 'sed's.
                $last_var_value = $3 . "\n";
              }
            # Normally we try to output variable definitions in the
  
                # Always use the $(top_srcdir) prefix in DIST_COMMON,
                # otherwise OSF make will implicitly copy the included
 -              # file in the build tree during `make distdir' to satisfy
 +              # file in the build tree during "make distdir" to satisfy
                # the dependency.
                # (subdircond2.test and subdircond3.test will fail.)
                push_dist_common ("\$\(top_srcdir\)/$path");
                push (@include_stack, "\$\(srcdir\)/$path");
                # Always use the $(srcdir) prefix in DIST_COMMON,
                # otherwise OSF make will implicitly copy the included
 -              # file in the build tree during `make distdir' to satisfy
 +              # file in the build tree during "make distdir" to satisfy
                # the dependency.
                # (subdircond2.test and subdircond3.test will fail.)
                push_dist_common ("\$\(srcdir\)/$path");
                $path = $relative_dir . "/" . $path if $relative_dir ne '.';
              }
 -          $where->push_context ("`$path' included from here");
 +          $where->push_context ("'$path' included from here");
            &read_am_file ($path, $where);
            $where->pop_context;
        }
            $output_trailer .= $cond->subst_string;
            $output_trailer .= $_;
            $comment = $spacing = '';
 -          error $where, "`#' comment at start of rule is unportable"
 +          error $where, "'#' comment at start of rule is unportable"
              if $_ =~ /^\t\s*\#/;
        }
  
@@@ -6848,7 -7031,7 +6847,7 @@@ sub read_main_am_fil
      $output_vars .= $gen_copyright;
  
      # We want to predefine as many variables as possible.  This lets
 -    # the user set them with `+=' in Makefile.am.
 +    # the user set them with '+=' in Makefile.am.
      &define_standard_variables;
  
      # Read user file, which might override some of our values.
@@@ -6884,7 -7067,7 +6883,7 @@@ sub transform_token ($$$
  {
    my ($token, $transform, $key) = @_;
    my $res = $transform->{$key};
 -  prog_error "Unknown key `$key' in `$token'" unless defined $res;
 +  prog_error "Unknown key '$key' in '$token'" unless defined $res;
    return $res;
  }
  
@@@ -7000,7 -7183,7 +6999,7 @@@ sub make_paragraphs ($%
        | \? !? [\w\-]+ \?
      )/transform($&, \%transform)/gex;
    # transform() may have added some ##%-comments to strip.
 -  # (we use `##%' instead of `##' so we can distinguish ##%##%##% from
 +  # (we use '##%' instead of '##' so we can distinguish ##%##%##% from
    # ####### and do not remove the latter.)
    s/^[ \t]*(?:##%)+.*\n//gm;
  
@@@ -7098,8 -7281,8 +7097,8 @@@ sub file_contents_internal ($$$%
            if ($cond != FALSE)
              {
                my $file = ($is_am ? "$libdir/am/" : '') . $1;
 -              $where->push_context ("`$file' included from here");
 -              # N-ary `.=' fails.
 +              $where->push_context ("'$file' included from here");
 +              # N-ary '.=' fails.
                my ($com, $vars, $rules)
                  = file_contents_internal ($is_am, $file, $where, %transform);
                $where->pop_context;
  
              # FIXME: 3. We are not robust to people defining a subset
              # of a previously defined "multiple-target" rule.  E.g.
 -            # `foo:' after `foo bar:'.
 +            # 'foo:' after 'foo bar:'.
  
              # Output only if not in FALSE.
              if (defined $dependencies{$_} && $cond != FALSE)
        elsif (/$ASSIGNMENT_PATTERN/mso)
        {
            my ($var, $type, $val) = ($1, $2, $3);
 -          error $where, "variable `$var' with trailing backslash"
 +          error $where, "variable '$var' with trailing backslash"
              if /\\$/;
  
            $is_rule = 0;
        else
        {
            # This isn't an error; it is probably some tokens which
 -          # configure is supposed to replace, such as `@SET-MAKE@',
 +          # configure is supposed to replace, such as '@SET-MAKE@',
            # or some part of a rule cut by an if/endif.
            if (! $cond->false && ! ($is_rule && $discard_rule))
              {
@@@ -7252,10 -7435,10 +7251,10 @@@ sub file_contents ($$%
  # &am_primary_prefixes ($PRIMARY, $CAN_DIST, @PREFIXES)
  # -----------------------------------------------------
  # Find all variable prefixes that are used for install directories.  A
 -# prefix `zar' qualifies iff:
 +# prefix 'zar' qualifies iff:
  #
 -# * `zardir' is a variable.
 -# * `zar_PRIMARY' is a variable.
 +# * 'zardir' is a variable.
 +# * 'zar_PRIMARY' is a variable.
  #
  # As a side effect, it looks for misspellings.  It is an error to have
  # a variable ending in a "reserved" suffix whose prefix is unknown, e.g.
@@@ -7291,18 -7474,18 +7290,18 @@@ sub am_primary_prefixes ($$@
          if ($dist ne '' && ! $can_dist)
            {
              err_var ($var,
 -                     "invalid variable `$varname': `dist' is forbidden");
 +                     "invalid variable '$varname': 'dist' is forbidden");
            }
          # Standard directories must be explicitly allowed.
          elsif (! defined $valid{$X} && exists $standard_prefix{$X})
            {
              err_var ($var,
 -                     "`${X}dir' is not a legitimate directory " .
 -                     "for `$primary'");
 +                     "'${X}dir' is not a legitimate directory " .
 +                     "for '$primary'");
            }
          # A not explicitly valid directory is allowed if Xdir is defined.
          elsif (! defined $valid{$X} &&
 -               $var->requires_variables ("`$varname' is used", "${X}dir"))
 +               $var->requires_variables ("'$varname' is used", "${X}dir"))
            {
              # Nothing to do.  Any error message has been output
              # by $var->requires_variables.
  }
  
  
 -# Handle `where_HOW' variable magic.  Does all lookups, generates
 +# Handle 'where_HOW' variable magic.  Does all lookups, generates
  # install code, and possibly generates code to define the primary
  # variable.  The first argument is the name of the .am file to munge,
  # the second argument is the primary variable (e.g. HEADERS), and all
@@@ -7372,10 -7555,10 +7371,10 @@@ sub am_install_va
  
    # Now that configure substitutions are allowed in where_HOW
    # variables, it is an error to actually define the primary.  We
 -  # allow `JAVA', as it is customarily used to mean the Java
 +  # allow 'JAVA', as it is customarily used to mean the Java
    # interpreter.  This is but one of several Java hacks.  Similarly,
 -  # `PYTHON' is customarily used to mean the Python interpreter.
 -  reject_var $primary, "`$primary' is an anachronism"
 +  # 'PYTHON' is customarily used to mean the Python interpreter.
 +  reject_var $primary, "'$primary' is an anachronism"
      unless $primary eq 'JAVA' || $primary eq 'PYTHON';
  
    # Get the prefixes which are valid and actually used.
              if ($nodir_name eq 'EXTRA')
                {
                  error ($where,
 -                       "`$one_name' contains configure substitution, "
 +                       "'$one_name' contains configure substitution, "
                         . "but shouldn't");
                }
              # Check here to make sure variables defined in
        my $check_options_p = $install_p && !! option 'std-options';
  
        # Use the location of the currently processed variable as context.
 -      $where->push_context ("while processing `$one_name'");
 +      $where->push_context ("while processing '$one_name'");
  
        # The variable containing all files to distribute.
        my $distvar = "\$($one_name)";
      }
  
    err_var ($require_extra,
 -         "`$require_extra' contains configure substitution,\n"
 -         . "but `EXTRA_$primary' not defined")
 +         "'$require_extra' contains configure substitution,\n"
 +         . "but 'EXTRA_$primary' not defined")
      if ($require_extra && ! var ('EXTRA_' . $primary));
  
    # Push here because PRIMARY might be configure time determined.
  ################################################################
  
  # Each key in this hash is the name of a directory holding a
 -# Makefile.in.  These variables are local to `is_make_dir'.
 +# Makefile.in.  These variables are local to 'is_make_dir'.
  my %make_dirs = ();
  my $make_dirs_set = 0;
  
@@@ -7596,42 -7779,18 +7595,42 @@@ sub locate_aux_dir (
  }
  
  
 -# &maybe_push_required_file ($DIR, $FILE, $FULLFILE)
 +# &push_required_file ($DIR, $FILE, $FULLFILE)
  # --------------------------------------------------
 -# See if we want to push this file onto dist_common.  This function
 -# encodes the rules for deciding when to do so.
 -sub maybe_push_required_file
 +# Push the given file onto DIST_COMMON.
 +sub push_required_file
  {
    my ($dir, $file, $fullfile) = @_;
  
 +  # If the file to be distributed is in the same directory of the
 +  # currently processed Makefile.am, then we want to distribute it
 +  # from this same Makefile.am.
    if ($dir eq $relative_dir)
      {
        push_dist_common ($file);
 -      return 1;
 +    }
 +  # This is needed to allow a construct in a non-top-level Makefile.am
 +  # to require a file in the build-aux directory (see at least the test
 +  # script 'test-driver-is-distributed.test').  This is related to the
 +  # automake bug#9546.  Note that the use of $config_aux_dir instead
 +  # of $am_config_aux_dir here is deliberate and necessary.
 +  elsif ($dir eq $config_aux_dir)
 +    {
 +      push_dist_common ("$am_config_aux_dir/$file");
 +    }
 +  # FIXME: another spacial case, for AC_LIBOBJ/AC_LIBSOURCE support.
 +  # We probably need some refactoring of this function and its callers,
 +  # to have a more explicit and systematic handling of all the special
 +  # cases; but, since there are only two of them, this is low-priority
 +  # ATM.
 +  elsif ($config_libobj_dir && $dir eq $config_libobj_dir)
 +    {
 +      # Avoid unsightly '/.'s.
 +      my $am_config_libobj_dir =
 +        '$(top_srcdir)' .
 +        ($config_libobj_dir eq '.' ? "" : "/$config_libobj_dir");
 +      $am_config_libobj_dir =~ s|/*$||;
 +      push_dist_common ("$am_config_libobj_dir/$file");
      }
    elsif ($relative_dir eq '.' && ! &is_make_dir ($dir))
      {
        # here.
  
        # If a required file is above the source tree, it is important
 -      # to prefix it with `$(srcdir)' so that no VPATH search is
 +      # to prefix it with '$(srcdir)' so that no VPATH search is
        # performed.  Otherwise problems occur with Make implementations
        # that rewrite and simplify rules whose dependencies are found in a
        # VPATH location.  Here is an example with OSF1/Tru64 Make.
        #   echo a
        #   a
        #
 -      # Dependency `../a' was found in `sub/../a', but this make
 -      # implementation simplified it as `a'.  (Note that the sub/
 +      # Dependency '../a' was found in 'sub/../a', but this make
 +      # implementation simplified it as 'a'.  (Note that the sub/
        # directory does not even exist.)
        #
        # This kind of VPATH rewriting seems hard to cancel.  The
        if $dir =~ m,^\.\.(?:$|/),;
  
        push_dist_common ($fullfile);
 -      return 1;
      }
 -  return 0;
 +  else
 +    {
 +      prog_error "a Makefile in relative directory $relative_dir " .
 +                 "can't add files in directory $dir to DIST_COMMON";
 +    }
  }
  
  
  # than once.
  my %required_file_not_found = ();
  
 -# &require_file_internal ($WHERE, $MYSTRICT, $DIRECTORY, @FILES)
 -# --------------------------------------------------------------
 +# &required_file_check_or_copy ($WHERE, $DIRECTORY, $FILE)
 +# --------------------------------------------------------
  # Verify that the file must exist in $DIRECTORY, or install it.
 -# $MYSTRICT is the strictness level at which this file becomes required.
 -sub require_file_internal ($$$@)
 +sub required_file_check_or_copy ($$$)
  {
 -  my ($where, $mystrict, $dir, @files) = @_;
 +  my ($where, $dir, $file) = @_;
  
 -  foreach my $file (@files)
 +  my $fullfile = "$dir/$file";
 +  my $found_it = 0;
 +  my $dangling_sym = 0;
 +
 +  if (-l $fullfile && ! -f $fullfile)
 +    {
 +      $dangling_sym = 1;
 +    }
 +  elsif (dir_has_case_matching_file ($dir, $file))
      {
 -      my $fullfile = "$dir/$file";
 -      my $found_it = 0;
 -      my $dangling_sym = 0;
 +      $found_it = 1;
 +    }
  
 -      if (-l $fullfile && ! -f $fullfile)
 -      {
 -        $dangling_sym = 1;
 -      }
 -      elsif (dir_has_case_matching_file ($dir, $file))
 -      {
 -        $found_it = 1;
 -        maybe_push_required_file ($dir, $file, $fullfile);
 -      }
 +  # '--force-missing' only has an effect if '--add-missing' is
 +  # specified.
 +  return
 +    if $found_it && (! $add_missing || ! $force_missing);
  
 -      # `--force-missing' only has an effect if `--add-missing' is
 -      # specified.
 -      if ($found_it && (! $add_missing || ! $force_missing))
 -      {
 -        next;
 -      }
 -      else
 -      {
 -        # If we've already looked for it, we're done.  You might
 -        # wonder why we don't do this before searching for the
 -        # file.  If we do that, then something like
 -        # AC_OUTPUT(subdir/foo foo) will fail to put foo.in into
 -        # DIST_COMMON.
 -        if (! $found_it)
 -          {
 -            next if defined $required_file_not_found{$fullfile};
 -            $required_file_not_found{$fullfile} = 1;
 -          }
 +  # If we've already looked for it, we're done.  You might
 +  # wonder why we don't do this before searching for the
 +  # file.  If we do that, then something like
 +  # AC_OUTPUT(subdir/foo foo) will fail to put foo.in into
 +  # DIST_COMMON.
 +  if (! $found_it)
 +    {
 +      return if defined $required_file_not_found{$fullfile};
 +      $required_file_not_found{$fullfile} = 1;
 +    }
 +  if ($dangling_sym && $add_missing)
 +    {
 +      unlink ($fullfile);
 +    }
  
 -        if ($strictness >= $mystrict)
 -          {
 -            if ($dangling_sym && $add_missing)
 -              {
 -                unlink ($fullfile);
 -              }
 +  my $trailer = '';
 +  my $trailer2 = '';
 +  my $suppress = 0;
  
 -            my $trailer = '';
 -            my $trailer2 = '';
 -            my $suppress = 0;
 +  # Only install missing files according to our desired
 +  # strictness level.
 +  my $message = "required file '$fullfile' not found";
 +  if ($add_missing)
 +    {
 +      if (-f "$libdir/$file")
 +        {
 +          $suppress = 1;
  
 -            # Only install missing files according to our desired
 -            # strictness level.
 -            my $message = "required file `$fullfile' not found";
 -            if ($add_missing)
 -              {
 -                if (-f "$libdir/$file")
 -                  {
 -                    $suppress = 1;
 -
 -                    # Install the missing file.  Symlink if we
 -                    # can, copy if we must.  Note: delete the file
 -                    # first, in case it is a dangling symlink.
 -                    $message = "installing `$fullfile'";
 -
 -                    # The license file should not be volatile.
 -                    if ($file eq "COPYING")
 -                      {
 -                        $message .= " using GNU General Public License v3 file";
 -                        $trailer2 = "\n    Consider adding the COPYING file"
 -                                  . " to the version control system"
 -                                  . "\n    for your code, to avoid questions"
 -                                  . " about which license your project uses.";
 -                      }
 +          # Install the missing file.  Symlink if we
 +          # can, copy if we must.  Note: delete the file
 +          # first, in case it is a dangling symlink.
 +          $message = "installing '$fullfile'";
  
 -                    # Windows Perl will hang if we try to delete a
 -                    # file that doesn't exist.
 -                    unlink ($fullfile) if -f $fullfile;
 -                    if ($symlink_exists && ! $copy_missing)
 -                      {
 -                        if (! symlink ("$libdir/$file", $fullfile)
 -                            || ! -e $fullfile)
 -                          {
 -                            $suppress = 0;
 -                            $trailer = "; error while making link: $!";
 -                          }
 -                      }
 -                    elsif (system ('cp', "$libdir/$file", $fullfile))
 -                      {
 -                        $suppress = 0;
 -                        $trailer = "\n    error while copying";
 -                      }
 -                    set_dir_cache_file ($dir, $file);
 -                  }
 +          # The license file should not be volatile.
 +          if ($file eq "COPYING")
 +            {
 +              $message .= " using GNU General Public License v3 file";
 +              $trailer2 = "\n    Consider adding the COPYING file"
 +                        . " to the version control system"
 +                        . "\n    for your code, to avoid questions"
 +                        . " about which license your project uses";
 +            }
  
 -                if (! maybe_push_required_file (dirname ($fullfile),
 -                                                $file, $fullfile))
 -                  {
 -                    if (! $found_it && ! $automake_will_process_aux_dir)
 -                      {
 -                        # We have added the file but could not push it
 -                        # into DIST_COMMON, probably because this is
 -                        # an auxiliary file and we are not processing
 -                        # the top level Makefile.  Furthermore Automake
 -                        # hasn't been asked to create the Makefile.in
 -                        # that distributes the aux dir files.
 -                        error ($where, 'Please make a full run of automake'
 -                               . " so $fullfile gets distributed.");
 -                      }
 -                  }
 -              }
 -            else
 -              {
 -                $trailer = "\n  `automake --add-missing' can install `$file'"
 -                  if -f "$libdir/$file";
 -              }
 +          # Windows Perl will hang if we try to delete a
 +          # file that doesn't exist.
 +          unlink ($fullfile) if -f $fullfile;
 +          if ($symlink_exists && ! $copy_missing)
 +            {
 +              if (! symlink ("$libdir/$file", $fullfile)
 +                  || ! -e $fullfile)
 +                {
 +                  $suppress = 0;
 +                  $trailer = "; error while making link: $!";
 +                }
 +            }
 +          elsif (system ('cp', "$libdir/$file", $fullfile))
 +            {
 +              $suppress = 0;
 +              $trailer = "\n    error while copying";
 +            }
 +          set_dir_cache_file ($dir, $file);
 +        }
 +    }
 +  else
 +    {
 +      $trailer = "\n  'automake --add-missing' can install '$file'"
 +        if -f "$libdir/$file";
 +    }
  
 -            # If --force-missing was specified, and we have
 -            # actually found the file, then do nothing.
 -            next
 -              if $found_it && $force_missing;
 +  # If --force-missing was specified, and we have
 +  # actually found the file, then do nothing.
 +  return
 +    if $found_it && $force_missing;
  
 -            # If we couldn't install the file, but it is a target in
 -            # the Makefile, don't print anything.  This allows files
 -            # like README, AUTHORS, or THANKS to be generated.
 -            next
 -              if !$suppress && rule $file;
 +  # If we couldn't install the file, but it is a target in
 +  # the Makefile, don't print anything.  This allows files
 +  # like README, AUTHORS, or THANKS to be generated.
 +  return
 +    if !$suppress && rule $file;
  
 -            msg ($suppress ? 'note' : 'error', $where, "$message$trailer$trailer2");
 -          }
 -      }
 +  msg ($suppress ? 'note' : 'error', $where, "$message$trailer$trailer2");
 +}
 +
 +
 +# &require_file_internal ($WHERE, $MYSTRICT, $DIRECTORY, $QUEUE, @FILES)
 +# ----------------------------------------------------------------------
 +# Verify that the file must exist in $DIRECTORY, or install it.
 +# $MYSTRICT is the strictness level at which this file becomes required.
 +# Worker threads may queue up the action to be serialized by the master,
 +# if $QUEUE is true
 +sub require_file_internal ($$$@)
 +{
 +  my ($where, $mystrict, $dir, $queue, @files) = @_;
 +
 +  return
 +    unless $strictness >= $mystrict;
 +
 +  foreach my $file (@files)
 +    {
 +      push_required_file ($dir, $file, "$dir/$file");
 +      if ($queue)
 +        {
 +          queue_required_file_check_or_copy ($required_conf_file_queue,
 +                                             QUEUE_CONF_FILE, $relative_dir,
 +                                             $where, $mystrict, @files);
 +        }
 +      else
 +        {
 +          required_file_check_or_copy ($where, $dir, $file);
 +        }
      }
  }
  
  sub require_file ($$@)
  {
      my ($where, $mystrict, @files) = @_;
 -    require_file_internal ($where, $mystrict, $relative_dir, @files);
 +    require_file_internal ($where, $mystrict, $relative_dir, 0, @files);
  }
  
  # &require_file_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
@@@ -7849,7 -8004,7 +7848,7 @@@ sub require_libsource_with_macro ($$$@
      if ($config_libobj_dir)
        {
        require_file_internal ($macro->rdef ($cond)->location, $mystrict,
 -                             $config_libobj_dir, @files);
 +                             $config_libobj_dir, 0, @files);
        }
      else
        {
        }
  }
  
 -# Queue to push require_conf_file requirements to.
 -my $required_conf_file_queue;
 -
 -# &queue_required_conf_file ($QUEUE, $KEY, $DIR, $WHERE, $MYSTRICT, @FILES)
 -# -------------------------------------------------------------------------
 -sub queue_required_conf_file ($$$$@)
 +# &queue_required_file_check_or_copy ($QUEUE, $KEY, $DIR, $WHERE,
 +#                                     $MYSTRICT, @FILES)
 +# ---------------------------------------------------------------
 +sub queue_required_file_check_or_copy ($$$$@)
  {
      my ($queue, $key, $dir, $where, $mystrict, @files) = @_;
      my @serial_loc;
      $queue->enqueue ($key, $dir, @serial_loc, $mystrict, 0 + @files, @files);
  }
  
 -# &require_queued_conf_file ($QUEUE)
 -# ----------------------------------
 -sub require_queued_conf_file ($)
 +# &require_queued_file_check_or_copy ($QUEUE)
 +# -------------------------------------------
 +sub require_queued_file_check_or_copy ($)
  {
      my ($queue) = @_;
      my $where;
      my @files;
      push @files, $queue->dequeue ()
        foreach (1 .. $nfiles);
 -
 -    # Dequeuing happens outside of per-makefile context, so we have to
 -    # set the variables used by require_file_internal and the functions
 -    # it calls.  Gross!
 -    $relative_dir = $dir;
 -    require_file_internal ($where, $mystrict, $config_aux_dir, @files);
 +    return
 +      unless $strictness >= $mystrict;
 +    foreach my $file (@files)
 +      {
 +        required_file_check_or_copy ($where, $config_aux_dir, $file);
 +      }
  }
  
  # &require_conf_file ($WHERE, $MYSTRICT, @FILES)
  # ----------------------------------------------
 -# Looks in configuration path, as specified by AC_CONFIG_AUX_DIR;
 -# worker threads may queue up the action to be serialized by the master.
 -#
 -# FIXME: this seriously relies on the semantics of require_file_internal
 -# and maybe_push_required_file, in that we exploit the fact that only the
 -# contents of the last handled output file may be impacted (which in turn
 -# is dealt with by the master thread).
 +# Looks in configuration path, as specified by AC_CONFIG_AUX_DIR.
  sub require_conf_file ($$@)
  {
      my ($where, $mystrict, @files) = @_;
 -    if (defined $required_conf_file_queue)
 -      {
 -      queue_required_conf_file ($required_conf_file_queue, QUEUE_CONF_FILE,
 -                                $relative_dir, $where, $mystrict, @files);
 -      }
 -    else
 -      {
 -      require_file_internal ($where, $mystrict, $config_aux_dir, @files);
 -      }
 +    my $queue = defined $required_conf_file_queue ? 1 : 0;
 +    require_file_internal ($where, $mystrict, $config_aux_dir,
 +                           $queue, @files);
  }
  
  
@@@ -7937,7 -8106,7 +7936,7 @@@ sub require_conf_file_with_macro ($$$@
  # the file that any target requiring this directory should be made
  # dependent upon.
  # We don't want to emit the rule twice, and want to reuse it
 -# for directories with equivalent names (e.g., `foo/bar' and `./foo//bar').
 +# for directories with equivalent names (e.g., 'foo/bar' and './foo//bar').
  sub require_build_directory ($)
  {
    my $directory = shift;
    define_pretty_variable ('am__dirstamp', TRUE, INTERNAL,
                          '$(am__leading_dot)dirstamp');
  
 -  # Directory must be removed by `make distclean'.
 +  # Directory must be removed by 'make distclean'.
    $clean_files{$dirstamp} = DIST_CLEAN;
  
    $output_rules .= ("$dirstamp:\n"
@@@ -8058,14 -8227,14 +8057,14 @@@ sub generate_makefile ($$
          my $def = $v->def (TRUE);
          prog_error "$var not defined in condition TRUE"
            unless $def;
 -        reject_var $var, "`$var' should not be defined"
 +        reject_var $var, "'$var' should not be defined"
            if $def->owner != VAR_AUTOMAKE;
        }
      }
  
    # Catch some obsolete variables.
    msg_var ('obsolete', 'INCLUDES',
 -         "`INCLUDES' is the old name for `AM_CPPFLAGS' (or `*_CPPFLAGS')")
 +         "'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')")
      if var ('INCLUDES');
  
    # Must do this after reading .am file.
        define_pretty_variable ('DIST_SOURCES', TRUE, INTERNAL, @dist_sources);
      }
  
 -  handle_multilib;
    handle_texinfo;
    handle_emacs_lisp;
    handle_python;
  
    check_typos;
  
 -  my ($out_file) = $output_directory . '/' . $makefile_in;
 -
    if ($exit_code != 0)
      {
 -      verb "not writing $out_file because of earlier errors";
 +      verb "not writing $makefile_in because of earlier errors";
        return;
      }
  
 -  if (! -d ($output_directory . '/' . $am_relative_dir))
 -    {
 -      mkdir ($output_directory . '/' . $am_relative_dir, 0755);
 -    }
 +  mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
  
 -  # We make sure that `all:' is the first target.
 +  # We make sure that 'all:' is the first target.
    my $output =
      "$output_vars$output_all$output_header$output_rules$output_trailer";
  
    #  * other dependencies, specific to the Makefile.am being processed
    #    (such as the Makefile.am itself, or any Makefile fragment
    #    it includes).
 -  my $timestamp = mtime $out_file;
 +  my $timestamp = mtime $makefile_in;
    if (! $force_generation
        && $configure_deps_greatest_timestamp < $timestamp
        && $output_deps_greatest_timestamp < $timestamp
 -      && $output eq contents ($out_file))
 +      && $output eq contents ($makefile_in))
      {
 -      verb "$out_file unchanged";
 +      verb "$makefile_in unchanged";
        # No need to update.
        return;
      }
  
 -  if (-e $out_file)
 +  if (-e $makefile_in)
      {
 -      unlink ($out_file)
 -      or fatal "cannot remove $out_file: $!\n";
 +      unlink ($makefile_in)
 +      or fatal "cannot remove $makefile_in: $!";
      }
  
 -  my $gm_file = new Automake::XFile "> $out_file";
 -  verb "creating $out_file";
 +  my $gm_file = new Automake::XFile "> $makefile_in";
 +  verb "creating $makefile_in";
    print $gm_file $output;
  }
  
@@@ -8243,7 -8418,7 +8242,7 @@@ sub print_autodist_files (@
  # Print usage information.
  sub usage ()
  {
 -    print "Usage: $0 [OPTION] ... [Makefile]...
 +    print "Usage: $0 [OPTION]... [Makefile]...
  
  Generate Makefile.in for configure from Makefile.am.
  
@@@ -8266,8 -8441,7 +8265,8 @@@ Flavors
  
  Library files:
    -a, --add-missing      add missing standard files to package
 -      --libdir=DIR       directory storing library files
 +      --libdir=DIR       set directory storing library files
 +      --print-libdir     print directory storing library files
    -c, --copy             with -a, copy missing files (default is symlink)
    -f, --force-missing    force update of standard files
  
  # Parse command line.
  sub parse_arguments ()
  {
 -  # Start off as gnu.
 -  set_strictness ('gnu');
 +  my $strict = 'gnu';
 +  my $cygnus = 0;
 +  my $ignore_deps = 0;
 +  my @warnings = ();
  
 -  my $cli_where = new Automake::Location;
    my %cli_options =
      (
       'version' => \&version,
       'help'    => \&usage,
       'libdir=s'       => \$libdir,
 -     'gnu'            => sub { set_strictness ('gnu'); },
 -     'gnits'          => sub { set_strictness ('gnits'); },
 -     'cygnus'         => sub { set_global_option ('cygnus', $cli_where); },
 -     'foreign'          => sub { set_strictness ('foreign'); },
 -     'include-deps'   => sub { unset_global_option ('no-dependencies'); },
 -     'i|ignore-deps'  => sub { set_global_option ('no-dependencies',
 -                                                  $cli_where); },
 +     'print-libdir'     => sub { print "$libdir\n"; exit 0; },
 +     '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; },
       'f|force-missing'  => \$force_missing,
 -     'o|output-dir=s' => \$output_directory,
       'a|add-missing'  => \$add_missing,
       'c|copy'         => \$copy_missing,
       'v|verbose'      => sub { setup_channel 'verb', silent => 0; },
 -     'W|warnings=s'     => \&parse_warnings,
 -     # These long options (--Werror and --Wno-error) for backward
 -     # compatibility.  Use -Werror and -Wno-error today.
 -     'Werror'           => sub { parse_warnings 'W', 'error'; },
 -     'Wno-error'        => sub { parse_warnings 'W', 'no-error'; },
 +     'W|warnings=s'     => \@warnings,
       );
  
    use Automake::Getopt ();
    Automake::Getopt::parse_options %cli_options;
  
 -  if (defined $output_directory)
 -    {
 -      msg 'obsolete', "`--output-dir' is deprecated\n";
 -    }
 -  else
 +  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)
      {
 -      # In the next release we'll remove this entirely.
 -      $output_directory = '.';
 +      &parse_warnings ('-W', $warning);
      }
  
    return unless @ARGV;
    my $errspec = 0;
    foreach my $arg (@ARGV)
      {
 -      fatal ("empty argument\nTry `$0 --help' for more information.")
 +      fatal ("empty argument\nTry '$0 --help' for more information")
        if ($arg eq '');
  
        # Handle $local:$input syntax.
        }
        else
        {
 -        error "no Automake input file found for `$arg'";
 +        error "no Automake input file found for '$arg'";
          $errspec = 1;
        }
      }
@@@ -8390,7 -8569,7 +8389,7 @@@ sub handle_makefile ($
    ($am_file = $file) =~ s/\.in$//;
    if (! -f ($am_file . '.am'))
      {
 -      error "`$am_file.am' does not exist";
 +      error "'$am_file.am' does not exist";
      }
    else
      {
@@@ -8428,6 -8607,11 +8427,6 @@@ sub get_number_of_thread
    # It doesn't make sense to use more threads than makefiles,
    my $max_threads = @input_files;
  
 -  # but a single worker thread is helpful for exposing bugs.
 -  if ($automake_will_process_aux_dir && $max_threads > 1)
 -    {
 -      $max_threads--;
 -    }
    if ($nthreads > $max_threads)
      {
        $nthreads = $max_threads;
@@@ -8451,11 -8635,18 +8450,11 @@@ sub handle_makefiles_threaded ($
  {
    my ($nthreads) = @_;
  
 -  my @queued_input_files = @input_files;
 -  my $last_input_file = undef;
 -  if ($automake_will_process_aux_dir)
 -    {
 -      $last_input_file = pop @queued_input_files;
 -    }
 -
    # The file queue distributes all makefiles, the message queues
    # collect all serializations needed for respective files.
    my $file_queue = Thread::Queue->new;
    my %msg_queues;
 -  foreach my $file (@queued_input_files)
 +  foreach my $file (@input_files)
      {
        $msg_queues{$file} = Thread::Queue->new;
      }
        });
      }
  
 -  # Queue all normal makefiles.
 -  verb "queuing " . @queued_input_files . " input files";
 -  $file_queue->enqueue (@queued_input_files, (undef) x @threads);
 +  # Queue all makefiles.
 +  verb "queuing " . @input_files . " input files";
 +  $file_queue->enqueue (@input_files, (undef) x @threads);
  
    # Collect and process serializations.
 -  foreach my $file (@queued_input_files)
 +  foreach my $file (@input_files)
      {
        verb "dequeuing messages for " . $file;
        reset_local_duplicates ();
            }
          elsif ($key eq QUEUE_CONF_FILE)
            {
 -            require_queued_conf_file ($queue);
 +            require_queued_file_check_or_copy ($queue);
            }
          else
            {
        $exit_code = $exit_thread[0]
        if ($exit_thread[0] > $exit_code);
      }
 -
 -  # The master processes the last file.
 -  if ($automake_will_process_aux_dir)
 -    {
 -      verb "processing last input file";
 -      handle_makefile ($last_input_file);
 -    }
  }
  
  ################################################################
@@@ -8534,7 -8732,7 +8533,7 @@@ if (! @input_files
      my $msg = '';
      $msg = "\nDid you forget AC_CONFIG_FILES([Makefile]) in $configure_ac?"
        if -f 'Makefile.am';
 -    fatal ("no `Makefile.am' found for any configure output$msg");
 +    fatal ("no 'Makefile.am' found for any configure output$msg");
    }
  
  my $nthreads = get_number_of_threads ();
diff --combined tests/list-of-tests.mk
@@@ -2,7 -2,7 +2,7 @@@
  ## testsuite.  This fragment is meant to be included by the Makefile.am,
  ## but also to be executed directly by make when bootstrapping automake.
  
 -## Copyright (C) 20112012 Free Software Foundation, Inc.
 +## Copyright (C) 2011-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
  ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  perl_TESTS = \
 +pm/Cond2.pl \
 +pm/Cond3.pl \
  pm/Condition.pl \
  pm/Condition-t.pl \
 +pm/DisjCon2.pl \
 +pm/DisjCon3.pl \
  pm/DisjConditions.pl \
  pm/DisjConditions-t.pl \
  pm/Version.pl \
 +pm/Version2.pl \
 +pm/Version3.pl \
  pm/Wrap.pl
  
  # The order here is mostly alphabetical, with the deliberate exception
@@@ -38,7 -32,9 +38,7 @@@
  handwritten_TESTS = \
  get-sysconf.test \
  $(perl_TESTS) \
 -self-check-env-sanitize.test \
 -self-check-report.test \
 -aclibobj.test \
 +instspc.tap \
  aclocal.test \
  aclocal3.test \
  aclocal4.test \
@@@ -60,7 -56,6 +60,7 @@@ acloca19.test 
  acloca20.test \
  acloca21.test \
  acloca22.test \
 +acloca23.test \
  aclocal-acdir.test \
  aclocal-install-absdir.test \
  aclocal-print-acdir.test \
@@@ -69,11 -64,15 +69,11 @@@ aclocal-path-install.test 
  aclocal-path-install-serial.test \
  aclocal-path-nonexistent.test \
  aclocal-path-precedence.test \
 -acoutnoq.test \
 -acoutpt.test \
 -acoutpt2.test \
 -acoutqnl.test \
 -acoutbs.test \
 -acoutbs2.test \
 +ac-output-old.tap \
  acsilent.test \
  acsubst.test \
  acsubst2.test \
 +add-missing.tap \
  all.test \
  all2.test \
  alloca.test \
@@@ -86,24 -85,21 +86,24 @@@ amhello-binpkg.test 
  amassign.test \
  ammissing.test \
  amopt.test \
 +amopts-location.test \
 +amopts-variable-expansion.test \
  amsubst.test \
 -ansi2knr-deprecation.test \
 -ansi.test \
 -ansi2.test \
 -ansi3.test \
 -ansi3b.test \
 -ansi4.test \
 -ansi5.test \
 -ansi6.test \
 -ansi7.test \
 -ansi8.test \
 -ansi9.test \
 -ansi10.test \
 +ansi2knr-no-more.test \
 +ar-lib.test \
 +ar-lib2.test \
 +ar-lib3.test \
 +ar-lib4.test \
 +ar-lib5a.test \
 +ar-lib5b.test \
 +ar-lib6a.test \
 +ar-lib6b.test \
 +ar-lib7.test \
  ar.test \
  ar2.test \
 +ar3.test \
 +ar4.test \
 +ar5.test \
  asm.test \
  asm2.test \
  asm3.test \
@@@ -121,22 -117,11 +121,22 @@@ autohdr2.test 
  autohdr3.test \
  autohdr4.test \
  autohdrdry.test \
 -automake.test \
 +automake-cmdline.tap \
  auxdir.test \
 -auxdir2.test \
 -auxdir3.test \
 -auxdir4.test \
 +auxdir6.test \
 +auxdir7.test \
 +auxdir8.test \
 +auxdir-autodetect.test \
 +auxdir-computed.tap \
 +auxdir-misplaced.test \
 +auxdir-nonexistent.test \
 +auxdir-unportable.tap \
 +backcompat.test \
 +backcompat2.test \
 +backcompat3.test \
 +backcompat4.test \
 +backcompat5.test \
 +backcompat6.test \
  backsl.test \
  backsl2.test \
  backsl3.test \
@@@ -146,15 -131,11 +146,15 @@@ badopt.test 
  badprog.test \
  block.test \
  bsource.test \
 +candist.test \
  canon.test \
  canon2.test \
  canon3.test \
  canon4.test \
  canon5.test \
 +canon6.test \
 +canon7.test \
 +canon8.test \
  canon-name.test \
  ccnoco.test \
  ccnoco2.test \
@@@ -167,22 -148,20 +167,22 @@@ check5.test 
  check6.test \
  check7.test \
  check8.test \
 -check9.test \
  check10.test \
  check11.test \
  check12.test \
 +check-subst.test \
 +check-subst-prog.test \
  check-exported-srcdir.test \
 +check-fd-redirect.test \
  check-tests-in-builddir.test \
 -check-tests_environment.test \
 +check-no-test-driver.test \
  check-concurrency-bug9245.test \
 -tests-environment-backcompat.test \
  checkall.test \
  clean.test \
  clean2.test \
  colneq.test \
  colneq2.test \
 +colneq3.test \
  colon.test \
  colon2.test \
  colon3.test \
@@@ -206,13 -185,8 +206,13 @@@ commen11.test 
  comments-in-var-def.test \
  compile.test \
  compile2.test \
 +compile3.test \
 +compile4.test \
 +compile5.test \
 +compile6.test \
  compile_f90_c_cxx.test \
  compile_f_c_cxx.test \
 +cond-basic.test \
  cond.test \
  cond2.test \
  cond3.test \
@@@ -257,13 -231,13 +257,13 @@@ cond42.test 
  cond43.test \
  cond44.test \
  cond45.test \
 +cond46.test \
  condd.test \
  condhook.test \
  condhook2.test \
  condinc.test \
  condinc2.test \
  condlib.test \
 -condman.test \
  condman2.test \
  condman3.test \
  configure.test \
@@@ -286,22 -260,15 +286,22 @@@ confsub.test 
  confvar.test \
  confvar2.test \
  copy.test \
 -ctarget1.test \
 +cscope.tap \
 +cscope2.test \
 +cscope3.test \
  cxx.test \
  cxx2.test \
 -cxxansi.test \
  cxxcpp.test \
  cxxlibobj.test \
  cxxlink.test \
  cxxnoc.test \
  cxxo.test \
 +cygnus-check-without-all.test \
 +cygnus-dependency-tracking.test \
 +cygnus-imply-foreign.test \
 +cygnus-no-dist.test \
 +cygnus-no-installinfo.test \
 +cygnus-requires-maintainer-mode.test \
  cygwin32.test \
  dash.test \
  defun.test \
@@@ -323,38 -290,40 +323,38 @@@ deleted-m4.test 
  depacl2.test \
  depcomp.test \
  depcomp2.test \
 -depcomp3.test \
 -depcomp4.test \
 -depcomp5.test \
 -depcomp6.test \
 -depcomp7.test \
  depcomp8a.test \
  depcomp8b.test \
 -depcomp9.test \
 -depcomp10.test \
  depdist.test \
  depend.test \
 -depend2.test \
  depend3.test \
  depend4.test \
  depend5.test \
  depend6.test \
 +deprecated-acinit.test \
  destdir.test \
  dirlist.test \
  dirlist2.test \
 +dirlist-abspath.test \
  discover.test \
 -dist-auxfile.test \
 +dist-formats.tap \
 +dist-auxdir-many-subdirs.test \
  dist-auxfile-2.test \
 +dist-auxfile.test \
  dist-included-parent-dir.test \
  dist-missing-am.test \
  dist-missing-included-m4.test \
  dist-missing-m4.test \
 +dist-readonly.test \
 +dist-repeated.test \
  distcleancheck.test \
  distcom2.test \
  distcom3.test \
  distcom4.test \
  distcom5.test \
 -distcom6.test \
 -distcom7.test \
 +distcom-subdir.test \
  distdir.test \
 +disthook.test \
  distlinks.test \
  distlinksbrk.test \
  distname.test \
@@@ -363,12 -332,11 +363,12 @@@ distcheck-configure-flags-am.test 
  distcheck-configure-flags-subpkg.test \
  distcheck-hook.test \
  distcheck-hook2.test \
 +distcheck-writable-srcdir.test \
  distcheck-missing-m4.test \
  distcheck-outdated-m4.test \
 +distcheck-override-infodir.test \
  distcheck-pr9579.test \
  distcheck-pr10470.test \
 -distcheck-override-infodir.test \
  dmalloc.test \
  doc-parsing-buglets-colneq-subst.test \
  doc-parsing-buglets-tabs.test \
@@@ -392,7 -360,6 +392,7 @@@ exeext4.test 
  exsource.test \
  ext.test \
  ext2.test \
 +ext3.test \
  extra.test \
  extra2.test \
  extra3.test \
@@@ -401,14 -368,9 +401,14 @@@ extra5.test 
  extra6.test \
  extra7.test \
  extra8.test \
 +extra9.test \
  extra10.test \
  extra11.test \
  extra12.test \
 +extra-programs-empty.test \
 +extra-portability.test \
 +extra-portability2.test \
 +extra-portability3.test \
  extradep.test \
  extradep2.test \
  f90only.test \
@@@ -454,9 -416,11 +454,9 @@@ help-init.test 
  help-lispdir.test \
  help-multilib.test \
  help-python.test \
 -help-regex.test \
  help-silent.test \
  help-upc.test \
  hfs.test \
 -hosts.test \
  implicit.test \
  info.test \
  init.test \
@@@ -464,6 -428,7 +464,6 @@@ init2.test 
  insh2.test \
  install2.test \
  installdir.test \
 -install-info-dir.test \
  instsh.test \
  instsh2.test \
  instsh3.test \
@@@ -488,75 -453,45 +488,75 @@@ instman2.test 
  instmany.test \
  instmany-mans.test \
  instmany-python.test \
 -instspc.test \
 +install-info-dir.test \
  interp.test \
  interp2.test \
  java.test \
  java2.test \
  java3.test \
 +javadir-undefined.test \
 +javaflags.test \
  java-check.test \
 +java-clean.test \
 +java-compile-install.test \
 +java-compile-run-flat.test \
 +java-compile-run-nested.test \
  java-empty-classpath.test \
 -javadir-undefined.test \
  javaprim.test \
  javasubst.test \
 -java-clean.test \
 +java-extra.test \
 +java-mix.test \
 +java-no-duplicate.test \
  java-nobase.test \
 -java-compile-install.test \
 +java-noinst.test \
 +java-rebuild.test \
  java-sources.test \
 -java-no-duplicate.test \
 -java-mix.test \
 +java-uninstall.test \
  ldadd.test \
  ldflags.test \
  lex.test \
  lex2.test \
  lex3.test \
 -lex4.test \
  lex5.test \
 +lexcpp.test \
 +lexvpath.test \
  lex-subobj-nodep.test \
 +lex-lib.test \
 +lex-lib-external.test \
 +lex-libobj.test \
 +lex-noyywrap.test \
 +lex-clean-cxx.test \
 +lex-clean.test \
 +lex-depend-cxx.test \
 +lex-depend-grep.test \
 +lex-depend.test \
 +lex-line.test \
 +lex-nodist.test \
 +lex-pr204.test \
  lflags.test \
  lflags2.test \
  libexec.test \
 +libobj-basic.test \
  libobj2.test \
  libobj3.test \
  libobj4.test \
  libobj5.test \
  libobj7.test \
 -libobj8.test \
  libobj10.test \
 -libobj11.test \
  libobj12.test \
  libobj13.test \
  libobj14.test \
 +libobj15a.test \
 +libobj15b.test \
 +libobj15c.test \
 +libobj16a.test \
 +libobj16b.test \
 +libobj17.test \
 +libobj18.test \
 +libobj19.test \
 +libobj20a.test \
 +libobj20b.test \
 +libobj20c.test \
  library.test \
  library2.test \
  library3.test \
@@@ -580,7 -515,6 +580,7 @@@ link_fc.test 
  link_fccxx.test \
  link_fcxx.test \
  link_f_only.test \
 +link_override.test \
  lisp2.test \
  lisp3.test \
  lisp4.test \
@@@ -602,6 -536,7 +602,6 @@@ ltinstloc.test 
  ltlibobjs.test \
  ltlibsrc.test \
  ltorder.test \
 -lzip.test \
  lzma.test \
  m4-inclusion.test \
  maintclean.test \
@@@ -613,16 -548,13 +613,16 @@@ makej.test 
  makej2.test \
  maken.test \
  maken3.test \
 -make-dryrun.test \
 +make-dryrun.tap \
  makevars.test \
  man.test \
  man2.test \
  man3.test \
  man4.test \
  man5.test \
 +man6.test \
 +man7.test \
 +man8.test \
  mdate.test \
  mdate2.test \
  mdate3.test \
@@@ -635,15 -567,12 +635,15 @@@ missing3.test 
  missing4.test \
  missing5.test \
  missing6.test \
 +missing-auxfile-stops-makefiles-creation.test \
  mkinstall.test \
  mkinst2.test \
  mkinst3.test \
  mmode.test \
  mmodely.test \
  multlib.test \
 +no-extra-makefile-code.test \
 +no-outdir-option.test \
  nobase.test \
  nobase-libtool.test \
  nobase-python.test \
@@@ -656,6 -585,8 +656,6 @@@ nodepcomp.test 
  nodist.test \
  nodist2.test \
  nodist3.test \
 -nogzip.test \
 -nogzip2.test \
  noinst.test \
  noinstdir.test \
  nolink.test \
@@@ -666,8 -597,8 +666,8 @@@ objc.test 
  objc2.test \
  objext-pr10128.test \
  obsolete.test \
 +oldvars.test \
  order.test \
 -outdir.test \
  output.test \
  output2.test \
  output3.test \
@@@ -682,84 -613,28 +682,84 @@@ output11.test 
  output12.test \
  output13.test \
  output-order.test \
 -overrid.test \
 +override-conditional-1.test \
 +override-conditional-2.test \
 +override-html.test \
 +override-suggest-local.test \
  parallel-am.test \
  parallel-am2.test \
  parallel-am3.test \
 +serial-tests.test \
  parallel-tests.test \
  parallel-tests2.test \
  parallel-tests3.test \
 -parallel-tests4.test \
  parallel-tests5.test \
  parallel-tests6.test \
 -parallel-tests7.test \
  parallel-tests8.test \
  parallel-tests9.test \
  parallel-tests10.test \
 -parallel-tests-dryrun.test \
 -parallel-tests-harderror.test \
 -parallel-tests-unreadable-log.test \
 +parallel-tests-exeext.test \
 +parallel-tests-suffix.test \
 +parallel-tests-suffix-prog.test \
 +parallel-tests-log-compiler-1.test \
 +parallel-tests-log-compiler-2.test \
 +parallel-tests-dry-run-1.test \
 +parallel-tests-dry-run-2.test \
 +parallel-tests-fd-redirect.test \
 +parallel-tests-fd-redirect-exeext.test \
 +parallel-tests-extra-programs.test \
 +parallel-tests-unreadable.test \
  parallel-tests-subdir.test \
 +parallel-tests-interrupt.tap \
 +parallel-tests-reset-term.test \
 +parallel-tests-harderror.test \
  parallel-tests-log-override-1.test \
  parallel-tests-log-override-2.test \
  parallel-tests-log-override-recheck.test \
  parallel-tests-log-compiler-example.test \
 +parallel-tests-cmdline-override.test \
 +parallel-tests-fork-bomb.test \
 +parallel-tests-empty-testlogs.test \
 +parallel-tests-driver-install.test \
 +parallel-tests-no-color-in-log.test \
 +parallel-tests-no-spurious-summary.test \
 +parallel-tests-exit-statuses.test \
 +parallel-tests-console-output.test \
 +parallel-tests-once.test \
 +parallel-tests-trailing-bslash.test \
 +parallel-tests-many.test \
 +tests-environment.test \
 +am-tests-environment.test \
 +tests-environment-backcompat.test \
 +testsuite-summary-color.test \
 +testsuite-summary-count.test \
 +testsuite-summary-count-many.test \
 +testsuite-summary-reference-log.test \
 +test-driver-acsubst.test \
 +test-driver-cond.test \
 +test-driver-custom-no-extra-driver.test \
 +test-driver-custom.test \
 +test-driver-custom-xfail-tests.test \
 +test-driver-custom-multitest.test \
 +test-driver-custom-multitest-recheck.test \
 +test-driver-custom-multitest-recheck2.test \
 +test-driver-create-log-dir.test \
 +test-driver-strip-vpath.test \
 +test-driver-trs-suffix-registered.test \
 +test-driver-fail.test \
 +test-driver-is-distributed.test \
 +test-harness-vpath-rewrite.test \
 +test-log.test \
 +test-logs-repeated.test \
 +test-metadata-global-log.test \
 +test-metadata-global-result.test \
 +test-metadata-recheck.test \
 +test-metadata-results.test \
 +test-missing.test \
 +test-missing2.test \
 +test-trs-basic.test \
 +test-trs-recover.test \
 +test-trs-recover2.test \
  test-extensions.test \
  test-extensions-cond.test \
  parse.test \
@@@ -777,21 -652,13 +777,21 @@@ pluseq8.test 
  pluseq9.test \
  pluseq10.test \
  pluseq11.test \
 +posixsubst-data.test \
 +posixsubst-extradist.test \
 +posixsubst-ldadd.test \
 +posixsubst-libraries.test \
 +posixsubst-ltlibraries.test \
 +posixsubst-programs.test \
 +posixsubst-scripts.test \
 +posixsubst-sources.test \
 +posixsubst-tests.test \
  postproc.test \
  ppf77.test \
  pr2.test \
  pr9.test \
  pr72.test \
  pr87.test \
 -pr204.test \
  pr211.test \
  pr220.test \
  pr224.test \
@@@ -812,13 -679,11 +812,13 @@@ prefix.test 
  primary.test \
  primary2.test \
  primary3.test \
 -primary-prefix-invalid-couples.test \
 +primary-prefix-invalid-couples.tap \
  primary-prefix-valid-couples.test \
  primary-prefix-couples-force-valid.test \
  primary-prefix-couples-documented-valid.test \
 +print-libdir.test \
  proginst.test \
 +programs-primary-rewritten.test \
  py-compile-basic.test \
  py-compile-basic2.test \
  py-compile-basedir.test \
@@@ -831,7 -696,6 +831,7 @@@ python2.test 
  python3.test \
  python4.test \
  python5.test \
 +python5b.test \
  python6.test \
  python7.test \
  python8.test \
@@@ -839,74 -703,33 +839,74 @@@ python9.test 
  python10.test \
  python11.test \
  python12.test \
 +python-dist.test \
 +python-vars.test \
 +python-virtualenv.test \
  recurs.test \
  recurs2.test \
  remake.test \
 +remake1a.test \
  remake2.test \
  remake3.test \
 +remake3a.test \
  remake4.test \
  remake5.test \
  remake6.test \
  remake7.test \
 +remake8a.test \
 +remake8b.test \
 +remake9a.test \
 +remake9b.test \
 +remake9c.test \
 +remake9d.test \
 +remake10a.test \
 +remake10b.test \
 +remake10c.test \
 +remake11.test \
 +remake12.test \
 +remake-all-1.test \
 +remake-all-2.test \
  remake-subdir-from-subdir.test \
  remake-subdir-gnu.test \
  remake-subdir.test \
  remake-subdir2.test \
  remake-subdir-long-time.test \
 +remake-gnulib-add-acsubst.test \
 +remake-gnulib-add-header.test \
 +remake-gnulib-remove-header.test \
 +remake-moved-m4-file.test \
 +remake-deleted-m4-file.test \
 +remake-renamed-m4-file.test \
 +remake-renamed-m4-macro-and-file.test \
 +remake-renamed-m4-macro.test \
  remake-am-pr10111.test \
  remake-m4-pr10111.test \
 -remake-deleted-am.test \
  remake-deleted-am-2.test \
  remake-deleted-am-subdir.test \
 +remake-deleted-am.test \
  remake-renamed-am.test \
  pr8365-remake-timing.test \
 -regex.test \
 -regex-obsolete.test \
  req.test \
  reqd.test \
  reqd2.test \
 +repeated-options.test \
 +rst-formatting.test \
  rulepat.test \
 +self-check-cleanup.tap \
 +self-check-configure-help.test \
 +self-check-dir.tap \
 +self-check-env-sanitize.tap \
 +self-check-exit.tap \
 +self-check-explicit-skips.test \
 +self-check-is_newest.tap \
 +self-check-me.tap \
 +self-check-reexec.tap \
 +self-check-report.test \
 +self-check-sanity.test \
 +self-check-seq.tap \
 +self-check-is-blocked-signal.tap \
 +self-check-tap.test \
 +self-check-unindent.tap \
  sanity.test \
  scripts.test \
  seenc.test \
@@@ -916,21 -739,18 +916,21 @@@ silent3.test 
  silent4.test \
  silent6.test \
  silent7.test \
 +silent8.test \
  silent9.test \
  silentcxx.test \
 +silentcxx-gcc.test \
  silentf77.test \
  silentf90.test \
 +silent-amopts.test \
  silent-many-gcc.test \
  silent-many-generic.test \
 -silent-lex-gcc.test \
 -silent-lex-generic.test \
 -silent-nested-vars.test \
 -silent-yacc-gcc.test \
 -silent-yacc-generic.test \
 +silent-nowarn.test \
  silent-configsite.test \
 +silent-nested-vars.test \
 +silent-lex.test \
 +silent-yacc.test \
 +silent-yacc-headers.test \
  srcsub.test \
  srcsub2.test \
  space.test \
@@@ -948,13 -768,10 +948,13 @@@ spell2.test 
  spell3.test \
  spelling.test \
  spy.test \
 +spy-rm.tap \
  stdinc.test \
  stamph2.test \
  stdlib.test \
  stdlib2.test \
 +strictness-override.test \
 +strictness-precedence.test \
  strip.test \
  strip2.test \
  strip3.test \
@@@ -974,6 -791,7 +974,6 @@@ subcond2.test 
  subcond3.test \
  subobj.test \
  subobj2.test \
 -subobj3.test \
  subobj4.test \
  subobj5.test \
  subobj6.test \
@@@ -991,116 -809,29 +991,116 @@@ subpkg3.test 
  subpkg4.test \
  subpkg-yacc.test \
  subst.test \
 -subst2.test \
  subst3.test \
  subst4.test \
 +subst5.test \
 +subst-no-trailing-empty-line.test \
  substref.test \
  substre2.test \
  substtarg.test \
  suffix.test \
  suffix2.test \
 -suffix3.test \
 +suffix3.tap \
  suffix4.test \
  suffix5.test \
  suffix6.test \
 +suffix6b.test \
 +suffix6c.test \
  suffix7.test \
 -suffix8.test \
 +suffix8.tap \
  suffix9.test \
 -suffix10.test \
 -suffix11.test \
 +suffix10.tap \
 +suffix11.tap \
  suffix12.test \
  suffix13.test \
 +suffix-chain.tap \
  symlink.test \
  symlink2.test \
  syntax.test \
 +tap-ambiguous-directive.test \
 +tap-autonumber.test \
 +tap-bailout.test \
 +tap-bailout-leading-space.test \
 +tap-bailout-and-logging.test \
 +tap-bailout-suppress-badexit.test \
 +tap-bailout-suppress-later-diagnostic.test \
 +tap-bailout-suppress-later-errors.test \
 +tap-color.test \
 +tap-deps.test \
 +tap-diagnostic.test \
 +tap-empty-diagnostic.test \
 +tap-empty.test \
 +tap-escape-directive.test \
 +tap-escape-directive-2.test \
 +tap-exit.test \
 +tap-signal.tap \
 +tap-fancy.test \
 +tap-fancy2.test \
 +tap-global-log.test \
 +tap-global-result.test \
 +tap-log.test \
 +tap-msg0-result.test \
 +tap-msg0-directive.test \
 +tap-msg0-planskip.test \
 +tap-msg0-bailout.test \
 +tap-msg0-misc.test \
 +tap-merge-stdout-stderr.test \
 +tap-no-merge-stdout-stderr.test \
 +tap-no-disable-hard-error.test \
 +tap-no-spurious-summary.test \
 +tap-no-spurious-numbers.test \
 +tap-no-spurious.test \
 +tap-not-ok-skip.test \
 +tap-number-wordboundary.test \
 +tap-numeric-description.test \
 +tap-negative-numbers.test \
 +tap-numbers-leading-zero.test \
 +tap-out-of-order.test \
 +tap-passthrough.test \
 +tap-passthrough-exit.test \
 +tap-plan.test \
 +tap-plan-corner.test \
 +tap-plan-errors.test \
 +tap-plan-middle.test \
 +tap-plan-whitespace.test \
 +tap-plan-leading-zero.test \
 +tap-plan-malformed.test \
 +tap-missing-plan-and-bad-exit.test \
 +tap-planskip.test \
 +tap-planskip-late.test \
 +tap-planskip-and-logging.test \
 +tap-planskip-unplanned.test \
 +tap-planskip-unplanned-corner.test \
 +tap-planskip-case-insensitive.test \
 +tap-planskip-whitespace.test \
 +tap-planskip-badexit.test \
 +tap-planskip-bailout.test \
 +tap-planskip-later-errors.test \
 +tap-realtime.test \
 +tap-test-number-0.test \
 +tap-recheck-logs.test \
 +tap-result-comment.test \
 +tap-todo-skip-together.test \
 +tap-todo-skip-whitespace.test \
 +tap-todo-skip.test \
 +tap-unplanned.test \
 +tap-whitespace-normalization.test \
 +tap-with-and-without-number.test \
 +tap-xfail-tests.test \
 +tap-common-setup.test \
 +tap-bad-prog.tap \
 +tap-basic.test \
 +tap-diagnostic-custom.test \
 +tap-driver-stderr.test \
 +tap-doc.test \
 +tap-doc2.test \
 +tap-more.test \
 +tap-more2.test \
 +tap-recheck.test \
 +tap-summary.test \
 +tap-summary-color.test \
  tags.test \
 +tags2.test \
  tagsub.test \
  tar.test \
  tar2.test \
@@@ -1108,8 -839,6 +1108,8 @@@ tar3.test 
  tar-override.test \
  target-cflags.test \
  targetclash.test \
 +tests-environment-fd-redirect.test \
 +tests-environment-and-log-compiler.test \
  txinfo.test \
  txinfo2.test \
  txinfo3.test \
@@@ -1140,12 -869,10 +1140,12 @@@ txinfo30.test 
  txinfo31.test \
  txinfo32.test \
  txinfo33.test \
 +txinfo-unrecognized-extension.test \
  transform.test \
  transform2.test \
 -uninstall-pr9578.test \
 +transform3.test \
  uninstall-fail.test \
 +uninstall-pr9578.test \
  unused.test \
  upc.test \
  upc2.test \
@@@ -1158,11 -885,10 +1158,12 @@@ vala4.test 
  vala5.test \
  vala-vpath.test \
  vala-mix.test \
+ vala-mix2.test \
  vars.test \
  vars3.test \
  vartar.test \
 +vartypos.test \
 +vartypo2.test \
  version.test \
  version2.test \
  version3.test \
@@@ -1175,59 -901,26 +1176,59 @@@ vtexi.test 
  vtexi2.test \
  vtexi3.test \
  vtexi4.test \
 +warnings-override.test \
 +warnings-precedence.test \
 +warnings-strictness-interactions.test \
 +warnings-unknown.test \
  warnopts.test \
 +warnings-win-over-strictness.test \
 +warning-groups-win-over-strictness.test \
  werror.test \
  werror2.test \
  werror3.test \
 +werror4.test \
  whoami.test \
  xsource.test \
 -xz.test \
  yacc.test \
  yacc2.test \
 -yacc3.test \
  yacc4.test \
  yacc5.test \
 -yacc6.test \
  yacc7.test \
  yacc8.test \
  yaccdry.test \
  yaccpp.test \
  yaccvpath.test \
 +yacc-auxdir.test \
 +yacc-basic.test \
 +yacc-cxx.test \
 +yacc-bison-skeleton-cxx.test \
 +yacc-bison-skeleton.test \
 +yacc-clean.test \
 +yacc-clean-cxx.test \
 +yacc-d-basic.test \
 +yacc-d-cxx.test \
 +yacc-d-vpath.test \
 +yacc-deleted-headers.test \
 +yacc-depend.test \
 +yacc-depend2.test \
  yacc-dist-nobuild-subdir.test \
 +yacc-dist-nobuild.test \
 +yacc-line.test \
 +yacc-mix-c-cxx.test \
 +yacc-nodist.test \
 +yacc-pr204.test \
 +yacc-weirdnames.test \
  yflags.test \
  yflags2.test \
 +yflags-cmdline-override.test \
 +yflags-conditional.test \
 +yflags-d-false-positives.test \
 +yflags-force-conditional.test \
 +yflags-force-override.test \
 +yflags-var-expand.test \
  libtool-macros.test \
  gettext-macros.test
 +
 +print-list-of-tests:
 +      @echo $(handwritten_TESTS)
 +.PHONY: print-list-of-tests