automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-1539-g8847af0
Date: Thu, 03 Nov 2011 15:24:53 +0000

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

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

The branch, testsuite-work has been updated
       via  8847af0bdaf45429ce32ac13f4201073ffe0d6ee (commit)
       via  5012480bf2586caf6dc642a1883a39991beb0804 (commit)
       via  e79b1bf3d8fa33bb4e2d4d3b6c4b1f90dd65ea40 (commit)
       via  005000e7a47e75d051473ad326983be6448738b6 (commit)
       via  38e1b39d77ad4a22c85d5ad7b2fde4fd51bfd1b5 (commit)
       via  2270535f37084e0e2febed21cd808da75b0f3451 (commit)
       via  a778e9e1dcf606c9cee31009c982daa748438b39 (commit)
       via  1ba50d12baadb27e463c6e6c73bf19ddd53c65e4 (commit)
       via  a45c636491dda9b628266c2dfed5457a90baba1e (commit)
       via  3df373a8d62784eeab87452a42a08d11b7e75722 (commit)
       via  12f0a41009a4277f0ee705afa7cb2750451379dd (commit)
       via  182935ac18db1d6eb324c452b465c097a5bfabf0 (commit)
       via  821f88c3c7db37413c1e70722dad4a30a6c83afb (commit)
       via  91ab753b7b654934aaa34006067a92993bb53c09 (commit)
       via  1ec1668645acc84c2f2ae78d5a3da6f9e50ca429 (commit)
       via  cc2202a6b0d5a7dc2f8af17e4ac2fdd3fe46d267 (commit)
       via  c7a6a92ea100e3c78c7f48bd6a672da3ad46fc7f (commit)
       via  b07777bd6da63018e845e18ce96c4168343b47b6 (commit)
      from  4fdddd150b9bd93072b950ba597e5db73859014b (commit)

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

- Log -----------------------------------------------------------------
commit 8847af0bdaf45429ce32ac13f4201073ffe0d6ee
Merge: 4fdddd1 5012480
Author: Stefano Lattarini <address@hidden>
Date:   Thu Nov 3 16:23:56 2011 +0100

    Merge branch 'tw-merge-master' into testsuite-work

commit 5012480bf2586caf6dc642a1883a39991beb0804
Merge: cc29c61 e79b1bf
Author: Stefano Lattarini <address@hidden>
Date:   Thu Nov 3 15:39:02 2011 +0100

    Merge branch 'master' into testsuite-work
    
    Commits merged from master:
     - tests: various minor tweakings, mostly related to AM_PROG_AR
     - maint-mode: fix botched configure messages
     - fix: regenerate Makefiles
     - tests: few improvements to some `ar-lib' related tests
     - info: allow user to inhibit creation/update of '${infodir}/dir'
     - warnings: new 'extra-portability' category, for AM_PROG_AR
     - ar-lib: new 'AM_PROG_AR' macro, triggering the 'ar-lib' script
    
    Extra testsuite adjustments:
    * tests/instspc.tap: Adjust to new portability requirements
    due to the new AM_PROG_AR macro.
    * tests/lex-lib.test: Likewise.
    * tests/extra-portability2.test: Use `$am_original_AUTOMAKE'
    instead of the obsolete `$original_AUTOMAKE'.
    * tests/list-of-tests.mk: Update.

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

Summary of changes:
 ChangeLog                                          |  218 ++++++++++++++++++++
 NEWS                                               |   16 ++
 THANKS                                             |    3 +-
 automake.in                                        |   22 ++
 doc/Makefile.in                                    |    9 +-
 doc/automake.texi                                  |   40 +++-
 lib/Automake/ChannelDefs.pm                        |   13 ++
 lib/am/texinfos.am                                 |   22 +-
 m4/Makefile.am                                     |    1 +
 m4/Makefile.in                                     |    1 +
 m4/ar-lib.m4                                       |   58 +++++
 m4/maintainer.m4                                   |    6 +-
 tests/Makefile.in                                  |   16 ++-
 tests/aclocal4.test                                |    3 +-
 tests/alloca.test                                  |    2 +
 tests/{subobj7.test => ar-lib2.test}               |   21 +-
 tests/{library.test => ar-lib3.test}               |   24 ++-
 tests/{libtool2.test => ar-lib4.test}              |   35 ++--
 tests/ar-lib5a.test                                |   75 +++++++
 tests/ar-lib5b.test                                |   99 +++++++++
 tests/{tests-environment.test => ar-lib6a.test}    |   32 ++--
 tests/{libtoo11.test => ar-lib6b.test}             |   25 ++-
 tests/{confvar.test => ar-lib7.test}               |   17 +-
 tests/ar.test                                      |    3 +
 tests/ar2.test                                     |    2 +-
 tests/{ar2.test => ar3.test}                       |   15 +-
 tests/{help-python.test => ar4.test}               |   16 +-
 tests/{cscope2.test => ar5.test}                   |   15 +-
 tests/canon4.test                                  |    3 +
 tests/canon6.test                                  |    2 +
 tests/canon7.test                                  |    1 +
 tests/compile4.test                                |    1 +
 tests/cond13.test                                  |    3 +
 tests/condlib.test                                 |    3 +
 tests/defs                                         |    8 +
 tests/depcomp4.test                                |    1 +
 tests/depcomp6.test                                |    1 +
 tests/depcomp7.test                                |    1 +
 tests/depcomp8b.test                               |    1 +
 tests/discover.test                                |    2 +
 tests/extra-portability.test                       |   69 ++++++
 tests/{ar2.test => extra-portability2.test}        |   30 ++-
 tests/extra9.test                                  |    3 +
 tests/extradep.test                                |    1 +
 tests/extradep2.test                               |    1 +
 tests/fort5.test                                   |    1 +
 tests/help-maintainer.test                         |   59 ------
 tests/install-info-dir.test                        |  140 +++++++++++++
 tests/instdir-ltlib.test                           |    1 +
 tests/instdir-prog.test                            |    1 +
 tests/instfail-libtool.test                        |    1 +
 tests/instfail.test                                |    1 +
 tests/instspc.tap                                  |    7 +-
 tests/ldflags.test                                 |    2 +
 tests/lex-lib.test                                 |    1 +
 tests/libobj-basic.test                            |    4 +
 tests/libobj10.test                                |    3 +
 tests/libobj12.test                                |    2 +
 tests/libobj13.test                                |    1 +
 tests/libobj15a.test                               |    3 +
 tests/libobj15b.test                               |    3 +
 tests/libobj15c.test                               |    3 +
 tests/libobj16a.test                               |    3 +-
 tests/libobj16b.test                               |    4 +-
 tests/libobj17.test                                |    3 +-
 tests/libobj18.test                                |    1 +
 tests/libobj19.test                                |    4 +
 tests/libobj2.test                                 |    3 +-
 tests/libobj20a.test                               |    2 +
 tests/libobj20b.test                               |    3 +
 tests/libobj20c.test                               |    3 +
 tests/libobj3.test                                 |    3 +
 tests/libobj7.test                                 |    3 +-
 tests/library.test                                 |    2 +
 tests/library2.test                                |    6 +-
 tests/libtoo10.test                                |    1 +
 tests/libtool2.test                                |    1 +
 tests/libtool3.test                                |    1 +
 tests/libtool5.test                                |    1 +
 tests/libtool6.test                                |    1 +
 tests/libtool7.test                                |    1 +
 tests/libtool8.test                                |    1 +
 tests/libtool9.test                                |    1 +
 tests/list-of-tests.mk                             |   16 ++-
 tests/listval.test                                 |    2 +
 tests/location.test                                |    3 +
 tests/ltcond.test                                  |    1 +
 tests/ltcond2.test                                 |    1 +
 tests/ltconv.test                                  |    1 +
 tests/ltdeps.test                                  |    2 +
 tests/ltinit.test                                  |    1 +
 tests/ltinstloc.test                               |    3 +-
 tests/ltlibobjs.test                               |    2 +
 tests/ltlibsrc.test                                |    1 +
 tests/ltorder.test                                 |    1 +
 tests/maintmode-configure-msg.test                 |   79 +++++++
 tests/multlib.test                                 |    2 +
 tests/nobase-libtool.test                          |    1 +
 tests/nobase.test                                  |    1 +
 tests/noinstdir.test                               |    3 +
 tests/pluseq7.test                                 |    5 +-
 tests/posixsubst-ldadd.test                        |    3 +-
 tests/posixsubst-libraries.test                    |    3 +-
 tests/posixsubst-ltlibraries.test                  |    1 +
 tests/pr300-lib.test                               |    2 +-
 tests/pr300-ltlib.test                             |    2 +-
 tests/pr307.test                                   |    2 +-
 tests/pr401.test                                   |   10 +-
 tests/pr401b.test                                  |   10 +-
 tests/pr401c.test                                  |   10 +-
 tests/pr72.test                                    |    2 +-
 tests/primary-prefix-couples-documented-valid.test |    1 +
 tests/primary-prefix-couples-force-valid.test      |    3 +-
 tests/primary-prefix-invalid-couples.tap           |    2 +
 tests/primary-prefix-valid-couples.test            |    2 +
 tests/python-virtualenv.test                       |    1 +
 tests/silent3.test                                 |    1 +
 tests/silent4.test                                 |    1 +
 tests/silent9.test                                 |    1 +
 tests/specflg-dummy.test                           |    1 +
 tests/specflg2.test                                |    3 +
 tests/stdlib.test                                  |   22 ++-
 tests/stdlib2.test                                 |    1 +
 tests/strip2.test                                  |    1 +
 tests/strip3.test                                  |    1 +
 tests/subdir4.test                                 |    3 +
 tests/subdirbuiltsources.test                      |    1 +
 tests/subobj10.test                                |    1 +
 tests/subobj9.test                                 |    1 +
 tests/subpkg-yacc.test                             |    1 +
 tests/subpkg.test                                  |    1 +
 tests/subst3.test                                  |    1 +
 tests/substtarg.test                               |    3 +
 tests/suffix.test                                  |   30 ++-
 tests/suffix10.tap                                 |    1 +
 tests/suffix2.test                                 |    5 +-
 tests/suffix5.test                                 |    7 +-
 tests/suffix8.tap                                  |    1 +
 tests/vala.test                                    |    1 +
 tests/vala1.test                                   |    1 +
 tests/vartypo2.test                                |    1 +
 tests/vartypos.test                                |    4 +-
 142 files changed, 1259 insertions(+), 236 deletions(-)
 create mode 100644 m4/ar-lib.m4
 copy tests/{subobj7.test => ar-lib2.test} (69%)
 copy tests/{library.test => ar-lib3.test} (75%)
 copy tests/{libtool2.test => ar-lib4.test} (70%)
 create mode 100755 tests/ar-lib5a.test
 create mode 100755 tests/ar-lib5b.test
 copy tests/{tests-environment.test => ar-lib6a.test} (67%)
 copy tests/{libtoo11.test => ar-lib6b.test} (67%)
 copy tests/{confvar.test => ar-lib7.test} (74%)
 copy tests/{ar2.test => ar3.test} (78%)
 copy tests/{help-python.test => ar4.test} (72%)
 copy tests/{cscope2.test => ar5.test} (75%)
 create mode 100755 tests/extra-portability.test
 copy tests/{ar2.test => extra-portability2.test} (56%)
 delete mode 100755 tests/help-maintainer.test
 create mode 100755 tests/install-info-dir.test
 create mode 100755 tests/maintmode-configure-msg.test

diff --git a/ChangeLog b/ChangeLog
index d493ba3..4e1efcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,198 @@
+2011-11-03  Stefano Lattarini  <address@hidden>
+
+       Merge branch 'master' into testsuite-work
+
+       * tests/instspc.tap: Adjust to new portability requirements
+       due to the new AM_PROG_AR macro.
+       * tests/lex-lib.test: Likewise.
+       * tests/extra-portability2.test: Use `$am_original_AUTOMAKE'
+       instead of the obsolete `$original_AUTOMAKE'.
+       * tests/list-of-tests.mk: Update.
+
+2011-11-03  Stefano Lattarini  <address@hidden>
+
+       tests: various minor tweakings, mostly related to AM_PROG_AR
+       * tests/alloca.test: Adjust to new portability requirements due
+       to the new AM_PROG_AR macro.
+       * tests/discover.test: Likewise.
+       * tests/libobj3.test: Likewise.
+       * tests/pluseq7.test: Likewise.  Also, make grepping of automake
+       expected error message stricter.
+       * tests/stdlib.test: Likewise, and extend the test a bit.
+       * tests/parse.test (configure.in): Remove redundant call to
+       AC_PROG_RANLIB.
+       * tests/library2.test: Adjust to new portability requirements
+       due to the new AM_PROG_AR macro.  Also ...
+       (configure.in): ... add call to AC_PROG_CC, to ensure automake
+       really fails for the expected reason.
+
+2011-11-03  Stefano Lattarini  <address@hidden>
+
+       Merge branch 'msvc' into master
+
+       * tests/instspc-tests.sh: Adjust to new portability requirements
+       due to the new AM_PROG_AR macro.
+       * tests/libobj-basic.test: Likewise.
+       * tests/libobj2.test: Likewise.
+       * tests/libobj15a.test: Likewise.
+       * tests/libobj15b.test: Likewise.
+       * tests/libobj15c.test: Likewise.
+       * tests/libobj16a.test: Likewise.
+       * tests/libobj16b.test: Likewise.
+       * tests/libobj17.test: Likewise.
+       * tests/libobj18.test: Likewise.
+       * tests/libobj19.test: Likewise.
+       * tests/libobj20a.test: Likewise.
+       * tests/libobj20b.test: Likewise.
+       * tests/libobj20c.test: Likewise.
+       * tests/canon6.test: Likewise.
+       * tests/canon6.test: Likewise.
+       * tests/canon7.tests: Likewise.
+       * tests/extra9.test: Likewise.
+       * tests/extradep.test: Likewise.
+       * tests/extradep2.test: Likewise.
+       * tests/posixsubst-ldadd.test: Likewise.
+       * tests/posixsubst-libraries.test: Likewise.
+       * tests/posixsubst-ltlibraries.test: Likewise.
+       * tests/python-virtualenv.test: Likewise.
+       * tests/vartypos.test: Likewise.
+       * tests/vartypo2.test: Likewise.
+       * tests/suffix.test: Update to take into account previous
+       master-only changes.
+       * tests/suffix2.test: Likewise.
+       * tests/libobj7.test: Call automake with the `--add-missing'
+       option, instead of creating a dummy `ar-lib' file, since this
+       test now also runs "./configure" and "make".
+       * tests/suffix5.test: Copy the real `ar-lib' script file,
+       instead of creating a dummy one, since this test now also
+       runs "./configure" and "make".
+       * tests/extra-portability2.test: Fix this test not to rely
+       on the older, faulty semantics of "strictness specification
+       always reset warning level", which has been fixed in commit
+       v1.11-623-g1609491 (see also automake bug#7669 a.k.a. PR/547).
+       Since we are at it, throw inf few other minor unrelated
+       improvements.
+       * tests/extra-portability.test: Explicitly pass `-Wall' to
+       automake calls, for clarity.
+
+2011-10-21  Peter Rosin  <address@hidden>
+
+       warnings: new 'extra-portability' category, for AM_PROG_AR
+       * lib/Automake/ChannelDefs.pm: Register new extra-portability
+       warning channel.
+       (switch_warning): Turn off extra-portability if portability is
+       turned off, and turn on portability if extra-portability is
+       turned on.
+       (set_strictness): Silence extra-portability for --gnits, --gnu
+       and --foreign.
+       * tests/extra-portability2.test: New test, checking that the
+       extra-portability channel is silenced by --gnits, --gnu and
+       --foreign.
+       * doc/automake.texi (Invoking Automake): Document the new warning
+       category and its interaction with the portability category.
+       * tests/extra-portability.test: New test, checking the interaction
+       between the portability and extra-portability warning categories.
+       * automake.in (handle_libraries, handle_ltlibraries): Move the
+       AM_PROG_AR warnings to the new extra-portability channel.
+       * tests/ar2.test: Adjust to the new warning channel.
+       * tests/pr300-lib.test: Likewise.
+       * tests/pr300-ltlib.test: Likewise.
+       * tests/pr307.test: Likewise.
+       * tests/pr401.test: Likewise.
+       * tests/pr401b.test: Likewise.
+       * tests/pr401c.test: Likewise.
+       * tests/pr72.test: Likewise.
+       * NEWS: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-10-21  Peter Rosin  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       Add new 'AM_PROG_AR' macro, triggering the 'ar-lib' script.
+       * m4/ar-lib.m4: New macro AM_PROG_AR, which locates an
+       archiver and triggers the auxiliary 'ar-lib' script if needed.
+       * m4/Makefile.am (dist_m4data_DATA): Update.
+       * automake.in ($seen_ar): New variable.
+       (scan_autoconf_traces): Set it.
+       (handle_libraries, handle_ltlibraries): Require AM_PROG_AR for
+       portability.
+       * doc/automake.texi (Public Macros): Mention the new
+       'AM_PROG_AR' macro.
+       (Subpackages): Add AM_PROG_AR to the example.
+       (A Library): Adjust recommendations for AR given the new
+       AM_PROG_AR macro.
+       * All relevant tests: Adjust to new portability requirements due
+       to the new AM_PROG_AR macro.
+       * tests/ar-lib2.test: New test, checking that AM_PROG_AR triggers
+       install of ar-lib.
+       * tests/ar-lib3.test: New test, checking that lib_LIBRARIES
+       requires AM_PROG_AR.
+       * tests/ar-lib4.test: New test, checking that lib_LTLIBRARIES
+       requires AM_PROG_AR.
+       * tests/ar-lib5a.test: New test, checking that AM_PROG_AR triggers
+       use of ar-lib when the archiver is Microsoft lib.
+       * tests/ar-lib5b.test: New test, checking that AM_PROG_AR triggers
+       use of ar-lib when the archiver is a faked lib.
+       * tests/ar-lib6a.test: New test, checking the ordering of
+       AM_PROG_AR and LT_INIT.
+       * tests/ar-lib6b.test: New test, checking the ordering of
+       AM_PROG_AR and AC_PROG_LIBTOOL.
+       * tests/ar-lib7.test: New test, checking that automake warns
+       if ar-lib is missing.
+       * tests/ar3.test: New test, checking that AR and ARFLAGS may
+       be overridden by the user even if AM_PROG_AR is used.
+       * tests/ar4.test: New test, checking that AM_PROG_AR bails out
+       if it cannot determine the archiver interface.
+       * tests/ar5.test: New test, checking that AM_PROG_AR runs its
+       optional argument if it cannot determine the archiver interface.
+       * tests/defs.in: New required entry 'lib'.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+
+2011-11-03  Zack Weinberg <address@hidden>  (tiny change)
+           Stefano Lattarini  <address@hidden>
+
+       maint-mode: fix botched configure messages
+       This change fixes automake bug#9890.
+       * m4/maintainer.m4 (AM_MAINTAINER_MODE): Fix the "checking ..."
+       configure message related to the enabling/disabling of maintainer
+       mode.
+       * tests/help-maintainer.test: Renamed ...
+       * tests/maintmode-configure-msg.test: ... to this, and extended
+       to cover the fixed bug.  Also, since we are at it, make grepping
+       of configure help screens stricter, and throw in some few other
+       changes to reduce code duplication and enhance readability.
+       * tests/Makefile.am (TESTS): Update.
+       * THANKS: Update with Zack's new e-mail address.
+       Report and initial patch by Zack Weinberg, test cases added by
+       Stefano Lattarini.
+
+2011-10-23  Stefano Lattarini  <address@hidden>
+
+       info: allow user to inhibit creation/update of '${infodir}/dir'
+       With this change, we allow the user to request the install-info
+       rules not to update the `${infodir}/dir' file, by exporting the
+       environment variable `AM_UPDATE_INFO_DIR' to the value "no".
+       This is especially useful to distro packagers, and is a definite
+       improvement over our previous hack of looking whether the
+       `install-info' program was the Debian or GNU version -- hack
+       which had been silently broken with recent versions of debian
+       install-info BTW (probably since dpkg 1.15.4, 2009-09-06).
+       This change fixes automake bug#9773.  See also Debian Bug#543992.
+       * lib/am/texinfos.am: Don't look anymore at the output of
+       `install-info --version' to decide whether to use it to update
+       the `${infodir}/dir' or not; instead, honour the environment
+       variable `AM_UPDATE_INFO_DIR'.
+       * tests/install-info-dir.test: New test.
+       * tests/Makefile.am (TESTS): Add it.
+       * tests/defs: Also unset `AM_UPDATE_INFO_DIR', to avoid unwanted
+       interferences from the environment.
+       * doc/automake.texi (Texinfo): Update.
+       * NEWS: Likewise.
+       * THANKS: Likewise.
+       Report by Jonathan Nieder.
+
 2011-10-25  Stefano Lattarini  <address@hidden>
 
        test defs: new function 'am_keeping_testdirs', for better APIs
@@ -42,6 +237,29 @@
        * tests/Makefile.am (XFAIL_TESTS): Add lex-subobj-nodep.test,
        remove yacc-dist-nobuild-subdir.test.
 
+2011-10-25  Stefano Lattarini  <address@hidden>
+
+       tests: few improvements to some `ar-lib' related tests
+
+       * tests/ar-lib5a.test (Makefile.am): Also check that the target
+       library has truly been created.
+       (ar-lib): Use the real `ar-lib' script (mildly patched) rather
+       than a dummy one, to ensure better "real-life coverage".  Fix
+       botched shebang line.
+       * tests/ar-lib5b.test: Extend the PATH variable to make the dummy
+       `lib' script accessible, instead of explicitly calling it by its
+       relative/absolute path.
+       (ar-lib): Fix botched shebang line.
+       (bin/lib): Likewise.  Also, add explicative comments, and make
+       slightly stricter.
+
+2011-10-24  Peter Rosin  <address@hidden>
+
+       Merge branch 'maint' into msvc
+
+       * tests/subpkg-yacc.test: Adjust to new portability requirements due
+       to the new AM_PROG_AR macro.
+
 2011-10-19  Stefano Lattarini  <address@hidden>
 
        dejagnu: allow the package developer to extend site.exp
diff --git a/NEWS b/NEWS
index e5e2eb0..cdc1efe 100644
--- a/NEWS
+++ b/NEWS
@@ -137,6 +137,9 @@ New in 1.11a:
   - C source and header files derived from non-distributed Yacc sources are
     now removed by "make clean", not only by "make maintainer-clean".
 
+  - The `compile' script now converts some options for MSVC for a better
+    user experience.  Similarly, the new `ar-lib' script wraps Microsoft lib.
+
   - The py-compile script now accepts empty arguments passed to the options
     `--destdir' and `--basedir', and complains about unrecognized options.
     Moreover, a non-option argument or a special `--' argument terminates
@@ -150,10 +153,19 @@ New in 1.11a:
     user; still, the old Makefile.am files that used to define it should
     still continue to work as before.
 
+  - New macro AM_PROG_AR that looks for an archiver and wraps it in the new
+    'ar-lib' auxiliary script if the found archiver is Microsoft lib.  This
+    new macro is required for LIBRARIES and LTLIBRARIES when automake is
+    run with -Wextra-portability (or -Wall) and -Werror.
+
   - When using DejaGnu-based testsuites, the user can extend the `site.exp'
     file generated by automake-provided rules by defining the special make
     variable `$(EXTRA_DEJAGNU_SITE_CONFIG)'.
 
+  - The `install-info' rule can now be instructed not to create/update
+    the `${infodir}/dir' file, by exporting the new environment variable
+    `AM_UPDATE_INFO_DIR' to the value "no".
+
   - Support for automatic de-ANSI-fication has been removed.
 
 Bugs fixed in 1.11a:
@@ -270,6 +282,10 @@ Bugs fixed in 1.11a:
   - Now aclocal and automake, when they've to spawn autoconf or autom4te
     processes, honour the configure-time definitions of AUTOCONF and
     AUTOM4TE.
+
+  - The `install-info' recipe does not try anymore to guess whether the
+    `install-info' program is from Debian or from GNU, and adaptively
+    change its behaviour; this has proven to be frail and easy to regress.
 
 New in 1.11:
 
diff --git a/THANKS b/THANKS
index 5276b18..fa482d1 100644
--- a/THANKS
+++ b/THANKS
@@ -173,6 +173,7 @@ John Pierce         address@hidden
 John Ratliff           address@hidden
 John R. Cary           address@hidden
 John W. Coomes         address@hidden
+Jonathan Nieder                address@hidden
 Josh MacDonald         address@hidden
 Joshua Cowan           address@hidden
 js pendry              address@hidden
@@ -369,7 +370,7 @@ William Pursell             address@hidden
 William S Fulton       address@hidden
 Yann Droneaud          address@hidden
 Younes Younes          address@hidden
-Zack Weinberg          address@hidden
+Zack Weinberg          address@hidden
 Zbigniew Jędrzejewski-Szmek address@hidden
 Zoltan Rado            address@hidden
 
diff --git a/automake.in b/automake.in
index c93437b..4341be3 100644
--- a/automake.in
+++ b/automake.in
@@ -389,6 +389,9 @@ 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;
 
@@ -2651,6 +2654,13 @@ sub handle_libraries
              &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'")
+       }
     }
 }
 
@@ -2890,6 +2900,13 @@ sub handle_ltlibraries
              &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'")
+       }
     }
 }
 
@@ -5208,6 +5225,7 @@ sub scan_autoconf_traces ($)
                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,
@@ -5397,6 +5415,10 @@ sub scan_autoconf_traces ($)
        {
          $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;
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 2db0b7e..c99a314 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -777,8 +777,13 @@ install-info-am: $(INFO_DEPS)
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
          $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
        @$(POST_INSTALL)
-       @if (install-info --version && \
-            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
+       @am__run_installinfo=yes; \
+       case $$AM_UPDATE_INFO_DIR in \
+         n|no|NO) am__run_installinfo=no;; \
+         *) (install-info --version) >/dev/null 2>&1 \
+              || am__run_installinfo=no;; \
+       esac; \
+       if test $$am__run_installinfo = yes; then \
          list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
diff --git a/doc/automake.texi b/doc/automake.texi
index 736b66e..c8b9441 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -2712,6 +2712,9 @@ user redefinitions of Automake rules or variables
 @item portability
 portability issues (e.g., use of @command{make} features that are
 known to be not portable)
address@hidden extra-portability
+extra portability issues related to obscure tools.  One example of such
+a tool is the Microsoft @command{lib} archiver.
 @item syntax
 weird syntax, unused variables, typos
 @item unsupported
@@ -2734,6 +2737,12 @@ are enabled in @option{--gnu} and @option{--gnits} 
strictness.
 On the other hand, the @option{silent-rules} options (@pxref{Options})
 turns off portability warnings about recursive variable expansions.
 
address@hidden Checked by extra-portability.test
+Turning off @samp{portability} will also turn off @samp{extra-portability},
+and similarly turning on @samp{extra-portability} will also turn on
address@hidden  However, turning on @samp{portability} or turning
+off @samp{extra-portability} will not affect the other category.
+
 @vindex WARNINGS
 The environment variable @env{WARNINGS} can contain a comma separated
 list of categories to enable.  It will be taken into account before the
@@ -4024,6 +4033,15 @@ environment, or use the @option{--with-lispdir} option to
 @command{configure} to explicitly set the correct path (if you're sure
 you have an @command{emacs} that supports Emacs Lisp).
 
address@hidden AM_PROG_AR(@ovar{act-if-fail})
address@hidden AM_PROG_AR
address@hidden AR
+You must use this macro when you use the archiver in your project, if
+you want support for unusual archivers such as Microsoft @command{lib}.
+The content of the optional argument is executed if the archiver
+interface is not recognized; the default action is to abort configure
+with an error message.
+
 @item AM_PROG_AS
 @acindex AM_PROG_AS
 @vindex CCAS
@@ -4638,6 +4656,7 @@ AC_INIT([hand], [1.2])
 AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -5082,12 +5101,14 @@ by invoking @samp{$(AR) $(ARFLAGS)} followed by the 
name of the
 library and the list of objects, and finally by calling
 @samp{$(RANLIB)} on that library.  You should call
 @code{AC_PROG_RANLIB} from your @file{configure.ac} to define
address@hidden (Automake will complain otherwise).  @code{AR} and
address@hidden default to @code{ar} and @code{cru} respectively; you
-can override these two variables my setting them in your
address@hidden, by @code{AC_SUBST}ing them from your
address@hidden, or by defining a per-library @code{maude_AR}
-variable (@pxref{Program and Library Variables}).
address@hidden (Automake will complain otherwise).  You should also
+call @code{AM_PROG_AR} to define @code{AR}, in order to support unusual
+archivers such as Microsoft lib.  @code{ARFLAGS} will default to
address@hidden; you can override this variable by setting it in your
address@hidden or by @code{AC_SUBST}ing it from your
address@hidden  You can override the @code{AR} variable by
+defining a per-library @code{maude_AR} variable (@pxref{Program and
+Library Variables}).
 
 @cindex Empty libraries
 Be careful when selecting library components conditionally.  Because
@@ -7927,6 +7948,13 @@ be prevented via the @code{no-installinfo} option.  In 
this case,
 @file{.info} files are not installed by default, and user must
 request this explicitly using @samp{make install-info}.
 
address@hidden AM_UPDATE_INFO_DIR
+By default, @code{make install-info} will try to run the
address@hidden program (if available) to update (or create)
+the @address@hidden@address@hidden/dir} index.  If this is undesired, it
+can be prevented by exporting the @code{AM_UPDATE_INFO_DIR} variable
+to "@code{no}".
+
 The following variables are used by the Texinfo build rules.
 
 @vtable @code
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index 470e6c7..de3970c 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -115,6 +115,10 @@ variables (silent by default).
 
 Warnings about non-portable constructs.
 
+=item C<extra-portability>
+
+Extra warnings about non-portable constructs covering obscure tools.
+
 =item C<syntax>
 
 Warnings about weird syntax, unused variables, typos...
@@ -151,6 +155,7 @@ register_channel 'automake', type => 'fatal', backtrace => 
1,
   footer => "\nPlease contact <$PACKAGE_BUGREPORT>.",
   uniq_part => UP_NONE, ordered => 0;
 
+register_channel 'extra-portability', type => 'warning', silent => 1;
 register_channel 'gnu', type => 'warning';
 register_channel 'obsolete', type => 'warning', silent => 1;
 register_channel 'override', type => 'warning', silent => 1;
@@ -184,6 +189,7 @@ sub usage ()
   `obsolete'      obsolete features or constructions
   `override'      user redefinitions of Automake rules or variables
   `portability'   portability issues (default in gnu and gnits modes)
+  `extra-portability'  extra portability issues related to obscure tools
   `syntax'        dubious syntactic constructs (default)
   `unsupported'   unsupported or incomplete features (default)
   `all'           all the warnings
@@ -288,6 +294,10 @@ sub switch_warning ($)
       setup_channel $cat, silent => $has_no;
       setup_channel 'portability-recursive', silent => $has_no
         if $cat eq 'portability';
+      setup_channel 'extra-portability', silent => $has_no
+        if ($cat eq 'portability' && $has_no);
+      setup_channel 'portability', silent => $has_no
+        if ($cat eq 'extra-portability' && ! $has_no);
     }
   else
     {
@@ -349,6 +359,7 @@ sub set_strictness ($)
       setup_channel 'error-gnu/warn', silent => 0, type => 'error';
       setup_channel 'error-gnits', silent => 1;
       setup_channel 'portability', silent => 0;
+      setup_channel 'extra-portability', silent => 1;
       setup_channel 'gnu', silent => 0;
     }
   elsif ($name eq 'gnits')
@@ -357,6 +368,7 @@ sub set_strictness ($)
       setup_channel 'error-gnu/warn', silent => 0, type => 'error';
       setup_channel 'error-gnits', silent => 0;
       setup_channel 'portability', silent => 0;
+      setup_channel 'extra-portability', silent => 1;
       setup_channel 'gnu', silent => 0;
     }
   elsif ($name eq 'foreign')
@@ -365,6 +377,7 @@ sub set_strictness ($)
       setup_channel 'error-gnu/warn', silent => 0, type => 'warning';
       setup_channel 'error-gnits', silent => 1;
       setup_channel 'portability', silent => 1;
+      setup_channel 'extra-portability', silent => 1;
       setup_channel 'gnu', silent => 1;
     }
   else
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index bfde665..56c092f 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -208,18 +208,16 @@ install-info-am: $(INFO_DEPS)
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
          $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
        @$(POST_INSTALL)
-## Only run this code if install-info actually exists, and it is not
-## the Debian install-info.  FIXME: once Debian install-info goes
-## away, we can remove this hack.  Some versions of Debian install-info
-## print their version on stderr (e.g. 1.8.3), other do it in
-## on stdout (e.g. 1.10.15).
-##
-## Do not use
-##    install-info --version 2>&1 | sed 1q | grep -v -i debian
-## as if install-info does not exist, grep -v will be happy, and
-## therefore the code will be triggered although install-info is missing.
-       @if (install-info --version && \
-            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
+## Only run this code if install-info actually exists, and if the user
+## doesn't request it not to be run (through the `AM_UPDATE_INFO_DIR'
+## environment variable).  See automake bug#9773 and Debian Bug#543992.
+       @am__run_installinfo=yes; \
+       case $$AM_UPDATE_INFO_DIR in \
+         n|no|NO) am__run_installinfo=no;; \
+         *) (install-info --version) >/dev/null 2>&1 \
+              || am__run_installinfo=no;; \
+       esac; \
+       if test $$am__run_installinfo = yes; then \
          list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
          for file in $$list; do \
 ## Strip directory
diff --git a/m4/Makefile.am b/m4/Makefile.am
index a6491cf..d04ec9d 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -20,6 +20,7 @@
 
 dist_automake_ac_DATA = \
 $(top_srcdir)/m4/amversion.m4 \
+ar-lib.m4 \
 as.m4 \
 auxdir.m4 \
 ccstdc.m4 \
diff --git a/m4/Makefile.in b/m4/Makefile.in
index de296dc..0f1a0ad 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -211,6 +211,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 dist_automake_ac_DATA = \
 $(top_srcdir)/m4/amversion.m4 \
+ar-lib.m4 \
 as.m4 \
 auxdir.m4 \
 ccstdc.m4 \
diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4
new file mode 100644
index 0000000..822ca60
--- /dev/null
+++ b/m4/ar-lib.m4
@@ -0,0 +1,58 @@
+##                                                          -*- Autoconf -*-
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext 
>&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          m4_default([$1],
+            [AC_MSG_ERROR([could not determine $AR interface])])
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   ])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
index 0d0bf7f..b8f02bd 100644
--- a/m4/maintainer.m4
+++ b/m4/maintainer.m4
@@ -1,8 +1,8 @@
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -22,7 +22,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
        [disable], [m4_define([am_maintainer_other], [enable])],
        [m4_define([am_maintainer_other], [enable])
         m4_warn([syntax], [unexpected argument to AM@&address@hidden: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions 
of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 5a34c99..b260ad2 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -399,8 +399,19 @@ amopts-variable-expansion.test \
 amsubst.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 \
@@ -699,6 +710,8 @@ extra10.test \
 extra11.test \
 extra12.test \
 extra-programs-empty.test \
+extra-portability.test \
+extra-portability2.test \
 extradep.test \
 extradep2.test \
 f90only.test \
@@ -743,7 +756,6 @@ help-depend2.test \
 help-dmalloc.test \
 help-init.test \
 help-lispdir.test \
-help-maintainer.test \
 help-multilib.test \
 help-python.test \
 help-regex.test \
@@ -781,6 +793,7 @@ instman2.test \
 instmany.test \
 instmany-mans.test \
 instmany-python.test \
+install-info-dir.test \
 interp.test \
 interp2.test \
 java.test \
@@ -892,6 +905,7 @@ lzma.test \
 m4-inclusion.test \
 maintclean.test \
 maintclean-vpath.test \
+maintmode-configure-msg.test \
 make.test \
 makej.test \
 makej2.test \
diff --git a/tests/aclocal4.test b/tests/aclocal4.test
index aa16aba..c7e4cda 100755
--- a/tests/aclocal4.test
+++ b/tests/aclocal4.test
@@ -22,6 +22,7 @@ required=cc
 
 cat >>configure.in <<EOF
 AC_PROG_RANLIB
+AM_PROG_AR
 AC_PROG_CC
 MY_MACRO
 AC_CONFIG_FILES([lib/Makefile])
@@ -57,7 +58,7 @@ EOF
 
 $ACLOCAL -I m4
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
 ./configure
 $MAKE check-not-foo
 
diff --git a/tests/alloca.test b/tests/alloca.test
index cff6641..947a5b4 100755
--- a/tests/alloca.test
+++ b/tests/alloca.test
@@ -19,6 +19,7 @@
 . ./defs || Exit 1
 
 cat >> configure.in <<'END'
+AM_PROG_AR
 AC_PROG_CC
 END
 
@@ -29,6 +30,7 @@ libtu_a_LIBADD = @ALLOCA@
 END
 
 : > alloca.c
+: > ar-lib
 
 $ACLOCAL
 AUTOMAKE_fails
diff --git a/tests/subobj7.test b/tests/ar-lib2.test
similarity index 69%
copy from tests/subobj7.test
copy to tests/ar-lib2.test
index ff36d6c..67a64e9 100755
--- a/tests/subobj7.test
+++ b/tests/ar-lib2.test
@@ -1,6 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2011 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
@@ -15,25 +14,27 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure AM_CFLAGS appears in subdir compilation rule.
-# Report from Steve M. Robbins.
+# Test if AM_PROG_AR installs ar-lib.
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT
+AM_PROG_AR
 END
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = wish
-wish_SOURCES = foo.c generic/a.c
+wish_SOURCES = a.c
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
-
-grep wish_CFLAGS Makefile.in && Exit 1
+$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+# Make sure ar-lib is installed, and that Automake says so.
+grep '^configure\.in:.*install.*ar-lib' stderr
+test -f ar-lib
 
 :
diff --git a/tests/library.test b/tests/ar-lib3.test
similarity index 75%
copy from tests/library.test
copy to tests/ar-lib3.test
index e3a9813..6bcf6c2 100755
--- a/tests/library.test
+++ b/tests/ar-lib3.test
@@ -1,6 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2011 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
@@ -15,23 +14,32 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for _DEPENDENCIES with libraries.
+# Test if lib_LIBRARIES requests AM_PROG_AR.
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AC_PROG_RANLIB
-AM_MAINTAINER_MODE
 AC_PROG_CC
+AC_PROG_RANLIB
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = dejagnu cygnus
 lib_LIBRARIES = libfoo.a
-libfoo_a_DEPENDENCIES = libzot.a
+libfoo_a_SOURCES = foo.c
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+
+grep 'requires.*AM_PROG_AR' stderr
+
+cat >> configure.in << 'END'
+AM_PROG_AR
 END
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE --add-missing
 
 :
diff --git a/tests/libtool2.test b/tests/ar-lib4.test
similarity index 70%
copy from tests/libtool2.test
copy to tests/ar-lib4.test
index 6e268dd..e05a8c2 100755
--- a/tests/libtool2.test
+++ b/tests/ar-lib4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011 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
@@ -14,35 +14,44 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure libtool clean targets exist.
-# Report from Eric Magnien.
+# Test if lib_LTLIBRARIES requests AM_PROG_AR.
 
 required=libtoolize
 . ./defs || Exit 1
 
+set -e
+
+cp configure.in X
+
 cat >> configure.in << 'END'
 AC_PROG_CC
+AC_PROG_RANLIB
 AC_PROG_LIBTOOL
-AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-SUBDIR = subdir
 lib_LTLIBRARIES = libfoo.la
 libfoo_la_SOURCES = foo.c
 END
 
-mkdir sub
-cat > sub/Makefile.am << 'END'
-lib_LTLIBRARIES = libfoo.la
-libfoo_la_SOURCES = foo.c
+libtoolize
+$ACLOCAL
+AUTOMAKE_fails
+
+grep 'requires.*AM_PROG_AR' stderr
+
+cp X configure.in
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AC_OUTPUT
 END
 
 $ACLOCAL
-: > ltmain.sh
-$AUTOMAKE -a
-
-grep 'rm -f .*\.lo' sub/Makefile.in
+$AUTOMAKE --add-missing
 
 :
diff --git a/tests/ar-lib5a.test b/tests/ar-lib5a.test
new file mode 100755
index 0000000..d1de98b
--- /dev/null
+++ b/tests/ar-lib5a.test
@@ -0,0 +1,75 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if AM_PROG_AR triggers the use of the ar-lib script.
+# This test requires Microsoft lib.
+# Keep this test in sync with sister test `ar-lib5b.test'.
+
+required=lib
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+# We want to test the content of am_cv_ar_interface in the Makefile.
+AC_SUBST([am_cv_ar_interface])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libwish.a
+libwish_a_SOURCES = wish.c
+
+check-local:
+       test x'$(am_cv_ar_interface)' = x'lib'
+       test -f ar-lib-worked
+       test -f libwish.a
+MOSTLYCLEANFILES = ar-lib-worked
+END
+
+cat > wish.c << 'END'
+int wish(void) { return 0; }
+END
+
+mkdir auxdir
+# FIXME: make this "installcheck-aware" once we are merged into the
+#        'testsuite-work' branch.
+cat - "$testsrcdir"/../lib/ar-lib > auxdir/ar-lib << 'END'
+#! /bin/sh
+:> ar-lib-worked
+END
+chmod +x auxdir/ar-lib
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Sanity check: test that it is ok to use `am_cv_ar_interface' as we do.
+$FGREP 'am_cv_ar_interface=' configure
+
+./configure AR=lib RANLIB=:
+
+$MAKE check
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS='AR=lib RANLIB=:'
+
+:
diff --git a/tests/ar-lib5b.test b/tests/ar-lib5b.test
new file mode 100755
index 0000000..52deab5
--- /dev/null
+++ b/tests/ar-lib5b.test
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if AM_PROG_AR triggers the use of the ar-lib script.
+# This test does not require Microsoft lib.
+# Keep this test in sync with sister test `ar-lib5a.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+# We want to test the content of am_cv_ar_interface in the Makefile.
+AC_SUBST([am_cv_ar_interface])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libwish.a
+libwish_a_SOURCES = wish.c
+
+check-local:
+       test x'$(am_cv_ar_interface)' = x'lib'
+       test -f ar-lib-worked
+MOSTLYCLEANFILES = ar-lib-worked
+END
+
+cat > wish.c << 'END'
+int wish(void) { return 0; }
+END
+
+mkdir auxdir
+cat > auxdir/ar-lib << 'END'
+#! /bin/sh
+:> ar-lib-worked
+END
+chmod +x auxdir/ar-lib
+
+# Let's fake microsoft lib.
+mkdir bin
+cat > bin/lib << 'END'
+#! /bin/sh
+echo lib command line: $* >&2 # For debugging.
+case " $* " in
+  # The `-OUT:' option is used by tests in configure.  So don't create
+  # the `ar-lib-worked' file here, as that might cause spurious passes
+  # of this test; but don't fail either, as that would confuse said
+  # configure tests.
+  *' -OUT:'*) exit 0;;
+  # This means that $* looks like a command-line for `ar'.  We have to
+  # exit with failure here, to accomodate the two following ortoghonal
+  # scenarios:
+  #  1. when `lib' is tested by configure, this will tell that it does
+  #     not use the ar(1) interface, so that the `ar-lib' script will
+  #     get involved;
+  #  2. when `lib' is called by the Makefile, an ar-style command line
+  #     passed to it would mean that the `ar-lib' script has failed to
+  #     properly munge the command line, or hasn't been invoked to do so.
+  *\ c*) exit 1;;
+  # Assume everything else is OK.
+  *) : > ar-lib-worked;;
+esac
+END
+chmod +x bin/lib
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Sanity check: test that it is ok to use `am_cv_ar_interface' as we do.
+$FGREP 'am_cv_ar_interface=' configure
+
+./configure AR=lib RANLIB=:
+
+$MAKE check
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="AR=lib RANLIB=:"
+
+:
diff --git a/tests/tests-environment.test b/tests/ar-lib6a.test
similarity index 67%
copy from tests/tests-environment.test
copy to tests/ar-lib6a.test
index e3dc76a..f1b982c 100755
--- a/tests/tests-environment.test
+++ b/tests/ar-lib6a.test
@@ -14,32 +14,26 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
+# Test AM_PROG_AR ordering requirements
+# Keep this test in sync with sister test `ar-lib6b.test'.
 
+required=libtoolize
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-TESTS = foo.test
-EXTRA_DIST = $(TESTS)
-END
+set -e
 
-cat > foo.test << 'END'
-#! /bin/sh
-test x"$FOO" = x"ok"
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
+AM_PROG_AR
 END
-chmod a+x foo.test
 
+libtoolize
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
+$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 
-FOO=bad TESTS_ENVIRONMENT='FOO=ok'  $MAKE check
-FOO=ok  TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
+$EGREP '(AC_PROG_LIBTOOL|LT_INIT).*before.*AM_PROG_AR' stderr
 
 :
diff --git a/tests/libtoo11.test b/tests/ar-lib6b.test
similarity index 67%
copy from tests/libtoo11.test
copy to tests/ar-lib6b.test
index e7b7354..5487add 100755
--- a/tests/libtoo11.test
+++ b/tests/ar-lib6b.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011 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
@@ -14,25 +14,26 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure config.lt is removed with Libtool 2.2.x's LT_OUTPUT.
-# Report by Charles Wilson.
+# Test AM_PROG_AR ordering requirements for older Libtools
+# Keep this test in sync with sister test `ar-lib6a.test'.
 
-required='cc libtoolize'
+required=libtoolize
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
 AC_PROG_LIBTOOL
-m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
-AC_OUTPUT
+AM_PROG_AR
 END
 
-: > Makefile.am
-
 libtoolize
 $ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-./configure
-$MAKE distcheck
+$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+
+$EGREP 'AC_PROG_LIBTOOL.*before.*AM_PROG_AR' stderr
 
 :
diff --git a/tests/confvar.test b/tests/ar-lib7.test
similarity index 74%
copy from tests/confvar.test
copy to tests/ar-lib7.test
index cc0bd7e..3f758a9 100755
--- a/tests/confvar.test
+++ b/tests/ar-lib7.test
@@ -1,6 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2011 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
@@ -15,19 +14,23 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure configure_vars stuff works.
+# Test if automake warns if ar-lib is missing when AM_PROG_AR is used.
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AC_SUBST([QBERT])
+AM_PROG_AR
 END
 
-: > Makefile.am
+:> Makefile.am
 
 $ACLOCAL
-$AUTOMAKE
+AUTOMAKE_fails
+
+grep '^configure\.in:.*ar-lib.*not found' stderr
 
-grep '^QBERT =' Makefile.in
+$AUTOMAKE --add-missing
 
 :
diff --git a/tests/ar.test b/tests/ar.test
index 4a69c34..b0b02a4 100755
--- a/tests/ar.test
+++ b/tests/ar.test
@@ -20,6 +20,7 @@
 . ./defs || Exit 1
 
 cat >> configure.in << 'END'
+AM_PROG_AR
 AC_SUBST([AR], ['echo it works'])
 AC_SUBST([ARFLAGS], ['>'])
 AC_SUBST([RANLIB], ['echo really works >>'])
@@ -31,6 +32,8 @@ lib_LIBRARIES = libfoo.a
 libfoo_a_SOURCES =
 END
 
+:> ar-lib
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
diff --git a/tests/ar2.test b/tests/ar2.test
index a614949..289c469 100755
--- a/tests/ar2.test
+++ b/tests/ar2.test
@@ -31,7 +31,7 @@ libfoo_a_SOURCES = foo.c
 END
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 grep '^ARFLAGS =' Makefile.in
 grep '^AR =' Makefile.in
 
diff --git a/tests/ar2.test b/tests/ar3.test
similarity index 78%
copy from tests/ar2.test
copy to tests/ar3.test
index a614949..1d5e84e 100755
--- a/tests/ar2.test
+++ b/tests/ar3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011 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
@@ -14,13 +14,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure AR and ARFLAGS are defined for EXTRA_LIBRARIES.
-# Report from Kevin Ryde.
+# Make sure that AR, ARFLAGS, etc. works also when the macro AM_PROG_AR
+# is used.
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
@@ -30,9 +33,11 @@ EXTRA_LIBRARIES = libfoo.a
 libfoo_a_SOURCES = foo.c
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
-grep '^ARFLAGS =' Makefile.in
-grep '^AR =' Makefile.in
+$EGREP '^ARFLAGS =' Makefile.in
+$EGREP '^AR =' Makefile.in
 
 :
diff --git a/tests/help-python.test b/tests/ar4.test
similarity index 72%
copy from tests/help-python.test
copy to tests/ar4.test
index e6a6fd3..ebd8c57 100755
--- a/tests/help-python.test
+++ b/tests/ar4.test
@@ -14,22 +14,22 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure that macro `AM_PATH_PYTHON' adds proper text to the
-# configure help screen.
+# Test if configure bails out if $AR does not work and AM_PROG_AR is used.
 
 . ./defs || Exit 1
 
-cat > configure.in <<END
-AC_INIT([$me], [1.0])
-AM_PATH_PYTHON
+set -e
+
+cat >> configure.in << 'END'
+AM_PROG_AR
 END
 
 $ACLOCAL
 $AUTOCONF
 
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
+./configure AR=/bin/false 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
 
-grep '^  *PYTHON  *the Python interpreter$' stdout
+grep 'configure: error: could not determine /bin/false interface' stderr
 
 :
diff --git a/tests/cscope2.test b/tests/ar5.test
similarity index 75%
copy from tests/cscope2.test
copy to tests/ar5.test
index a7fa993..d00f421 100755
--- a/tests/cscope2.test
+++ b/tests/ar5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011 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
@@ -14,21 +14,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# The `cscope' target should not fail if there are no sources.
+# Test the optional argument of AM_PROG_AR.
 
-required=
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AC_OUTPUT
+AM_PROG_AR([echo spy > bad-archiver-interface-detected])
 END
-: >Makefile.am
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
 
-./configure
-$MAKE cscope
+./configure AR=/bin/false
+test -f bad-archiver-interface-detected
 
 :
diff --git a/tests/canon4.test b/tests/canon4.test
index 733ea70..c6b7296 100755
--- a/tests/canon4.test
+++ b/tests/canon4.test
@@ -22,6 +22,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
@@ -30,6 +31,8 @@ noinst_LIBRARIES = libx-y.a
 libx_y_a_SOURCES = xy.c
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
 
diff --git a/tests/canon6.test b/tests/canon6.test
index a24e2eb..dd2e44e 100755
--- a/tests/canon6.test
+++ b/tests/canon6.test
@@ -23,6 +23,7 @@ required='libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
@@ -32,6 +33,7 @@ libx_y_la_SOURCES = xy.c
 END
 
 : > ltmain.sh
+: > ar-lib
 
 $ACLOCAL
 $AUTOMAKE -a
diff --git a/tests/canon7.test b/tests/canon7.test
index 4a4d66f..48d1b88 100755
--- a/tests/canon7.test
+++ b/tests/canon7.test
@@ -21,6 +21,7 @@ required='cc libtool libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB  dnl: for static libraries
 AC_PROG_LIBTOOL dnl: for libtool libraries
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
diff --git a/tests/compile4.test b/tests/compile4.test
index c7e8a0e..4e07418 100755
--- a/tests/compile4.test
+++ b/tests/compile4.test
@@ -48,6 +48,7 @@ absmainobj=`pwd`/main.obj
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
diff --git a/tests/cond13.test b/tests/cond13.test
index 190f1e6..a63ee63 100755
--- a/tests/cond13.test
+++ b/tests/cond13.test
@@ -22,6 +22,7 @@
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [true])
@@ -47,6 +48,8 @@ endif
 libtest_a_SOURCES = $(TESTSOURCES)
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
 
diff --git a/tests/condlib.test b/tests/condlib.test
index 6051d9c..c46c91f 100755
--- a/tests/condlib.test
+++ b/tests/condlib.test
@@ -23,6 +23,7 @@
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AM_MAINTAINER_MODE
+AM_PROG_AR
 AC_PROG_CC
 END
 
@@ -35,6 +36,8 @@ nodist_librsaref_a_SOURCES = desc.c digit.c
 BUILT_SOURCES = $(nodist_librsaref_a_SOURCES)
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
 
diff --git a/tests/defs b/tests/defs
index 7b9db87..50b2381 100644
--- a/tests/defs
+++ b/tests/defs
@@ -718,6 +718,14 @@ do
       echo "$me: running java -version -help"
       java -version -help || skip_all_ "Sun Java interpreter not found"
       ;;
+    lib)
+      AR=lib
+      export AR
+      # Attempting to create an empty archive will actually not
+      # create the archive, but lib will output its version.
+      echo "$me: running $AR -out:defstest.lib"
+      $AR -out:defstest.lib || skip_ "Microsoft \`lib' utility not available"
+      ;;
     makedepend)
       echo "$me: running makedepend -f-"
       makedepend -f- \
diff --git a/tests/depcomp4.test b/tests/depcomp4.test
index 864e9b9..fc62990 100755
--- a/tests/depcomp4.test
+++ b/tests/depcomp4.test
@@ -21,6 +21,7 @@ required='libtoolize gcc makedepend'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/depcomp6.test b/tests/depcomp6.test
index 13e8c83..2d43c28 100755
--- a/tests/depcomp6.test
+++ b/tests/depcomp6.test
@@ -22,6 +22,7 @@ required=cc
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
diff --git a/tests/depcomp7.test b/tests/depcomp7.test
index 87f86b9..f553894 100755
--- a/tests/depcomp7.test
+++ b/tests/depcomp7.test
@@ -22,6 +22,7 @@ required='cc libtoolize'
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
index e1e9975..876f6aa 100755
--- a/tests/depcomp8b.test
+++ b/tests/depcomp8b.test
@@ -24,6 +24,7 @@ required='cc libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/discover.test b/tests/discover.test
index e54daff..5108265 100755
--- a/tests/discover.test
+++ b/tests/discover.test
@@ -21,6 +21,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
+AM_PROG_AR
 AC_PROG_CC
 AC_LIBOBJ([fsusage])
 AC_OUTPUT
@@ -33,6 +34,7 @@ libtu_a_LIBADD = @LIBOBJS@
 END
 
 : > fsusage.c
+: > ar-lib
 
 $ACLOCAL
 AUTOMAKE_fails
diff --git a/tests/extra-portability.test b/tests/extra-portability.test
new file mode 100755
index 0000000..353141f
--- /dev/null
+++ b/tests/extra-portability.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2011  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check interactions between the `portability' and `extra-portability'
+# warning categories:
+#   1. `-Wextra-portability' must imply `-Wportability'.
+#   2. `-Wno-portability' must imply `-Wno-extra-portability'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<END
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat >Makefile.am <<END
+EXTRA_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = sub/foo.c
+libfoo_a_CPPFLAGS = -Dwhatever
+END
+
+$ACLOCAL
+
+# Enabling extra-portability enables portability.
+AUTOMAKE_fails -Wnone -Wextra-portability
+# The expected diagnostic is
+#    Makefile.am:2: compiling `foo.c' with per-target flags requires 
`AM_PROG_CC_C_O' in `configure.in'
+#    .../lib/am/library.am: `libfoo.a': linking libraries using a non-POSIX
+#    .../lib/am/library.am: archiver requires `AM_PROG_AR' in `configure.in'
+#    Makefile.am:1:   while processing library `libfoo.a'
+grep 'requires.*AM_PROG_CC_C_O' stderr
+grep 'requires.*AM_PROG_AR' stderr
+
+# Disabling extra-portability leaves portability intact.
+AUTOMAKE_fails -Wall -Wno-extra-portability
+# The expected diagnostic is
+#    Makefile.am:2: compiling `foo.c' with per-target flags requires 
`AM_PROG_CC_C_O' in `configure.in'
+#    Makefile.am:1:   while processing library `libfoo.a'
+grep 'requires.*AM_PROG_CC_C_O' stderr
+grep 'requires.*AM_PROG_AR' stderr && Exit 1
+
+# Enabling portability does not enable extra-portability.
+AUTOMAKE_fails -Wnone -Wportability
+# The expected diagnostic is
+#    Makefile.am:2: compiling `foo.c' with per-target flags requires 
`AM_PROG_CC_C_O' in `configure.in'
+#    Makefile.am:1:   while processing library `libfoo.a'
+grep 'requires.*AM_PROG_CC_C_O' stderr
+grep 'requires.*AM_PROG_AR' stderr && Exit 1
+
+# Disabling portability disables extra-portability.
+$AUTOMAKE -Wall -Wno-portability
+
+:
diff --git a/tests/ar2.test b/tests/extra-portability2.test
similarity index 56%
copy from tests/ar2.test
copy to tests/extra-portability2.test
index a614949..cd8632b 100755
--- a/tests/ar2.test
+++ b/tests/extra-portability2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011  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
@@ -14,25 +14,39 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure AR and ARFLAGS are defined for EXTRA_LIBRARIES.
-# Report from Kevin Ryde.
+# Make sure that extra-portability warnings are not enabled by --gnits,
+# --gnu and --foreign.
 
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+set -e
+
+# We want complete control over automake options.
+AUTOMAKE=$am_original_AUTOMAKE
+
+cat >>configure.in <<END
 AC_PROG_CC
 AC_PROG_RANLIB
 AC_OUTPUT
 END
 
-cat > Makefile.am << 'END'
+cat >Makefile.am <<END
 EXTRA_LIBRARIES = libfoo.a
 libfoo_a_SOURCES = foo.c
 END
 
 $ACLOCAL
-$AUTOMAKE
-grep '^ARFLAGS =' Makefile.in
-grep '^AR =' Makefile.in
+
+# Make sure the test is useful.
+AUTOMAKE_fails -Wextra-portability \
+  || fatal_ "setup doesn't trigger \`extra-portability' warnings"
+
+$AUTOMAKE --foreign
+
+touch INSTALL NEWS README AUTHORS ChangeLog COPYING # Satisfy --gnu.
+$AUTOMAKE --gnu
+
+touch THANKS # Satisfy also --gnits.
+$AUTOMAKE --gnits
 
 :
diff --git a/tests/extra9.test b/tests/extra9.test
index 1446a4d..7a9cdaa 100755
--- a/tests/extra9.test
+++ b/tests/extra9.test
@@ -26,6 +26,7 @@
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_SUBST([lib_LIBRARIES])
 AC_SUBST([bins])
@@ -36,6 +37,8 @@ cat >Makefile.am <<'END'
 bin_PROGRAMS = @bins@
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'bin_PROGRAMS.*contains configure substitution' stderr
diff --git a/tests/extradep.test b/tests/extradep.test
index 8740827..c32b44b 100755
--- a/tests/extradep.test
+++ b/tests/extradep.test
@@ -21,6 +21,7 @@ required=cc
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_SUBST([deps], [bardep])
 AM_CONDITIONAL([COND], [test -n "$cond"])
diff --git a/tests/extradep2.test b/tests/extradep2.test
index b059be4..f6ad8c7 100755
--- a/tests/extradep2.test
+++ b/tests/extradep2.test
@@ -21,6 +21,7 @@ required='cc libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_SUBST([deps], [bardep])
 AC_OUTPUT
diff --git a/tests/fort5.test b/tests/fort5.test
index eb2414a..3927c32 100755
--- a/tests/fort5.test
+++ b/tests/fort5.test
@@ -54,6 +54,7 @@ AC_PROG_FC
 AC_FC_SRCEXT([f90], [],
   [AC_MSG_FAILURE([$FC compiler cannot create executables], 77)])
 AC_FC_LIBRARY_LDFLAGS
+AM_PROG_AR
 LT_PREREQ([2.0])
 AC_PROG_LIBTOOL
 AC_OUTPUT
diff --git a/tests/help-maintainer.test b/tests/help-maintainer.test
deleted file mode 100755
index 7ddfb61..0000000
--- a/tests/help-maintainer.test
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure that our macro `AM_MAINTAINER_MODE' adds proper text to
-# the configure help screen.
-
-. ./defs || Exit 1
-
-cat > configure.in <<END
-AC_INIT([$me], [1.0])
-AM_MAINTAINER_MODE
-END
-
-cat configure.in # For debugging.
-$ACLOCAL
-$AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP '^  *--enable-maintainer-mode( |$)' stdout
-$FGREP ' enable make rules' stdout
-
-rm -rf autom4te*.cache # Just to be sure.
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in >t
-mv -f t configure.in
-
-cat configure.in # For debugging.
-$ACLOCAL
-$AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP '^  *--enable-maintainer-mode( |$)' stdout
-$FGREP ' enable make rules' stdout
-
-rm -rf autom4te*.cache # Just to be sure.
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in >t
-mv -f t configure.in
-
-cat configure.in # For debugging.
-$ACLOCAL
-$AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP '^  *--disable-maintainer-mode( |$)' stdout
-$FGREP ' disable make rules' stdout
-
-:
diff --git a/tests/install-info-dir.test b/tests/install-info-dir.test
new file mode 100755
index 0000000..f75b115
--- /dev/null
+++ b/tests/install-info-dir.test
@@ -0,0 +1,140 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Checks on the `install-info' target.
+# Details about the individual checks' purposes and motivations are
+# inlined, below.
+
+# FIXME: this test is a good candidate for a conversion to TAP,
+# FIXME: and could be merged with `txinfo27.test'.
+
+required=makeinfo
+. ./defs || Exit 1
+
+cwd=`pwd` || fatal_ "cannot get current working directory"
+
+mkdir bin
+saved_PATH=$PATH; export saved_PATH
+PATH=$cwd/bin$PATH_SEPARATOR$PATH; export PATH
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foo.texi
+END
+
+cat > foo.texi << 'END'
+\input texinfo
address@hidden foo.info
address@hidden Top
+Hello world!
address@hidden
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+instdir=_inst
+destdir=_dest
+
+./configure --prefix="$cwd/$instdir" --infodir="$cwd/$instdir/info"
+
+$MAKE info
+test -f foo.info
+
+if install-info --version; then
+  have_installinfo=yes
+else
+  have_installinfo=no
+fi
+
+# The `install-info' target updates the `${infodir}/dir' file
+# by default (if the `install-info' program is available).
+# This should happen in a normal as well as in a DESTDIR installation.
+if test $have_installinfo = yes; then
+  $MAKE install-info
+  test -f $instdir/info/foo.info
+  test -f $instdir/info/dir
+  $MAKE DESTDIR="$cwd/$destdir" install-info
+  test -f "$destdir/$cwd/$instdir"/info/foo.info
+  test -f "$destdir/$cwd/$instdir"/info/dir
+fi
+
+rm -rf $instdir $destdir
+
+# The `install-info' target doesn't fail if the `install-info'
+# program is not available.
+cat > bin/install-info <<'END'
+#!/bin/sh
+echo error from install-info >&2
+exit 127
+END
+chmod a+x bin/install-info
+$MAKE install-info >output 2>&1 || { cat output; Exit 1; }
+cat output
+test -f $instdir/info/foo.info
+test ! -f $instdir/info/dir
+grep 'error from install-info' output && Exit 1
+
+rm -rf $instdir output
+
+if test $have_installinfo = yes; then
+  # The `install-info' target doesn't try to guess whether the `install-info'
+  # is the GNU or debian version.
+  unindent > bin/install-info <<'END'
+    #!/bin/sh
+    set -e; set -u;
+    for fd in 1 2; do
+      for str in dpkg debian Debian; do
+        eval "echo This is $str install-info >&$fd"
+      done
+    done
+    PATH=$saved_PATH; export PATH
+    exec install-info ${1+"$@"}
+END
+  $MAKE install-info
+  test -f $instdir/info/foo.info
+  test -f $instdir/info/dir
+fi
+
+rm -rf $instdir bin/install-info
+
+# The `AM_UPDATE_INFO_DIR' environment variable can be used to
+# prevent the creation or update of the `${infodir}/dir' file,
+# if set to a "no" value.
+for val in no NO n; do
+  rm -rf $instdir
+  env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
+  test -f $instdir/info/foo.info
+  test ! -f $instdir/info/dir
+done
+if test $have_installinfo = yes; then
+  for val in 'yes' 'who cares!'; do
+    rm -rf $instdir
+    env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
+    test -f $instdir/info/foo.info
+    test -f $instdir/info/dir
+  done
+fi
+
+rm -rf $instdir
+
+:
diff --git a/tests/instdir-ltlib.test b/tests/instdir-ltlib.test
index d84ae3c..6b8e8ca 100755
--- a/tests/instdir-ltlib.test
+++ b/tests/instdir-ltlib.test
@@ -24,6 +24,7 @@ required='cc libtoolize'
 cat >>configure.in <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_PATH_PYTHON
 AC_OUTPUT
diff --git a/tests/instdir-prog.test b/tests/instdir-prog.test
index cd591fb..3e77b10 100755
--- a/tests/instdir-prog.test
+++ b/tests/instdir-prog.test
@@ -24,6 +24,7 @@ required=cc
 cat >>configure.in <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_PATH_PYTHON
 AC_OUTPUT
diff --git a/tests/instfail-libtool.test b/tests/instfail-libtool.test
index 3d520f1..d137603 100755
--- a/tests/instfail-libtool.test
+++ b/tests/instfail-libtool.test
@@ -23,6 +23,7 @@ required='cc libtool libtoolize'
 . ./defs || Exit 1
 
 cat >>configure.in <<END
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/instfail.test b/tests/instfail.test
index 7631243..9d5b571 100755
--- a/tests/instfail.test
+++ b/tests/instfail.test
@@ -24,6 +24,7 @@ required=cc
 
 cat >>configure.in <<END
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_PATH_LISPDIR
 AC_OUTPUT
diff --git a/tests/instspc.tap b/tests/instspc.tap
index 5486346..9eb145f 100755
--- a/tests/instspc.tap
+++ b/tests/instspc.tap
@@ -73,6 +73,7 @@ create_input_data ()
 
   unindent >> configure.in << 'EOF'
     AC_PROG_CC
+    AM_PROG_AR
     AC_PROG_RANLIB
     AC_OUTPUT
 EOF
@@ -134,9 +135,9 @@ EOF
        test   -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
 EOF
 
-  $ACLOCAL  || framework_failure_ "aclocal failed"
-  $AUTOCONF || framework_failure_ "autoconf failed"
-  $AUTOMAKE || framework_failure_ "automake failed"
+  $ACLOCAL     || framework_failure_ "aclocal failed"
+  $AUTOCONF    || framework_failure_ "autoconf failed"
+  $AUTOMAKE -a || framework_failure_ "automake failed"
 }
 
 # ================= #
diff --git a/tests/ldflags.test b/tests/ldflags.test
index 96fb213..92fb42c 100755
--- a/tests/ldflags.test
+++ b/tests/ldflags.test
@@ -23,6 +23,7 @@ required=libtool
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_SUBST([LTLIBOBJS], [q.o])
 AM_CONDITIONAL([USE_SWIG], [:])
@@ -39,6 +40,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 : > q.c
diff --git a/tests/lex-lib.test b/tests/lex-lib.test
index 0cdc4b7..8339667 100755
--- a/tests/lex-lib.test
+++ b/tests/lex-lib.test
@@ -24,6 +24,7 @@ required='cc lex'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 LEXLIB=libmylex.a
 AC_PROG_LEX
diff --git a/tests/libobj-basic.test b/tests/libobj-basic.test
index 157dd01..a31d7eb 100755
--- a/tests/libobj-basic.test
+++ b/tests/libobj-basic.test
@@ -22,6 +22,7 @@ required=cc
 mv configure.in configure.proto
 cat >> configure.proto << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
@@ -77,6 +78,9 @@ cat > extra-checks.am << 'END'
 extra_checks = maude-src maude-dist liver-not-dist
 END
 
+# FIXME: improve support for "installcheck" here.
+cp "$top_testsrcdir/lib/ar-lib" . || Exit 99
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
diff --git a/tests/libobj10.test b/tests/libobj10.test
index d43cfc3..306d370 100755
--- a/tests/libobj10.test
+++ b/tests/libobj10.test
@@ -23,6 +23,7 @@ required=cc
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foo])
 AC_OUTPUT
@@ -38,6 +39,8 @@ foo.c:
        echo 'extern int dummy;' > $@
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
diff --git a/tests/libobj12.test b/tests/libobj12.test
index 89b70cf..73b1b61 100755
--- a/tests/libobj12.test
+++ b/tests/libobj12.test
@@ -21,6 +21,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foo])
 AC_LIBOBJ([bar])
@@ -42,6 +43,7 @@ p1_LDADD = @LIBOBJS@
 p2_SOURCES = bar.c
 END
 
+: > ar-lib
 : > foo.c
 : > bar.c
 
diff --git a/tests/libobj13.test b/tests/libobj13.test
index c572dd4..0022ea0 100755
--- a/tests/libobj13.test
+++ b/tests/libobj13.test
@@ -22,6 +22,7 @@ required='libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_LIBOBJ([foo])
 AC_OUTPUT
diff --git a/tests/libobj15a.test b/tests/libobj15a.test
index 044e3db..1889d63 100755
--- a/tests/libobj15a.test
+++ b/tests/libobj15a.test
@@ -20,6 +20,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foobar])
 END
@@ -30,6 +31,8 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = $(LIBOBJS)
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'configure\.in:.*required file.*foobar\.c.*' stderr
diff --git a/tests/libobj15b.test b/tests/libobj15b.test
index 4548a2a..03415c2 100755
--- a/tests/libobj15b.test
+++ b/tests/libobj15b.test
@@ -20,6 +20,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBSOURCE([foobar.c])
 # NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
@@ -33,6 +34,8 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = $(LIBOBJS)
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'configure\.in:.*required file.*foobar\.c.*' stderr
diff --git a/tests/libobj15c.test b/tests/libobj15c.test
index c39ac99..603e2eb 100755
--- a/tests/libobj15c.test
+++ b/tests/libobj15c.test
@@ -33,6 +33,9 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = $(LIBOBJS)
 END
 
+# Don't trip on errors due to missing `AM_PROG_AR'.
+AUTOMAKE="$AUTOMAKE -Wno-extra-portability"
+
 $ACLOCAL
 
 AUTOMAKE_fails
diff --git a/tests/libobj16a.test b/tests/libobj16a.test
index 5f5bfb7..4a5709a 100755
--- a/tests/libobj16a.test
+++ b/tests/libobj16a.test
@@ -23,6 +23,7 @@ required=cc
 mv configure.in configure.proto
 cat >> configure.proto << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 %LIBOBJ-STUFF% # Will be activated later.
 AC_OUTPUT
@@ -85,7 +86,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
 
 ./configure
 
diff --git a/tests/libobj16b.test b/tests/libobj16b.test
index 6738675..1326a9e 100755
--- a/tests/libobj16b.test
+++ b/tests/libobj16b.test
@@ -85,7 +85,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 
 ./configure
 
@@ -122,7 +122,7 @@ cat configure.in # For debugging.
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 
 ./configure MAUDE=yes
 $MAKE
diff --git a/tests/libobj17.test b/tests/libobj17.test
index 623c6bc..2089ae4 100755
--- a/tests/libobj17.test
+++ b/tests/libobj17.test
@@ -22,6 +22,7 @@ required=cc
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
+AM_PROG_AR
 foo=${FOO-oops}
 AC_LIBSOURCES([quux.c, zardoz.c])
 AC_LIBOBJ([$foo])
@@ -44,7 +45,7 @@ END
 
 # These might print warnings, but should not error out.
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -a
 $AUTOCONF
 
 ./configure FOO=quux
diff --git a/tests/libobj18.test b/tests/libobj18.test
index 5fba780..66188c6 100755
--- a/tests/libobj18.test
+++ b/tests/libobj18.test
@@ -20,6 +20,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 foo=dummy bar=dummy baz=dummy
 AC_LIBSOURCE([$foo.c])
diff --git a/tests/libobj19.test b/tests/libobj19.test
index ef6c7f7..7fb6531 100755
--- a/tests/libobj19.test
+++ b/tests/libobj19.test
@@ -22,6 +22,7 @@ required=cc
 cat >> configure.in << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foobar])
 AC_OUTPUT
@@ -52,6 +53,9 @@ cat > libobj-dir/foobar.c << 'END'
 extern int dummy;
 END
 
+# FIXME: improve support for "installcheck" here.
+cp "$top_testsrcdir/lib/ar-lib" . || Exit 99
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
diff --git a/tests/libobj2.test b/tests/libobj2.test
index 350f605..0f417a8 100755
--- a/tests/libobj2.test
+++ b/tests/libobj2.test
@@ -24,6 +24,7 @@ required=cc
 cat >> configure.in << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CHECK_TOOLS([AR], [ar])
 AC_LIBOBJ([fsusage])
@@ -55,7 +56,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 
 # Older grepping check, kept "just to be sure".
 $FGREP 'fsusage.c' subdir/Makefile.in
diff --git a/tests/libobj20a.test b/tests/libobj20a.test
index 2f90c84..b2f7063 100755
--- a/tests/libobj20a.test
+++ b/tests/libobj20a.test
@@ -22,6 +22,7 @@
 cat >> configure.in << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foo])
 END
@@ -34,6 +35,7 @@ END
 
 mkdir libobj-dir
 : > libobj-dir/foo.c
+: > ar-lib
 
 $ACLOCAL
 AUTOMAKE_fails
diff --git a/tests/libobj20b.test b/tests/libobj20b.test
index 216ba05..68a292b 100755
--- a/tests/libobj20b.test
+++ b/tests/libobj20b.test
@@ -22,6 +22,7 @@
 cat >> configure.in << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBSOURCE([foobar.c])
 # NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
@@ -36,6 +37,8 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = $(LIBOBJS)
 END
 
+: > ar-lib
+
 $ACLOCAL
 
 AUTOMAKE_fails
diff --git a/tests/libobj20c.test b/tests/libobj20c.test
index 91771b0..faeedc1 100755
--- a/tests/libobj20c.test
+++ b/tests/libobj20c.test
@@ -35,6 +35,9 @@ END
 
 $ACLOCAL
 
+# Don't trip on errors due to missing `AM_PROG_AR'.
+AUTOMAKE="$AUTOMAKE -Wno-extra-portability"
+
 AUTOMAKE_fails
 grep 'configure\.in:.*required directory.*\./libobj-dir' stderr
 
diff --git a/tests/libobj3.test b/tests/libobj3.test
index 04d4405..10686f4 100755
--- a/tests/libobj3.test
+++ b/tests/libobj3.test
@@ -22,6 +22,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
+AM_PROG_AR
 END
 
 cat > Makefile.am << 'END'
@@ -30,6 +31,8 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = @LIBOBJS@
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'Makefile\.am:3:.*LIBOBJS' stderr
diff --git a/tests/libobj7.test b/tests/libobj7.test
index 22207d7..d18671c 100755
--- a/tests/libobj7.test
+++ b/tests/libobj7.test
@@ -22,6 +22,7 @@ required=cc
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 # `am__dummy_function' is there to ensure that at least one function is
 # replaced, to avoid creating an empty archive which can cause problems
@@ -61,7 +62,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
 
 ./configure
 
diff --git a/tests/library.test b/tests/library.test
index e3a9813..8ad40f1 100755
--- a/tests/library.test
+++ b/tests/library.test
@@ -23,6 +23,7 @@ cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AM_MAINTAINER_MODE
 AC_PROG_CC
+AM_PROG_AR
 END
 
 cat > Makefile.am << 'END'
@@ -31,6 +32,7 @@ lib_LIBRARIES = libfoo.a
 libfoo_a_DEPENDENCIES = libzot.a
 END
 
+: > ar-lib
 $ACLOCAL
 $AUTOMAKE
 
diff --git a/tests/library2.test b/tests/library2.test
index 69f387a..7bd3e62 100755
--- a/tests/library2.test
+++ b/tests/library2.test
@@ -18,10 +18,14 @@
 
 . ./defs || Exit 1
 
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
 cat > Makefile.am << 'END'
 EXTRA_LIBRARIES = libfoo.a
 END
 
 $ACLOCAL
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-portability
 grep AC_PROG_RANLIB stderr
diff --git a/tests/libtoo10.test b/tests/libtoo10.test
index 0d999dc..f0f2e32 100755
--- a/tests/libtoo10.test
+++ b/tests/libtoo10.test
@@ -21,6 +21,7 @@ required='cc libtoolize'
 . ./defs || Exit 1
 
 cat >> configure.in << 'END'
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/libtool2.test b/tests/libtool2.test
index 6e268dd..f2fe1af 100755
--- a/tests/libtool2.test
+++ b/tests/libtool2.test
@@ -22,6 +22,7 @@ required=libtoolize
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
diff --git a/tests/libtool3.test b/tests/libtool3.test
index 86a04b4..ad0f8c5 100755
--- a/tests/libtool3.test
+++ b/tests/libtool3.test
@@ -22,6 +22,7 @@ required='cc libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/libtool5.test b/tests/libtool5.test
index 4bec20d..23cf062 100755
--- a/tests/libtool5.test
+++ b/tests/libtool5.test
@@ -25,6 +25,7 @@ cat >>configure.in <<'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [false])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/libtool6.test b/tests/libtool6.test
index a17e4ee..c4ae469 100755
--- a/tests/libtool6.test
+++ b/tests/libtool6.test
@@ -24,6 +24,7 @@ cat >>configure.in <<'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [false])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/libtool7.test b/tests/libtool7.test
index 90ae862..574b285 100755
--- a/tests/libtool7.test
+++ b/tests/libtool7.test
@@ -22,6 +22,7 @@ required='cc libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_OUTPUT
diff --git a/tests/libtool8.test b/tests/libtool8.test
index d539dc4..3aefcf8 100755
--- a/tests/libtool8.test
+++ b/tests/libtool8.test
@@ -23,6 +23,7 @@ cat >>configure.in <<'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [false])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/libtool9.test b/tests/libtool9.test
index ab6266e..d21ff55 100755
--- a/tests/libtool9.test
+++ b/tests/libtool9.test
@@ -25,6 +25,7 @@ required='cc libtoolize'
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_OUTPUT
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index d8473e3..e8d192e 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -75,8 +75,19 @@ amopts-variable-expansion.test \
 amsubst.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 \
@@ -375,6 +386,8 @@ extra10.test \
 extra11.test \
 extra12.test \
 extra-programs-empty.test \
+extra-portability.test \
+extra-portability2.test \
 extradep.test \
 extradep2.test \
 f90only.test \
@@ -419,7 +432,6 @@ help-depend2.test \
 help-dmalloc.test \
 help-init.test \
 help-lispdir.test \
-help-maintainer.test \
 help-multilib.test \
 help-python.test \
 help-regex.test \
@@ -457,6 +469,7 @@ instman2.test \
 instmany.test \
 instmany-mans.test \
 instmany-python.test \
+install-info-dir.test \
 interp.test \
 interp2.test \
 java.test \
@@ -568,6 +581,7 @@ lzma.test \
 m4-inclusion.test \
 maintclean.test \
 maintclean-vpath.test \
+maintmode-configure-msg.test \
 make.test \
 makej.test \
 makej2.test \
diff --git a/tests/listval.test b/tests/listval.test
index 677fe3f..6bd933d 100755
--- a/tests/listval.test
+++ b/tests/listval.test
@@ -23,6 +23,7 @@ required=libtool
 
 cat >> configure.in << 'END'
 AC_SUBST([LTLIBOBJS])
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
@@ -36,6 +37,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 
diff --git a/tests/location.test b/tests/location.test
index f96a09e..eee4797 100755
--- a/tests/location.test
+++ b/tests/location.test
@@ -22,6 +22,7 @@ cat >> configure.in << 'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [true])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
@@ -42,6 +43,8 @@ VAR = 1 \
       3
 END
 
+: > ar-lib
+
 # Smash the useless difference of lib file locations.
 smash_useless_diffs ()
 {
diff --git a/tests/ltcond.test b/tests/ltcond.test
index 2dc64e0..6af0ee1 100755
--- a/tests/ltcond.test
+++ b/tests/ltcond.test
@@ -25,6 +25,7 @@ AM_CONDITIONAL([WANT_LIBFOO], [true])
 AM_CONDITIONAL([WANT_LIBBAR], [false])
 AC_SUBST([WANTEDLIBS], ['lib1foo.la lib1bar.la'])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/ltcond2.test b/tests/ltcond2.test
index 42da11b..4f28cc6 100755
--- a/tests/ltcond2.test
+++ b/tests/ltcond2.test
@@ -21,6 +21,7 @@ required='cc native libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_SUBST([HELLO_SYSTEM], [hello-generic.lo])
 AM_CONDITIONAL([LINUX], [true])
diff --git a/tests/ltconv.test b/tests/ltconv.test
index c0a1099..00c8cd7 100755
--- a/tests/ltconv.test
+++ b/tests/ltconv.test
@@ -22,6 +22,7 @@ required='cc native libtoolize'
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_CONFIG_FILES([sub1/Makefile
                  sub2/Makefile
diff --git a/tests/ltdeps.test b/tests/ltdeps.test
index 3c41ec3..8f47402 100755
--- a/tests/ltdeps.test
+++ b/tests/ltdeps.test
@@ -20,6 +20,7 @@ required=libtool
 . ./defs || Exit 1
 
 cat >> configure.in << 'END'
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_PROG_CXX
 AM_CONDITIONAL(HACKING_COMPACT_BUILD, whatever)
@@ -49,6 +50,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 
diff --git a/tests/ltinit.test b/tests/ltinit.test
index a6131f9..64bc679 100755
--- a/tests/ltinit.test
+++ b/tests/ltinit.test
@@ -23,6 +23,7 @@ required='cc libtoolize'
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 dnl Older libtool versions don't define LT_PREREQ :-(
 m4_ifdef([LT_PREREQ],
     [LT_PREREQ([2.0])],
diff --git a/tests/ltinstloc.test b/tests/ltinstloc.test
index dd1c5d6..506ae8d 100755
--- a/tests/ltinstloc.test
+++ b/tests/ltinstloc.test
@@ -22,6 +22,7 @@ required='libtoolize'
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_CONDITIONAL([COND], [:])
 AC_OUTPUT
@@ -44,7 +45,7 @@ AUTOMAKE_fails --add-missing
 # libtoolize might have installed config.guess and config.sub already,
 # and autom4te might warn about bugs in Libtool macro files, so filter
 # out warnings about Makefile.am only.  We don't care in this test
-# whether automake installs config.guess and config.sub.
+# whether automake installs config.guess, config.sub and ar-lib.
 
 cat >expected <<'END'
 Makefile.am:5: error: sub/liba2.la multiply defined in condition COND
diff --git a/tests/ltlibobjs.test b/tests/ltlibobjs.test
index 9a3d830..e430cdd 100755
--- a/tests/ltlibobjs.test
+++ b/tests/ltlibobjs.test
@@ -22,6 +22,7 @@ required=libtool
 
 cat >> configure.in << 'END'
 AC_SUBST([LTLIBOBJS])
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
@@ -33,6 +34,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 
diff --git a/tests/ltlibsrc.test b/tests/ltlibsrc.test
index f150626..aea10d8 100755
--- a/tests/ltlibsrc.test
+++ b/tests/ltlibsrc.test
@@ -21,6 +21,7 @@ required='cc libtool'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/ltorder.test b/tests/ltorder.test
index 7c4b78c..594a2f4 100755
--- a/tests/ltorder.test
+++ b/tests/ltorder.test
@@ -21,6 +21,7 @@ required='cc libtoolize'
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/maintmode-configure-msg.test 
b/tests/maintmode-configure-msg.test
new file mode 100755
index 0000000..5771392
--- /dev/null
+++ b/tests/maintmode-configure-msg.test
@@ -0,0 +1,79 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_MAINTAINER_MODE' adds proper text to
+# the configure help screen.  Also make sure the "checking ..." messages
+# related to the enabling/disabling of maintainer mode are correct (see
+# automake bug#9890).
+
+. ./defs || Exit 1
+
+set -e
+
+set_maintmode ()
+{
+  rm -rf autom4te*.cache # Just to be sure not to use a stale cache.
+  echo "AC_INIT([$me], [1.0])" > configure.in
+  case $1 in
+    DEFAULT) echo AM_MAINTAINER_MODE;;
+          *) echo "AM_MAINTAINER_MODE([$*])";;
+  esac >> configure.in
+}
+
+check_configure_message_with ()
+{
+  answer=$1; shift
+  ./configure ${1+"$@"} >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  grep "^checking whether to enable maintainer-specific.*\\.\\.\\. $answer$" 
stdout
+  test `grep -c 'checking.*maint' stdout` -eq 1
+  :
+}
+
+set_maintmode "DEFAULT"
+
+$ACLOCAL
+
+$AUTOCONF --force
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^  *--enable-maintainer-mode.* enable make rules' stdout
+
+check_configure_message_with "no"
+check_configure_message_with "yes" --enable-maintainer-mode
+
+set_maintmode "disable"
+
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^  *--enable-maintainer-mode.* enable make rules' stdout
+
+check_configure_message_with "no"
+check_configure_message_with "yes" --enable-maintainer-mode
+
+set_maintmode "enable"
+
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^  *--disable-maintainer-mode.* disable make rules' stdout
+
+check_configure_message_with "yes"
+check_configure_message_with "no" --disable-maintainer-mode
+
+:
diff --git a/tests/multlib.test b/tests/multlib.test
index d196efd..abb5a16 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -65,6 +65,7 @@ AC_CONFIG_SRCDIR(foo.c)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_ENABLE_MULTILIB(Makefile,[..])
 AC_CONFIG_FILES([Makefile])
@@ -88,6 +89,7 @@ AC_INIT(libbar, 0.1, address@hidden)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_ENABLE_MULTILIB(Makefile,[..])
 AC_CONFIG_FILES([Makefile sub/Makefile])
diff --git a/tests/nobase-libtool.test b/tests/nobase-libtool.test
index c9e057a..43c0702 100755
--- a/tests/nobase-libtool.test
+++ b/tests/nobase-libtool.test
@@ -24,6 +24,7 @@ required='cc libtoolize'
 
 cat >> configure.in <<'EOF'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 EOF
diff --git a/tests/nobase.test b/tests/nobase.test
index aca646a..231eb73 100755
--- a/tests/nobase.test
+++ b/tests/nobase.test
@@ -22,6 +22,7 @@ required=cc
 
 cat >> configure.in <<'EOF'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 EOF
diff --git a/tests/noinstdir.test b/tests/noinstdir.test
index 92f59ff..329990e 100755
--- a/tests/noinstdir.test
+++ b/tests/noinstdir.test
@@ -34,9 +34,12 @@ END
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
 
diff --git a/tests/pluseq7.test b/tests/pluseq7.test
index 3322a54..f8ceefa 100755
--- a/tests/pluseq7.test
+++ b/tests/pluseq7.test
@@ -32,7 +32,8 @@ AR += qq
 END
 
 $ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:3:.*AR' stderr
+AUTOMAKE_fails -Wno-portability
+q="[\`'\"]"
+grep "^Makefile\.am:3:.* AR .* with $q=$q before .*$q+=$q" stderr
 
 :
diff --git a/tests/posixsubst-ldadd.test b/tests/posixsubst-ldadd.test
index 5d3072b..4fb7df9 100755
--- a/tests/posixsubst-ldadd.test
+++ b/tests/posixsubst-ldadd.test
@@ -23,6 +23,7 @@ required=cc
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
+AM_PROG_AR
 AC_OUTPUT
 END
 
@@ -67,7 +68,7 @@ echo 'int quux3(void) { return 0; }' > libquux3.c
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 
 ./configure
 $MAKE
diff --git a/tests/posixsubst-libraries.test b/tests/posixsubst-libraries.test
index 3565caf..f6d1b86 100755
--- a/tests/posixsubst-libraries.test
+++ b/tests/posixsubst-libraries.test
@@ -24,6 +24,7 @@ required=cc
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
+AM_PROG_AR
 AC_OUTPUT
 END
 
@@ -51,7 +52,7 @@ echo 'int bar2(void) { return 0; }' > libfoo2.c
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 
 cwd=`pwd` || Exit 1
 ./configure --prefix="$cwd/_inst"
diff --git a/tests/posixsubst-ltlibraries.test 
b/tests/posixsubst-ltlibraries.test
index d4f6f74..ffd09ae 100755
--- a/tests/posixsubst-ltlibraries.test
+++ b/tests/posixsubst-ltlibraries.test
@@ -23,6 +23,7 @@ required='cc libtool libtoolize'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test
index c27c2be..53dae5e 100755
--- a/tests/pr300-lib.test
+++ b/tests/pr300-lib.test
@@ -43,7 +43,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --copy --add-missing
+$AUTOMAKE -Wno-extra-portability --copy --add-missing
 
 ./configure --prefix "`pwd`/inst"
 
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index 43a1b8d..18201e6 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -42,7 +42,7 @@ END
 libtoolize
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --copy --add-missing
+$AUTOMAKE -Wno-extra-portability --copy --add-missing
 
 ./configure --prefix "`pwd`/inst"
 
diff --git a/tests/pr307.test b/tests/pr307.test
index 9db74c0..24dd021 100755
--- a/tests/pr307.test
+++ b/tests/pr307.test
@@ -66,7 +66,7 @@ done
 libtoolize --force
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE -Wno-extra-portability -a
 
 # Sanity check: make sure the variable we are attempting to force
 # is indeed used by configure.
diff --git a/tests/pr401.test b/tests/pr401.test
index 7a2662b..cef770b 100755
--- a/tests/pr401.test
+++ b/tests/pr401.test
@@ -81,7 +81,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 ./configure
 $MAKE distcheck
 
@@ -97,7 +97,7 @@ mv -f configure.int configure.in
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -108,7 +108,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @LIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-extra-portability
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -141,7 +141,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
+$AUTOMAKE -Wno-extra-portability --add-missing
 ./configure
 test ! -d src/lib
 test ! -d 'src/$(top_builddir)'
@@ -180,7 +180,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 ./configure
 $MAKE distcheck
 
diff --git a/tests/pr401b.test b/tests/pr401b.test
index ad14b4d..961f638 100755
--- a/tests/pr401b.test
+++ b/tests/pr401b.test
@@ -82,7 +82,7 @@ EOF
 libtoolize
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE -Wno-extra-portability -a
 ./configure
 $MAKE distcheck
 
@@ -98,7 +98,7 @@ mv -f configure.int configure.in
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE -Wno-extra-portability -a
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -109,7 +109,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @LTLIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-extra-portability
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -141,7 +141,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
+$AUTOMAKE -Wno-extra-portability --add-missing
 ./configure
 test ! -d src/lib
 test ! -d 'src/$(top_builddir)'
@@ -180,7 +180,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 ./configure
 $MAKE distcheck
 
diff --git a/tests/pr401c.test b/tests/pr401c.test
index 8649b91..ee38cb2 100755
--- a/tests/pr401c.test
+++ b/tests/pr401c.test
@@ -83,7 +83,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 ./configure
 $MAKE distcheck
 
@@ -100,7 +100,7 @@ mv -f configure.int configure.in
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -111,7 +111,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @ALLOCA@/' src/t > src/Makefile.am
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-extra-portability
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -144,7 +144,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
+$AUTOMAKE -Wno-extra-portability --add-missing
 ./configure
 $MAKE
 test ! -d src/lib
@@ -183,7 +183,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 ./configure
 $MAKE distcheck
 
diff --git a/tests/pr72.test b/tests/pr72.test
index 8c52d2d..20db128 100755
--- a/tests/pr72.test
+++ b/tests/pr72.test
@@ -38,7 +38,7 @@ END
 : > config.sub
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 
 grep '^LINK =' Makefile.in
 
diff --git a/tests/primary-prefix-couples-documented-valid.test 
b/tests/primary-prefix-couples-documented-valid.test
index 134c212..5bd9160 100755
--- a/tests/primary-prefix-couples-documented-valid.test
+++ b/tests/primary-prefix-couples-documented-valid.test
@@ -22,6 +22,7 @@
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 AM_PROG_GCJ
diff --git a/tests/primary-prefix-couples-force-valid.test 
b/tests/primary-prefix-couples-force-valid.test
index b462a7d..405f606 100755
--- a/tests/primary-prefix-couples-force-valid.test
+++ b/tests/primary-prefix-couples-force-valid.test
@@ -28,6 +28,7 @@ required=cc
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
@@ -73,7 +74,7 @@ END
 : > bar.h
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -a
 $AUTOCONF
 
 cwd=`pwd` || fatal_ "cannot get current working directory"
diff --git a/tests/primary-prefix-invalid-couples.tap 
b/tests/primary-prefix-invalid-couples.tap
index b51fca3..297d559 100755
--- a/tests/primary-prefix-invalid-couples.tap
+++ b/tests/primary-prefix-invalid-couples.tap
@@ -26,6 +26,7 @@ plan_ "later"
 
 oIFS=$IFS # Saved for later.
 
+: > ar-lib
 : > ltmain.sh
 : > texinfo.tex
 : > elisp-comp
@@ -35,6 +36,7 @@ oIFS=$IFS # Saved for later.
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_SUBST([LIBTOOL], [:]) dnl So that we don't have to require Libtool.
 AM_PROG_GCJ
diff --git a/tests/primary-prefix-valid-couples.test 
b/tests/primary-prefix-valid-couples.test
index f25db95..e075db6 100755
--- a/tests/primary-prefix-valid-couples.test
+++ b/tests/primary-prefix-valid-couples.test
@@ -21,6 +21,7 @@
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 AM_PATH_PYTHON
@@ -41,6 +42,7 @@ echo '@setfilename foo' > foo.texi
 : > texinfo.tex
 : > py-compile
 : > elisp-comp
+: > ar-lib
 
 # Setup Makefile.am.
 
diff --git a/tests/python-virtualenv.test b/tests/python-virtualenv.test
index 5ddd8fb..7004446 100755
--- a/tests/python-virtualenv.test
+++ b/tests/python-virtualenv.test
@@ -45,6 +45,7 @@ AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_SUBST([MY_VIRTENV], ['$cwd/virtenv'])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_PATH_PYTHON
 AC_OUTPUT
diff --git a/tests/silent3.test b/tests/silent3.test
index 24edaf7..7f4322b 100755
--- a/tests/silent3.test
+++ b/tests/silent3.test
@@ -27,6 +27,7 @@ cat >>configure.in <<'EOF'
 AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
+AM_PROG_AR
 AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 AC_OUTPUT
diff --git a/tests/silent4.test b/tests/silent4.test
index 06a02ef..9618791 100755
--- a/tests/silent4.test
+++ b/tests/silent4.test
@@ -28,6 +28,7 @@ cat >>configure.in <<'EOF'
 AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
+AM_PROG_AR
 AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 AC_OUTPUT
diff --git a/tests/silent9.test b/tests/silent9.test
index 62c4d89..a8c71cd 100755
--- a/tests/silent9.test
+++ b/tests/silent9.test
@@ -28,6 +28,7 @@ AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 EOF
diff --git a/tests/specflg-dummy.test b/tests/specflg-dummy.test
index 0f4f33a..ce71b68 100755
--- a/tests/specflg-dummy.test
+++ b/tests/specflg-dummy.test
@@ -59,6 +59,7 @@ AC_PROG_LEX
 AC_PROG_F77
 AC_PROG_FC
 AM_PROG_GCJ
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 AM_PROG_UPC
diff --git a/tests/specflg2.test b/tests/specflg2.test
index 1c4d69a..e246a2b 100755
--- a/tests/specflg2.test
+++ b/tests/specflg2.test
@@ -23,6 +23,7 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CXX
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
@@ -34,6 +35,8 @@ libfoo_a_CFLAGS = -DBAR
 libfoo_a_CXXFLAGS = -DZOT
 END
 
+: > ar-lib
+
 # Make sure `compile' is required.
 $ACLOCAL
 AUTOMAKE_fails
diff --git a/tests/stdlib.test b/tests/stdlib.test
index edd68b0..0d986da 100755
--- a/tests/stdlib.test
+++ b/tests/stdlib.test
@@ -21,15 +21,33 @@
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = sub/foo
+include $(srcdir)/foo.mk
 END
 
+cat > foo.mk << 'END'
+## A dummy automake comment.
+a = x \
+    y
+# A dummy make comment.
+lib_LIBRARIES = zardoz.a
+END
+
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
+q="[\`'\"]"
+badname='not a standard library name'
 # We're specifically testing for line-number information.
-grep 'Makefile.am:1:.*sub/foo.*standard library name' stderr
-grep 'Makefile.am:1:.*sub/libfoo.a.*' stderr
+grep "^Makefile\\.am:1:.*${q}sub/foo${q}.*$badname" stderr
+grep "^Makefile\\.am:1:.*sub/libfoo\\.a" stderr
+grep "^foo\\.mk:5:.*${q}zardoz\\.a${q}.*$badname" stderr
+grep "^foo\\.mk:5:.*libzardoz\\.a" stderr
+
+:
diff --git a/tests/stdlib2.test b/tests/stdlib2.test
index b23e540..7ee99e2 100755
--- a/tests/stdlib2.test
+++ b/tests/stdlib2.test
@@ -30,6 +30,7 @@ required=libtool
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/strip2.test b/tests/strip2.test
index 9e1c5ff..2938304 100755
--- a/tests/strip2.test
+++ b/tests/strip2.test
@@ -22,6 +22,7 @@ required='cc strip'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
diff --git a/tests/strip3.test b/tests/strip3.test
index 51e04d5..46c1303 100755
--- a/tests/strip3.test
+++ b/tests/strip3.test
@@ -22,6 +22,7 @@ required='cc libtoolize strip'
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/subdir4.test b/tests/subdir4.test
index 5dd5161..a298415 100755
--- a/tests/subdir4.test
+++ b/tests/subdir4.test
@@ -25,6 +25,7 @@ mkdir lib src
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AC_PROG_CC
+AM_PROG_AR
 AC_CONFIG_FILES([lib/Makefile src/Makefile])
 AC_OUTPUT
 END
@@ -55,6 +56,8 @@ cat > src/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE --gnu
 
diff --git a/tests/subdirbuiltsources.test b/tests/subdirbuiltsources.test
index 5401f97..ea48109 100755
--- a/tests/subdirbuiltsources.test
+++ b/tests/subdirbuiltsources.test
@@ -27,6 +27,7 @@ cat >> configure.in << 'END'
 AC_CONFIG_FILES([lib/Makefile])
 AC_PROG_RANLIB
 AC_PROG_CC
+AM_PROG_AR
 AC_OUTPUT
 END
 
diff --git a/tests/subobj10.test b/tests/subobj10.test
index 92cca4a..db071d6 100755
--- a/tests/subobj10.test
+++ b/tests/subobj10.test
@@ -24,6 +24,7 @@ AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([subdir-objects])
 
 AM_PROG_AS
+AM_PROG_AR
 AC_PROG_RANLIB
 
 AC_CONFIG_FILES([Makefile])
diff --git a/tests/subobj9.test b/tests/subobj9.test
index f25349c..edc9e5f 100755
--- a/tests/subobj9.test
+++ b/tests/subobj9.test
@@ -30,6 +30,7 @@ cat > configure.in << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_CXX
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/tests/subpkg-yacc.test b/tests/subpkg-yacc.test
index a9d19e9..76cbf42 100755
--- a/tests/subpkg-yacc.test
+++ b/tests/subpkg-yacc.test
@@ -55,6 +55,7 @@ AC_PROG_RANLIB
 AC_PROG_YACC
 dnl This comes after YACC and RANLIB checks, deliberately.
 AC_PROG_CC
+AM_PROG_AR
 AC_CONFIG_HEADERS([config.h:config.hin])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/tests/subpkg.test b/tests/subpkg.test
index 48e3cf6..eb6d81a 100755
--- a/tests/subpkg.test
+++ b/tests/subpkg.test
@@ -65,6 +65,7 @@ mkdir lib/src
 cat >lib/configure.ac <<'EOF'
 AC_INIT([lib], [2.3])
 AM_INIT_AUTOMAKE
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_HEADERS([config.h:config.hin])
 AC_CONFIG_FILES([Makefile])
diff --git a/tests/subst3.test b/tests/subst3.test
index d87f744..6780671 100755
--- a/tests/subst3.test
+++ b/tests/subst3.test
@@ -22,6 +22,7 @@ required=cc
 
 cat >> configure.in <<'EOF'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 if test -n "$doit"; then
   AC_SUBST([basehdr], [sub/base.h])
diff --git a/tests/substtarg.test b/tests/substtarg.test
index d20c346..1cd5af0 100755
--- a/tests/substtarg.test
+++ b/tests/substtarg.test
@@ -23,6 +23,7 @@
 cat >> configure.in << 'END'
 AC_CONFIG_SOURCE([fakelib.c])
 AC_PROG_CC
+AM_PROG_AR
 RANLIB=:
 AC_SUBST([RANLIB])
 SUBST=hei
@@ -40,6 +41,8 @@ address@hidden@.a: Makefile $(address@hidden@_a_OBJECTS) 
$(address@hidden@_a_DEPEND
        @echo here we do some custom stuff, instead of invoking the linker
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'address@hidden@.a' stderr
diff --git a/tests/suffix.test b/tests/suffix.test
index 0c29881..9f0a5ff 100755
--- a/tests/suffix.test
+++ b/tests/suffix.test
@@ -31,16 +31,28 @@ noinst_PROGRAMS = foo
 noinst_LIBRARIES = libbar.a
 END
 
-$ACLOCAL
+for use_arlib in false :; do
 
-$AUTOMAKE -i
-grep '^ *\.c' Makefile.in # For debugging.
-test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+  if $use_arlib; then
+    am_warns=
+    echo AM_PROG_AR >> configure.in
+    : > ar-lib
+  else
+    am_warns=-Wno-extra-portability
+  fi
 
-$AUTOMAKE
-grep '^ *\.c' Makefile.in # For debugging.
-test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+  $ACLOCAL --force
+
+  $AUTOMAKE $am_warns -i
+  grep '^ *\.c' Makefile.in # For debugging.
+  test `grep -c '^\.c\.o:' Makefile.in` -eq 1
+  test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+
+  $AUTOMAKE $am_warns
+  grep '^ *\.c' Makefile.in # For debugging.
+  test `grep -c '^\.c\.o:' Makefile.in` -eq 1
+  test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+
+done
 
 :
diff --git a/tests/suffix10.tap b/tests/suffix10.tap
index 2999524..2d66f3b 100755
--- a/tests/suffix10.tap
+++ b/tests/suffix10.tap
@@ -25,6 +25,7 @@ plan_ 7
 cat >>configure.in <<EOF
 AC_PROG_CC
 AC_PROG_YACC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 EOF
diff --git a/tests/suffix2.test b/tests/suffix2.test
index 2b73279..513d017 100755
--- a/tests/suffix2.test
+++ b/tests/suffix2.test
@@ -24,6 +24,7 @@ required=libtoolize
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
@@ -41,12 +42,12 @@ END
 
 $ACLOCAL
 
-$AUTOMAKE -i
+$AUTOMAKE -a
 grep '^ *\.c' Makefile.in # For debugging.
 test `grep -c '^\.c\.o:' Makefile.in` -eq 1
 test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
 
-$AUTOMAKE
+$AUTOMAKE -i
 grep '^ *\.c' Makefile.in # For debugging.
 test `grep -c '^\.c\.o:' Makefile.in` -eq 1
 test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
diff --git a/tests/suffix5.test b/tests/suffix5.test
index 3061497..113a40a 100755
--- a/tests/suffix5.test
+++ b/tests/suffix5.test
@@ -23,6 +23,7 @@ required='cc libtool'
 
 cat >> configure.in << 'END'
 AC_SUBST([LINK], [:])
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
@@ -45,7 +46,11 @@ END
 
 : > ltmain.sh
 
-cp "$am_scriptdir/config.guess" "$am_scriptdir/config.sub" .
+# FIXME: better support for installcheck.
+for auxscript in ar-lib config.guess config.sub; do
+  cp "$top_testsrcdir/lib/$auxscript" . \
+    || fatal_ "fetching auxiliary script \`$auxscript'"
+done
 
 $ACLOCAL
 $AUTOMAKE
diff --git a/tests/suffix8.tap b/tests/suffix8.tap
index 7b07496..8a819a9 100755
--- a/tests/suffix8.tap
+++ b/tests/suffix8.tap
@@ -24,6 +24,7 @@ required='cc libtoolize'
 plan_ 10
 
 cat >>configure.in <<'END'
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/vala.test b/tests/vala.test
index 3e1ef65..6954dbd 100755
--- a/tests/vala.test
+++ b/tests/vala.test
@@ -26,6 +26,7 @@ required="libtool"
 
 cat >> 'configure.in' << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_PROG_VALAC
 AC_OUTPUT
diff --git a/tests/vala1.test b/tests/vala1.test
index 5030f72..7eb8d71 100755
--- a/tests/vala1.test
+++ b/tests/vala1.test
@@ -27,6 +27,7 @@ required="libtool"
 
 cat >> 'configure.in' << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_PROG_VALAC
 AC_OUTPUT
diff --git a/tests/vartypo2.test b/tests/vartypo2.test
index f811bbc..624e86b 100755
--- a/tests/vartypo2.test
+++ b/tests/vartypo2.test
@@ -21,6 +21,7 @@ required=libtoolize
 . ./defs || Exit 1
 
 cat >>configure.in <<'END'
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/vartypos.test b/tests/vartypos.test
index 03747ed..cd8f718 100755
--- a/tests/vartypos.test
+++ b/tests/vartypos.test
@@ -41,7 +41,7 @@ EXTRA_libfoo_a_DEPENDENCIES = unused
 END
 
 $ACLOCAL
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-extra-portability
 # The expected diagnostic is:
 # automake: warnings are treated as errors
 # Makefile.am:2: warning: variable `nodist_foo_SOURCES' is defined but no 
program or
@@ -84,6 +84,6 @@ bin_PROGRAMS = foo
 lib_LIBRARIES = libfoo.a
 END
 
-$AUTOMAKE
+$AUTOMAKE -Wno-extra-portability
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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