]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'msvc' into master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 3 Nov 2011 12:50:06 +0000 (13:50 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 3 Nov 2011 13:36:42 +0000 (14:36 +0100)
Commits merged from msvc:
 - tests: few improvements to some `ar-lib' related tests
 - warnings: new 'extra-portability' category, for AM_PROG_AR
 - ar-lib: new 'AM_PROG_AR' macro, triggering the 'ar-lib' script

Extra changes required by the testsuite:
* 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.

110 files changed:
1  2 
ChangeLog
NEWS
automake.in
doc/automake.texi
lib/Automake/ChannelDefs.pm
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/aclocal4.test
tests/ar.test
tests/ar2.test
tests/canon4.test
tests/canon6.test
tests/canon7.test
tests/compile4.test
tests/cond13.test
tests/condlib.test
tests/defs
tests/depcomp4.test
tests/depcomp6.test
tests/depcomp7.test
tests/depcomp8b.test
tests/extra-portability.test
tests/extra-portability2.test
tests/extra9.test
tests/extradep.test
tests/extradep2.test
tests/fort5.test
tests/instdir-ltlib.test
tests/instdir-prog.test
tests/instfail-libtool.test
tests/instfail.test
tests/instspc-tests.sh
tests/ldflags.test
tests/libobj-basic.test
tests/libobj10.test
tests/libobj12.test
tests/libobj13.test
tests/libobj15a.test
tests/libobj15b.test
tests/libobj15c.test
tests/libobj16a.test
tests/libobj16b.test
tests/libobj17.test
tests/libobj18.test
tests/libobj19.test
tests/libobj2.test
tests/libobj20a.test
tests/libobj20b.test
tests/libobj20c.test
tests/libobj7.test
tests/library.test
tests/libtoo10.test
tests/libtool2.test
tests/libtool3.test
tests/libtool5.test
tests/libtool6.test
tests/libtool7.test
tests/libtool8.test
tests/libtool9.test
tests/listval.test
tests/location.test
tests/ltcond.test
tests/ltcond2.test
tests/ltconv.test
tests/ltdeps.test
tests/ltinit.test
tests/ltinstloc.test
tests/ltlibobjs.test
tests/ltlibsrc.test
tests/ltorder.test
tests/multlib.test
tests/nobase-libtool.test
tests/nobase.test
tests/noinstdir.test
tests/posixsubst-ldadd.test
tests/posixsubst-libraries.test
tests/posixsubst-ltlibraries.test
tests/pr300-lib.test
tests/pr300-ltlib.test
tests/pr307.test
tests/pr401.test
tests/pr401b.test
tests/pr401c.test
tests/pr72.test
tests/python-virtualenv.test
tests/silent3.test
tests/silent4.test
tests/silent9.test
tests/specflg-dummy.test
tests/specflg2.test
tests/stdlib2.test
tests/strip2.test
tests/strip3.test
tests/subdir4.test
tests/subdirbuiltsources.test
tests/subobj10.test
tests/subobj9.test
tests/subpkg.test
tests/subst3.test
tests/substtarg.test
tests/suffix.test
tests/suffix10.test
tests/suffix2.test
tests/suffix5.test
tests/suffix8.test
tests/vala.test
tests/vala1.test
tests/vartypo2.test
tests/vartypos.test

diff --cc ChangeLog
index 051e7fa5f8d355d746154da22eb643bdc950c0de,bd0a16521262e2116b62cdaa6f26802738e5840e..b79cae0647cc8912e960e71f45f2c4ff87654fee
+++ b/ChangeLog
@@@ -1,3 -1,3 +1,127 @@@
++2011-11-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
++
++      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  <peda@lysator.liu.se>
++
++      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  <peda@lysator.liu.se>
++          Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
++          Stefano Lattarini  <stefano.lattarini@gmail.com>
++
++      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 <zackw@panix.com>  (tiny change)
            Stefano Lattarini  <stefano.lattarini@gmail.com>
  
diff --cc NEWS
index 3852abfab81b4754c191ea1a91667f2e5d83dc19,c65ca14227e69ee964d3a76e74c5f27eb9d7b323..6c548d1f7178c30c3cb80f6709b8d86cca6f0197
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -32,32 -27,9 +32,35 @@@ New in 1.11a
    - The `lzma' compression scheme and associated automake option `dist-lzma'
      is obsoleted by `xz' and `dist-xz' due to upstream changes.
  
 +  - "make dist" can now create lzip-compressed tarballs.
 +
 +  - You may adjust the compression options used in dist-xz and dist-bzip2.
 +    The default is still -9 for each, but you may specify a different
 +    level via the XZ_OPT and BZIP2 envvars respectively.  E.g.,
 +    "make dist-xz XZ_OPT=-7" or "make dist-xz BZIP2=-5"
 +
 +  - Messages of types warning or error from `automake' and `aclocal' are now
 +    prefixed with the respective type, and presence of -Werror is noted.
 +
 +  - The `compile' script now converts some options for MSVC for a better
 +    user experience.  Similarly, the new `ar-lib' script wraps Microsoft lib.
 +
 +  - Automake's early configure-time sanity check now tries to avoid sleeping
 +    for a second, which slowed down cached configure runs noticeably.  In that
 +    case, it will check back at the end of the configure script to ensure that
 +    at least one second has passed, to avoid time stamp issues with makefile
 +    rules rerunning autotools programs.
 +
 +  - For programs and libraries, automake now detects EXTRA_foo_DEPENDENCIES and
 +    adds them to the normal list of dependencies, but without overwriting the
 +    foo_DEPENDENCIES variable, which is normally computed by automake.
 +
 +  - 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
diff --cc automake.in
index cbbdd53089ddd3d63840d894e24417381e5bed76,edfa7e975770dfa4a9940eb289a7e4ce5599247c..0b6d014f467350f08ace8516764a1b2913512580
mode 100644,100755..100644
Simple merge
Simple merge
diff --cc m4/Makefile.in
Simple merge
index d900b41b94c03c4a771187534430afe5d127313b,8056f2d74c052244ae07b1571487b8a66c570479..b5ad95a105a3d09a3a2e64a90d89d4acf7e272ac
@@@ -162,13 -102,33 +162,24 @@@ amhello-binpkg.test 
  amassign.test \
  ammissing.test \
  amopt.test \
 +amopts-location.test \
 +amopts-variable-expansion.test \
  amsubst.test \
 -ansi2knr-deprecation.test \
 -ansi.test \
 -ansi2.test \
 -ansi3.test \
 -ansi3b.test \
 -ansi4.test \
 -ansi5.test \
 -ansi6.test \
 -ansi7.test \
 -ansi8.test \
 -ansi9.test \
 -ansi10.test \
 +ansi2knr-no-more.test \
  ar-lib.test \
+ ar-lib2.test \
+ ar-lib3.test \
+ ar-lib4.test \
+ ar-lib5a.test \
+ ar-lib5b.test \
+ ar-lib6a.test \
+ ar-lib6b.test \
+ ar-lib7.test \
  ar.test \
  ar2.test \
+ ar3.test \
+ ar4.test \
+ ar5.test \
  asm.test \
  asm2.test \
  asm3.test \
@@@ -465,8 -396,8 +476,10 @@@ extra9.test 
  extra10.test \
  extra11.test \
  extra12.test \
 +extradep.test \
 +extradep2.test \
+ extra-portability.test \
+ extra-portability2.test \
  f90only.test \
  flavor.test \
  flibs.test \
index e1f91d03980742f1cefa75e066f337ea73859f0e,8e6eb4c3e3c3f36eb030fe7adef561b04cc2f65c..babba97f3ae82d8b8f0df50c29de90495251397c
@@@ -438,13 -386,33 +438,24 @@@ amhello-binpkg.test 
  amassign.test \
  ammissing.test \
  amopt.test \
 +amopts-location.test \
 +amopts-variable-expansion.test \
  amsubst.test \
 -ansi2knr-deprecation.test \
 -ansi.test \
 -ansi2.test \
 -ansi3.test \
 -ansi3b.test \
 -ansi4.test \
 -ansi5.test \
 -ansi6.test \
 -ansi7.test \
 -ansi8.test \
 -ansi9.test \
 -ansi10.test \
 +ansi2knr-no-more.test \
  ar-lib.test \
+ ar-lib2.test \
+ ar-lib3.test \
+ ar-lib4.test \
+ ar-lib5a.test \
+ ar-lib5b.test \
+ ar-lib6a.test \
+ ar-lib6b.test \
+ ar-lib7.test \
  ar.test \
  ar2.test \
+ ar3.test \
+ ar4.test \
+ ar5.test \
  asm.test \
  asm2.test \
  asm3.test \
@@@ -741,8 -680,8 +752,10 @@@ extra9.test 
  extra10.test \
  extra11.test \
  extra12.test \
 +extradep.test \
 +extradep2.test \
+ extra-portability.test \
+ extra-portability2.test \
  f90only.test \
  flavor.test \
  flibs.test \
index e18684b7c19ef2c1d0ebd612b14d9af40a7a0daa,eab8ca80605f55d5c126f53bb32bc50d0d1ce809..10b20803456ccf8a5b529c89d69c305eb19e01df
  required=GNUmake
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<EOF
  AC_PROG_RANLIB
+ AM_PROG_AR
  AC_PROG_CC
  MY_MACRO
  AC_CONFIG_FILES([lib/Makefile])
diff --cc tests/ar.test
index 4a69c34f47628a716562f026823cb38d80f7b194,06dcde3841b4309e01063d06416aeb4cdca2040b..b0b02a43d07497a78f4456e9db971bc98c473d99
  
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
+ AM_PROG_AR
  AC_SUBST([AR], ['echo it works'])
  AC_SUBST([ARFLAGS], ['>'])
  AC_SUBST([RANLIB], ['echo really works >>'])
diff --cc tests/ar2.test
Simple merge
index 733ea7027b046d711b065b3f1a3c0afd0c25b6c6,d98636f322aeae2ac631840d819ff6507f31baaa..c6b7296ddd4456d9cd1ddc776b6c801f0b44cdf8
  
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
  END
  
index a24e2eb6f20e683fc35f83594756d60988543469,9d6fd6e113223fd80b6d541eb5961cef03df7c79..dd2e44ea08cdb24ea127bc7e6df3d751d0163a7c
  # 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 ansi2knr doesn't use `$U' for C++.
 -# Report from Robert Boehne.
 +# Test to make sure name canonicalization happens for libtool libraries.
 +# Keep this in sync with sister test `canon4.test'.
  
 +required='libtoolize'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
 -AC_PROG_CXX
 -AM_C_PROTOTYPES
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_LIBTOOL
  END
  
  cat > Makefile.am << 'END'
 -AUTOMAKE_OPTIONS = ansi2knr
 -sbin_PROGRAMS = anonymous
 -anonymous_SOURCES = doe.c jane.C
 +noinst_LTLIBRARIES = libx-y.la
 +libx_y_la_SOURCES = xy.c
  END
  
 -: > ansi2knr.c
 -: > ansi2knr.1
 -
 -: > doe.C
 -: > jane.C
 +: > ltmain.sh
++: > ar-lib
  
  $ACLOCAL
 -$AUTOMAKE -Wno-obsolete
 +$AUTOMAKE -a
  
 -$FGREP 'jane$U' Makefile.in && Exit 1
 -$FGREP 'doe$U' Makefile.in
 +grep '^ *libx-y.*=' Makefile.in && Exit 1
  
 -Exit 0
 +:
index 4e700df1e7759d1935e4f38653244f7d7f8d97c3,0000000000000000000000000000000000000000..c399cd5ac6fe9306ea7bcae96c71707ded2bacc2
mode 100755,000000..100755
--- /dev/null
@@@ -1,90 -1,0 +1,91 @@@
 +#! /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/>.
 +
 +# Stress test on canonicalization.
 +
 +required='libtool libtoolize'
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_RANLIB  dnl: for static libraries
 +AC_PROG_LIBTOOL dnl: for libtool libraries
 +AC_OUTPUT
 +END
 +
 +touch ,foo-bar libb.az+baz lib~zardoz,, || Exit 77
 +rm -f ,foo-bar libb.az+baz lib~zardoz,,
 +
 +cat > Makefile.am << 'END'
 +noinst_PROGRAMS = dummy_static dummy_dynamic ,foo-bar
 +noinst_LIBRARIES = libb.az+baz.a
 +noinst_LTLIBRARIES = lib~zardoz,,.la
 +
 +dummy_static_SOURCES = dummy.c lib.h
 +dummy_dynamic_SOURCES = $(dummy_static_SOURCES)
 +
 +dummy_static_LDADD = $(noinst_LIBRARIES)
 +dummy_dynamic_LDADD = $(noinst_LTLIBRARIES)
 +
 +_foo_bar_SOURCES = foobar.c
 +libb_az_baz_a_SOURCES = libs.c
 +lib_zardoz___la_SOURCES = libd.c
 +
 +check-local:
 +      ls -l
 +      ./,foo-bar
 +      ./dummy_static
 +      ./dummy_dynamic
 +      ./,foo-bar | grep 'Hello, FooBar!'
 +      ./dummy_static | grep 'Hello from Static!'
 +      ./dummy_dynamic | grep 'Hello from Dynamic!'
 +END
 +
 +cat > foobar.c << 'END'
 +#include <stdio.h>
 +int main(void)
 +{
 +  printf("Hello, FooBar!\n");
 +  return 0;
 +}
 +END
 +
 +cat > dummy.c << 'END'
 +#include <stdio.h>
 +#include "lib.h"
 +int main(void)
 +{
 +  printf("Hello from %s!\n", dummy_func());
 +  return 0;
 +}
 +END
 +
 +echo 'const char *dummy_func(void);' > lib.h
 +echo 'const char *dummy_func(void) { return "Dynamic"; }' > libd.c
 +echo 'const char *dummy_func(void) { return "Static"; }' > libs.c
 +
 +libtoolize
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +$MAKE check
 +$MAKE distcheck
 +
 +:
Simple merge
Simple merge
Simple merge
diff --cc tests/defs
index ba4e9cc77e328311451f4155bf2d0ed6663ee31c,b8edd3b52be46d7d65ffc1ee8afb70d4409d226f..1c9dd908b872b3dcf6c3046d3f823b235076c0e2
        # telling that source files are missing.  Adding also the `-help'
        # option seems to solve the problem.
        echo "$me: running javac -version -help"
 -      javac -version -help || exit 77
 +      javac -version -help || skip_ "java compiler not found"
 +      ;;
 +    java)
 +      # See the comments above about `javac' for why we use also `-help'.
 +      echo "$me: running java -version -help"
 +      java -version -help || skip_ "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- ) || exit 77
 +      makedepend -f- || exit 77
        ;;
      makeinfo-html)
        # Make sure makeinfo understands --html.
index b995c083670a745de8f97cd26c7369f33cb90ca0,3c3602f587499a9809bfaf1ef784b40037a310e0..80c9043d4484dcbb6aefbdd5ea777fbfb55ed5d3
  required='libtoolize gcc makedepend'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  END
Simple merge
Simple merge
index c67c3a85bd6c5c5c005e21262bedb1c05b30f95e,56514792df1182847130de36ad3a3c169d74d047..1cd61a3cdea7ebb730ff647f1142b57e4e826499
  required=libtoolize
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  END
index 0000000000000000000000000000000000000000,191dcb493488845b16eca4644dc201a5cf79144d..353141faa31bf5388f84b37be41f4e041fc3b204
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,69 +1,69 @@@
 -AUTOMAKE_fails -Wno-extra-portability
+ #! /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 -Wno-portability
++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
+ :
index 0000000000000000000000000000000000000000,a44b144275be60b68e392d8fdf01115af8b2a69b..9e7212a2df00ba5bc82f2d821485e85b3f51d853
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,53 +1,52 @@@
 -# Satisfy --gnits and --gnu.
 -: > INSTALL
 -: > NEWS
 -: > README
 -: > AUTHORS
 -: > ChangeLog
 -: > COPYING
 -: > THANKS
+ #! /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/>.
+ # Make sure that extra-portability warnings are not enabled by --gnits,
+ # --gnu and --foreign.
+ . ./defs || Exit 1
+ set -e
 -AUTOMAKE_fails
++# We want complete control over automake options.
++AUTOMAKE=$original_AUTOMAKE
+ cat >>configure.in <<END
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_OUTPUT
+ END
+ cat >Makefile.am <<END
+ EXTRA_LIBRARIES = libfoo.a
+ libfoo_a_SOURCES = foo.c
+ END
+ $ACLOCAL
+ # 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
+ :
index 1446a4d452580b44a6b328112a05848cfbb08514,0000000000000000000000000000000000000000..7a9cdaa25afdee2b2c17723eee9ed6e613d99c21
mode 100755,000000..100755
--- /dev/null
@@@ -1,44 -1,0 +1,47 @@@
 +#!/bin/sh
 +# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
 +#
 +# This file is part of GNU Automake.
 +#
 +# GNU Automake 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 3 of the License, or
 +# (at your option) any later version.
 +#
 +# GNU Automake 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 Automake; see the file COPYING.  If not, write to
 +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 +# Boston, MA 02110-1301, USA.
 +
 +# Ensure we warn about substitutions in bin_PROGRAMS if EXTRA_PROGRAMS
 +# are missing; but only if the former is not AC_SUBSTed itself
 +# (lib_LIBRARIES is in the same boat here).
 +
 +. ./defs || Exit 1
 +
 +cat >>configure.in <<'END'
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_SUBST([lib_LIBRARIES])
 +AC_SUBST([bins])
 +AC_OUTPUT
 +END
 +
 +cat >Makefile.am <<'END'
 +bin_PROGRAMS = @bins@
 +END
 +
++: > ar-lib
++
 +$ACLOCAL
 +AUTOMAKE_fails
 +grep 'bin_PROGRAMS.*contains configure substitution' stderr
 +grep 'lib_LIBRARIES.*contains configure substitution' stderr && Exit 1
 +
 +Exit 0
index 623d73a621bf6d59dc97bf9b20b7487cea73550f,0000000000000000000000000000000000000000..636d9b2824097514c8ae779a390036e73e292aa3
mode 100755,000000..100755
--- /dev/null
@@@ -1,105 -1,0 +1,106 @@@
 +#! /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/>.
 +
 +# Test EXTRA_*_DEPENDENCIES.  See extradep2 for libtool variant.
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_SUBST([deps], [bardep])
 +AM_CONDITIONAL([COND], [test -n "$cond"])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LIBRARIES = libfoo.a
 +EXTRA_libfoo_a_DEPENDENCIES = libfoodep
 +libfoodep:
 +      @echo making $@
 +      @: > $@
 +CLEANFILES = libfoodep
 +
 +bin_PROGRAMS = foo bar
 +EXTRA_foo_DEPENDENCIES = foodep
 +if COND
 +EXTRA_foo_DEPENDENCIES += foodep2
 +endif
 +bar_LDADD = libfoo.a
 +EXTRA_bar_DEPENDENCIES = $(deps)
 +
 +EXTRA_DIST = foodep bardep
 +
 +.PHONY: bar-has-been-updated
 +bar-has-been-updated:
 +      stat older bar$(EXEEXT) libfoo.a || : For debugging.
 +      test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
 +END
 +
 +cat >libfoo.c <<'END'
 +int libfoo () { return 0; }
 +END
 +
 +cat >foo.c <<'END'
 +int main () { return 0; }
 +END
 +
 +cat >bar.c <<'END'
 +extern int libfoo ();
 +int main () { return libfoo (); }
 +END
 +
 +$ACLOCAL
 +$AUTOMAKE --add-missing
 +$AUTOCONF
 +
 +./configure cond=yes
 +
 +# hypotheses:
 +# EXTRA_*_DEPENDENCIES are honored.
 +# conditionals and substitutions are honored.
 +# *_DEPENDENCIES are not overwritten by their EXTRA_* counterparts.
 +
 +: >foodep
 +: >foodep2
 +: >bardep
 +$MAKE >stdout || { cat stdout; Exit 1; }
 +cat stdout
 +grep 'making libfoodep' stdout
 +
 +rm -f foodep
 +$MAKE && Exit 1
 +: >foodep
 +
 +rm -f foodep2
 +$MAKE && Exit 1
 +: >foodep2
 +
 +rm -f bardep
 +$MAKE && Exit 1
 +: >bardep
 +
 +$MAKE
 +: > older
 +$sleep
 +touch libfoo.a
 +$MAKE
 +$MAKE bar-has-been-updated
 +
 +$MAKE distcheck
 +
 +:
index 9a97de4ec50753346359b19bbd4c185f7fdc7636,0000000000000000000000000000000000000000..97f485d3815aaf19fbeeced71ec151ce67a0adb5
mode 100755,000000..100755
--- /dev/null
@@@ -1,87 -1,0 +1,88 @@@
 +#! /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/>.
 +
 +# Test EXTRA_*_DEPENDENCIES, libtool version; see extradep.test.
 +
 +required=libtoolize
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_LIBTOOL
 +AC_SUBST([deps], [bardep])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LTLIBRARIES = libfoo.la
 +EXTRA_libfoo_la_DEPENDENCIES = libfoodep
 +libfoodep:
 +      @echo making $@
 +      @: > $@
 +CLEANFILES = libfoodep
 +
 +bin_PROGRAMS = bar
 +bar_LDADD = libfoo.la
 +EXTRA_bar_DEPENDENCIES = $(deps)
 +
 +EXTRA_DIST = bardep
 +
 +.PHONY: bar-has-been-updated
 +bar-has-been-updated:
 +      stat older bar$(EXEEXT) libfoo.la || : For debugging.
 +      test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
 +END
 +
 +cat >libfoo.c <<'END'
 +int libfoo () { return 0; }
 +END
 +
 +cat >bar.c <<'END'
 +extern int libfoo ();
 +int main () { return libfoo (); }
 +END
 +
 +libtoolize
 +$ACLOCAL
 +$AUTOMAKE --add-missing
 +$AUTOCONF
 +
 +./configure
 +
 +# hypothesis: EXTRA_*_DEPENDENCIES are honored.
 +
 +: >foodep
 +: >foodep2
 +: >bardep
 +$MAKE >stdout || { cat stdout; Exit 1; }
 +cat stdout
 +grep 'making libfoodep' stdout
 +
 +rm -f bardep
 +$MAKE && Exit 1
 +: >bardep
 +
 +$MAKE
 +: > older
 +$sleep
 +touch libfoo.la
 +$MAKE
 +$MAKE bar-has-been-updated
 +
 +$MAKE distcheck
 +
 +:
Simple merge
index 25f68dda3a02042121b433207069f7343e3e7fa0,f4003775ad0a905ca1a5b5f7f3658114e7154a80..d02359b7966bcdf81fde557698c2675047ad36b3
@@@ -24,8 -23,10 +24,9 @@@ required=libtooliz
  cat >>configure.in <<'END'
  AC_PROG_CC
  AM_PROG_CC_C_O
+ AM_PROG_AR
  AC_PROG_LIBTOOL
 +AM_PATH_PYTHON
  AC_OUTPUT
  END
  
index 77fc2a04c2af0513163a15eda157998c526f2f17,66a489227e72d0b24302147a19b0a47f7cc6c923..0311613b69ff198c63fa5bcea1dcee38d6eae175
  cat >>configure.in <<'END'
  AC_PROG_CC
  AM_PROG_CC_C_O
+ AM_PROG_AR
  AC_PROG_RANLIB
 +AM_PATH_PYTHON
  AC_OUTPUT
  END
  
index b580c400ee0376e3a775b91dbf75f67163e3ed4c,2e5e312f63ab8334be1c1820b91e318fcffaff9d..d4ee994d0e343fbeef287a2648b06437240e4281
  required='libtool libtoolize'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<END
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  END
index d7fa736419299d642f02727f8be8ba670cf84ce1,3fb60b53835cbae147f80e56727777ceb078ee5f..022d71da2c4790c9b99303d716b05685e33104a9
  
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<END
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
  AM_PATH_LISPDIR
  AC_OUTPUT
index 2c4089f5013835f42b6a7a1f48d33bb79505d4e4,0000000000000000000000000000000000000000..d3824a11f9cb03a1469e6b0e19f9d79737694187
mode 100755,000000..100755
--- /dev/null
@@@ -1,342 -1,0 +1,343 @@@
 +#! /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/>.
 +
 +#
 +# Driver script to generate and run tests checking that building from,
 +# or installing to, directories with shell metacharacters succeed.
 +#
 +# Original report from James Amundson about file names with spaces.
 +# Other characters added by Paul Eggert.
 +#
 +# This script fulfills a threefold role:
 +#   1. It generates a Makefile.am snippet, containing the definition
 +#      of proper lists of tests.
 +#   2. It sets up a directory containing some common data files and
 +#      autotools-generated files used by said generated tests (this
 +#      is done for speed reasons only).
 +#   3. It is sourced by said generated tests with proper parameters
 +#      pre-set, to run the "meat" of the checks.
 +# This setup might seem a tricky and over-engineered abuse, but past
 +# (painful) experiences showed that it is indeed required, because
 +# the test generation code and test execution code tend to be
 +# inextricably coupled and intertwined.
 +#
 +
 +# Be more Bourne compatible (snippet copied from `tests/defs').
 +DUALCASE=1; export DUALCASE # for MKS sh
 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 +  emulate sh
 +  NULLCMD=:
 +  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
 +  # is contrary to our usage.  Disable this feature.
 +  alias -g '${1+"$@"}'='"$@"'
 +  setopt NO_GLOB_SUBST
 +else
 +  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 +fi
 +
 +set -e
 +
 +# Sanity and usage checks.
 +if test x"$instspc_action" = x; then
 +  if test "$#,$1" = "1,--generate-makefile"; then
 +    instspc_action=generate-makefile
 +  else
 +    echo "$0: empty action and no proper command line" >&2
 +    exit 99
 +  fi
 +elif test $# -gt 0; then
 +  echo "$0: action specified and command line arguments used" >&2
 +  exit 99
 +fi
 +
 +case $instspc_action in
 +  generate-makefile|generate-data)
 +    ;;
 +  test-build|test-install)
 +    if test x"$instspc_test_name" = x; then
 +      echo "$0: test name undefined for action '$instspc_action'" >&2
 +      exit 99
 +    fi
 +    ;;
 +  *)
 +    echo "$0: invalid action: '$instspc_action'"
 +    exit 99
 +    ;;
 +esac
 +
 +# Helper subroutine for test data definition.
 +# Usage: define_problematic_string NAME STRING
 +define_problematic_string ()
 +{
 +  tst=$1
 +  shift
 +  eval "instspc__$tst=\$1" || exit 99
 +  shift
 +  instspc_names_list="$instspc_names_list $tst"
 +  # Some of the "problematic" characters cannot be used in the name of
 +  # a build or install directory on a POSIX host.  These lists should
 +  # be empty, but are not due to limitations in Autoconf, Automake, Make,
 +  # M4, or the shell.
 +  case " $* " in *' fail-build '*|*' build-fail '*)
 +    instspc_xfail_builds_list="$instspc_xfail_builds_list $tst";;
 +  esac
 +  case " $* " in *' fail-install '*|*' install-fail '*)
 +    instspc_xfail_installs_list="$instspc_xfail_installs_list $tst";;
 +  esac
 +}
 +
 +# Helper subroutines for creation of input data files.
 +
 +create_input_data ()
 +{
 +  mkdir sub
 +
 +  unindent > configure.in << 'EOF'
 +    AC_INIT([instspc], [1.0])
 +    AM_INIT_AUTOMAKE
 +    AC_CONFIG_FILES([Makefile])
 +    AC_PROG_CC
 +    AC_PROG_RANLIB
++    AM_PROG_AR
 +    AC_OUTPUT
 +EOF
 +
 +  : > sub/base.h
 +  : > sub/nobase.h
 +  : > sub/base.dat
 +  : > sub/nobase.dat
 +  : > sub/base.sh
 +  : > sub/nobase.sh
 +
 +  unindent > source.c << 'EOF'
 +    int
 +    main (int argc, char **argv)
 +    {
 +      return 0;
 +    }
 +EOF
 +
 +  unindent > Makefile.am << 'EOF'
 +    foodir = $(prefix)/foo
 +    fooexecdir = $(prefix)/foo
 +
 +    foo_HEADERS = sub/base.h
 +    nobase_foo_HEADERS = sub/nobase.h
 +
 +    dist_foo_DATA = sub/base.dat
 +    nobase_dist_foo_DATA = sub/nobase.dat
 +
 +    dist_fooexec_SCRIPTS = sub/base.sh
 +    nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
 +
 +    fooexec_PROGRAMS = sub/base
 +    nobase_fooexec_PROGRAMS = sub/nobase
 +    sub_base_SOURCES = source.c
 +    sub_nobase_SOURCES = source.c
 +
 +    fooexec_LIBRARIES = sub/libbase.a
 +    nobase_fooexec_LIBRARIES = sub/libnobase.a
 +    sub_libbase_a_SOURCES = source.c
 +    sub_libnobase_a_SOURCES = source.c
 +
 +    .PHONY: test-install-sep
 +    test-install-sep: install
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
 +      test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
 +      test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
 +      test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
 +      test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
 +      test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
 +      test   -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
 +EOF
 +
 +  $ACLOCAL
 +  $AUTOCONF
 +  $AUTOMAKE -a
 +
 +  : > success
 +}
 +
 +# Be sure to avoid interferences from the environment.
 +instspc_names_list=''
 +instspc_xfail_builds_list=''
 +instspc_xfail_installs_list=''
 +
 +
 +# ================= #
 +#  Test data begin  #
 +# ----------------- #
 +
 +# Some control characters that are white space.
 +bs='\b'   # back space
 +cr='\r'   # carriage return
 +ff='\f'   # form feed
 +ht='  ' # horizontal tab
 +lf='
 +'         # line feed (aka newline)
 +
 +# Hack to save typing and make code visually clearer.
 +def=define_problematic_string
 +
 +$def    squote          \'          fail-build  fail-install
 +$def    dquote          '"'         fail-build  fail-install
 +$def    bquote          '`'         fail-build  fail-install
 +$def    sharp           '#'         fail-build  fail-install
 +$def    dollar          '$'         fail-build  fail-install
 +$def    bang            '!'
 +$def    bslash          '\'         fail-build
 +$def    ampersand       '&'         fail-build
 +$def    percent         '%'
 +$def    leftpar         '('
 +$def    rightpar        ')'
 +$def    pipe            '|'
 +$def    caret           '^'
 +$def    tilde           '~'
 +$def    qmark           '?'
 +$def    star            '*'
 +$def    plus            '+'
 +$def    minus           '-'
 +$def    comma           ','
 +$def    colon           ':'
 +$def    semicol         ';'
 +$def    equal           '='
 +$def    less            '<'
 +$def    more            '>'
 +$def    at              '@'
 +$def    lqbrack         '['
 +$def    rqbrack         ']'
 +$def    lcbrack         '{'
 +$def    rcbrack         '}'
 +$def    space           ' '
 +$def    tab             "$ht"
 +$def    linefeed        "$lf"       fail-build  fail-install
 +$def    backspace       "$bs"
 +$def    formfeed        "$ff"
 +$def    carriageret     "$cr"
 +$def    quadrigraph0    '@&t@'      fail-build
 +$def    quadrigraph1    '@<:@'
 +$def    quadrigraph2    '@:>@'
 +$def    quadrigraph3    '@S|@'
 +$def    quadrigraph4    '@%:@'
 +$def    a_b             'a b'
 +$def    a__b            'a  b'
 +$def    a_lf_b          "a${lf}b"   fail-build  fail-install
 +$def    dotdotdot       '...'
 +$def    dosdrive        'a:'
 +$def    miscglob1       '?[a-z]*'
 +$def    miscglob2       '.*?[0-9]'
 +
 +unset def
 +
 +# --------------- #
 +#  Test data end  #
 +# =============== #
 +
 +
 +if test x"$instspc_action" = x"generate-makefile"; then
 +  # We must generate a makefile fragment on stdout.  It must refer
 +  # to all tests at once, hence the loop below.
 +  echo '## Generated by instspc-tests.sh.  DO NOT EDIT!'
 +  echo 'instspc_tests ='
 +  echo 'instspc_xfail_tests ='
 +  for test_name in $instspc_names_list; do
 +    echo "instspc_tests += instspc-$test_name-build.test"
 +    echo "instspc_tests += instspc-$test_name-install.test"
 +  done
 +  for test_name in $instspc_xfail_builds_list; do
 +    echo "instspc_xfail_tests += instspc-$test_name-build.test"
 +  done
 +  for test_name in $instspc_xfail_installs_list; do
 +    echo "instspc_xfail_tests += instspc-$test_name-install.test"
 +  done
 +  exit 0
 +fi
 +
 +# We'll need the full setup provided by `tests/defs'.  Temporarily disable
 +# the errexit flag, since the setup code might not be prepared to deal
 +# with it.
 +set +e
 +. ./defs || Exit 99
 +set -e
 +
 +# The directory set up by the `generate-data' action should contain all
 +# the files we need.  So remove the other files created by ./defs.  And
 +# check we really are in a temporary `*.dir' directory in the build tree,
 +# since the last thing we want is to remove some random user files!
 +test -f ../defs-static && test -f ../defs || Exit 99
 +case `pwd` in *.dir);; *) Exit 99;; esac
 +rm -f *
 +
 +if test x"$instspc_action" = x"generate-data"; then
 +  # We must *not* remove the test directory, since its contents must be
 +  # used by following dependent tests.
 +  keep_testdirs=yes
 +  create_input_data
 +  Exit 0
 +fi
 +
 +###  If we are still here, we have to run a test ...
 +
 +eval "instspc_test_string=\${instspc__$instspc_test_name}" || Exit 99
 +if test x"$instspc_test_string" = x; then
 +  echo "$me: invalid test name: '$instspc_test_name'" >&2
 +  Exit 99
 +fi
 +
 +test -f ../instspc-data.dir/success || {
 +  echo "$me: setup by instspc-data.test failed" >&2
 +  Exit 99
 +}
 +
 +# Skip if this system doesn't support these characters in file names.
 +mkdir "./$instspc_test_string" || Exit 77
 +
 +case $instspc_action in
 +  test-build)
 +    dest=`pwd`/_dest
 +    relbuilddir=../..
 +    cd "./$instspc_test_string"
 +    ;;
 +  test-install)
 +    dest=`pwd`/$instspc_test_string
 +    relbuilddir=..
 +    ;;
 +  *)
 +    echo "$me: internal error: invalid action '$instspc_action'"
 +    Exit 99
 +    ;;
 +esac
 +
 +$relbuilddir/instspc-data.dir/configure \
 +  --prefix "/$instspc_test_string-prefix"
 +$MAKE
 +# Some make implementations eliminate leading and trailing whitespace
 +# from macros passed on the command line, and some eliminate leading
 +# whitespace from macros set from environment variables, so prepend
 +# './' and use the latter here.
 +# Tru64 sh -e needs '|| Exit' in order to work correctly.
 +DESTDIR="$dest" file="./$instspc_test_string" $MAKE -e test-install-sep \
 +  || Exit 1
 +
 +:
index 96fb213021a223f70ff2889fe253cf6bb954d8fe,c00f227d705e8f589f80efb214cebbcfa0447ce8..92fb42c0839200a707cd9d1ed5e05a797f5e5bba
@@@ -23,9 -21,10 +23,10 @@@ required=libtoo
  
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_SUBST([LTLIBOBJS], [q.o])
 -AM_CONDITIONAL(USE_SWIG, :)
 +AM_CONDITIONAL([USE_SWIG], [:])
  AC_OUTPUT
  END
  
index 0fe0278c71a2fd6eb91a6c74891004b678f43fbc,0000000000000000000000000000000000000000..f87660ef622e8dcf031e949b0ce379a0df8bbf99
mode 100755,000000..100755
--- /dev/null
@@@ -1,108 -1,0 +1,112 @@@
 +#! /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 AC_LIBSOURCE and AC_LIBSOURCES work.
 +
 +. ./defs || Exit 1
 +
 +mv configure.in configure.proto
 +cat >> configure.proto << 'END'
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES = foo.c
 +libtu_a_LIBADD = $(LIBOBJS)
 +
 +include extra-checks.am
 +.PHONY: $(extra_checks) pre-test
 +
 +pre-test: distdir
 +      ls -l $(srcdir) $(builddir) $(distdir)
 +      $(AR) tv libtu.a
 +$(extra_checks): pre-test
 +check-local: $(extra_checks)
 +
 +maude-src:
 +      grep dummy_maude $(srcdir)/maude.c
 +maude-dist:
 +      grep dummy_maude $(distdir)/maude.c
 +liver-src:
 +      grep dummy_liver $(srcdir)/liver.c
 +liver-dist:
 +      grep dummy_liver $(distdir)/liver.c
 +liver-not-dist:
 +      test -d $(distdir)
 +      test ! -r $(distdir)/liver.c
 +maude-not-dist:
 +      test -d $(distdir)
 +      test ! -r $(distdir)/maude.c
 +END
 +
 +cat > foo.c << 'END'
 +extern int dummy_foo;
 +END
 +
 +cat > maude.c << 'END'
 +extern int dummy_maude;
 +END
 +
 +cat > liver.c << 'END'
 +extern int dummy_liver;
 +END
 +
 +# AC_LIBSOURCE should work also if called after AC_OUTPUT.
 +cat configure.proto - > configure.in <<END
 +AC_LIBSOURCE([maude.c])
 +END
 +
 +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
 +./configure
 +
 +$MAKE check
 +$MAKE distcheck
 +
 +$MAKE distclean
 +# Avoid timestamp-related differences.
 +rm -rf autom4te*.cache
 +
 +cat > extra-checks.am << 'END'
 +extra_checks = maude-src maude-dist liver-src liver-dist
 +END
 +
 +# AC_LIBSOURCES should work also if called after AC_OUTPUT.
 +cat configure.proto - > configure.in <<END
 +AC_LIBSOURCES([maude.c, liver.c])
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +./configure
 +
 +$MAKE check
 +$MAKE distcheck
 +
 +:
index f891e85f44c680690da531647a0ac1f4c55694b4,97dffecd02e795d0b4cc9d0fbb0fd9cab9071ebb..2eabb5c45a1172d8ec9ef7769b228ebbff99312a
  
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
  AC_LIBOBJ([foo])
  AC_OUTPUT
@@@ -29,22 -31,15 +30,24 @@@ EN
  
  cat > Makefile.am << 'END'
  noinst_LIBRARIES = libfoo.a
 -libfoo_a_LIBADD = @LIBOBJS@
 +libfoo_a_SOURCES =
 +libfoo_a_LIBADD = $(LIBOBJS)
 +BUILT_SOURCES = foo.c
 +CLEANFILES = foo.c
 +foo.c:
 +      echo 'extern int dummy;' > $@
  END
  
+ : > ar-lib
  $ACLOCAL
 -AUTOMAKE_fails
 -grep 'Makefile.am:2:.*foo\.c' stderr
 +$AUTOCONF
 +$AUTOMAKE
  
 -echo 'BUILT_SOURCES = foo.c' >> Makefile.am
 +./configure
  
 -$AUTOMAKE
 +$MAKE
 +ar t libfoo.a # for debugging
 +$MAKE distcheck
 +
 +:
Simple merge
Simple merge
index 044e3db85d33d03ca8e94bd79ee6ad036b16da78,fc7f17372f6cf461f863d5e71205f2035118d930..1889d637fb73f1be9a3f00152129edce16656fd0
  
  . ./defs || Exit 1
  
 -cat > configure.in << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
 -AC_LIBOBJ([mountlist])
 -AC_OUTPUT(Makefile)
 +AC_LIBOBJ([foobar])
  END
  
  cat > Makefile.am << 'END'
  noinst_LIBRARIES = libtu.a
  libtu_a_SOURCES =
 -libtu_a_LIBADD = @LIBOBJS@
 +libtu_a_LIBADD = $(LIBOBJS)
  END
  
 -: > mountlist.c
+ : > ar-lib
 -$ACLOCAL || Exit 1
 -$AUTOMAKE || Exit 1
 +$ACLOCAL
 +AUTOMAKE_fails
 +grep 'configure\.in:.*required file.*foobar\.c.*' stderr
 +
 +:
index 4548a2a2a73a65ff17fa943a2f303f52caebe8e9,a40baa40d9a4a457474d946b4896bb71bfe3210b..03415c2fc6d1ad98013bd78759251b071fec29a4
  
  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
 +#       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
  AC_OUTPUT
  END
  
  cat > Makefile.am << 'END'
  noinst_LIBRARIES = libtu.a
  libtu_a_SOURCES =
 -libtu_a_LIBADD = @LIBOBJS@
 +libtu_a_LIBADD = $(LIBOBJS)
  END
  
 -: > maude.c
 -: > liver.c
+ : > ar-lib
  $ACLOCAL
 +AUTOMAKE_fails
 +grep 'configure\.in:.*required file.*foobar\.c.*' stderr
  
 -set -e
 -
 -cp configure.in X
 -echo 'AC_LIBSOURCE(maude.c)' >> configure.in
 -$AUTOMAKE
 -
 -# Avoid timestamp-related differences.
 -rm -rf autom4te.cache
 -
 -cp X configure.in
 -echo 'AC_LIBSOURCES([maude.c, liver.c])' >> configure.in
 -$AUTOMAKE
 +:
index c39ac996b971ce8dd39a6497e79ea5f3a9aa60a8,0000000000000000000000000000000000000000..603e2ebe1dbd61ea8a2964b9127f1dd86fe0f61b
mode 100755,000000..100755
--- /dev/null
@@@ -1,47 -1,0 +1,50 @@@
 +#! /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/>.
 +
 +# Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_PROG_CC
 +AC_PROG_RANLIB
 +AC_LIBSOURCES([foobar.c, bazquux.c])
 +# NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
 +#       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LIBRARIES = libtu.a
 +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
 +grep 'configure\.in:.*required file.*foobar\.c.*' stderr
 +grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
 +
 +: > foobar.c
 +AUTOMAKE_fails
 +grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
 +grep 'foobar\.c' stderr && Exit 1
 +
 +:
index 9946bc5b009607b75f19e7b990749ebb2747f150,0000000000000000000000000000000000000000..a1ae93b6039926b2e83c83adee223338d3f0ddb6
mode 100755,000000..100755
--- /dev/null
@@@ -1,137 -1,0 +1,138 @@@
- $AUTOMAKE
 +#! /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 AC_LIBOBJ and friends work.
 +# Please keep this in sync with sister test `libobj16b.test'.
 +
 +. ./defs || Exit 1
 +
 +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
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES =
 +libtu_a_LIBADD = $(LIBOBJS)
 +
 +include extra-checks.am
 +.PHONY: $(extra_checks) pre-test
 +
 +pre-test: distdir
 +      ls -l $(srcdir) $(builddir) $(distdir)
 +      $(AR) tv libtu.a
 +$(extra_checks): pre-test
 +check-local: $(extra_checks)
 +
 +maude-src:
 +      grep dummy_maude $(srcdir)/maude.c
 +maude-dist:
 +      grep dummy_maude $(distdir)/maude.c
 +liver-src:
 +      grep dummy_liver $(srcdir)/liver.c
 +liver-dist:
 +      grep dummy_liver $(distdir)/liver.c
 +liver-not-dist: distdir
 +      test ! -r $(distdir)/liver.c
 +maude-not-dist: distdir
 +      test ! -r $(distdir)/maude.c
 +maude-lib:
 +      $(AR) t libtu.a | grep maude
 +maude-not-lib:
 +      $(AR) t libtu.a | grep maude && exit 1; exit 0
 +liver-lib:
 +      $(AR) t libtu.a | grep liver
 +liver-not-lib:
 +      $(AR) t libtu.a | grep liver && exit 1; exit 0
 +END
 +
 +cat > maude.c << 'END'
 +extern int dummy_maude;
 +END
 +
 +cat > liver.c << 'END'
 +extern int dummy_liver;
 +END
 +
 +sed '/%LIBOBJ-STUFF%/{
 +s/.*//
 +i\
 +AC_LIBOBJ([maude])
 +}' configure.proto > configure.in
 +cat configure.in # for debugging
 +
 +cat > extra-checks.am << 'END'
 +extra_checks = maude-src maude-dist maude-lib liver-not-dist
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
++$AUTOMAKE --add-missing
 +
 +./configure
 +
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
 +$MAKE distclean
 +
 +# Avoid timestamp-related differences.
 +rm -rf autom4te*.cache
 +
 +cat > extra-checks.am << 'END'
 +extra_checks = maude-src maude-dist liver-src liver-dist
 +if MAUDE_COND
 +extra_checks += maude-lib liver-not-lib
 +else
 +extra_checks += maude-not-lib liver-lib
 +endif
 +END
 +
 +sed '/%LIBOBJ-STUFF%/{
 +s/.*//
 +i\
 +AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
 +if test x"$MAUDE" = x"yes"; then\
 +  AC_LIBOBJ([maude])\
 +else\
 +  AC_LIBOBJ([liver])\
 +fi\
 +AC_LIBSOURCES([maude.c, liver.c])
 +}' configure.proto > configure.in
 +cat configure.in # for debugging
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +
 +./configure MAUDE=yes
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
 +$MAKE distclean
 +
 +./configure MAUDE=no
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
 +$MAKE distclean
 +
 +:
index 1039558e0ce84272b6aa484a5da7b8a23434ecf3,0000000000000000000000000000000000000000..6adfce355cf2231e06d2d9ab39fca0a218c005d5
mode 100755,000000..100755
--- /dev/null
@@@ -1,138 -1,0 +1,138 @@@
- $AUTOMAKE
 +#! /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 AC_LIBOBJ and friends work.
 +# Please keep this in sync with sister test `libobj16b.test'.
 +
 +. ./defs || Exit 1
 +
 +mv configure.in configure.proto
 +cat >> configure.proto << 'END'
 +AC_PROG_CC
 +AC_PROG_RANLIB
 +%LIBOBJ-STUFF% # will be activated later
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES =
 +libtu_a_LIBADD = @LIBOBJS@
 +
 +include extra-checks.am
 +.PHONY: $(extra_checks) pre-test
 +
 +pre-test: distdir
 +      ls -l $(srcdir) $(builddir) $(distdir)
 +      $(AR) tv libtu.a
 +$(extra_checks): pre-test
 +check-local: $(extra_checks)
 +
 +maude-src:
 +      grep dummy_maude $(srcdir)/maude.c
 +maude-dist:
 +      grep dummy_maude $(distdir)/maude.c
 +liver-src:
 +      grep dummy_liver $(srcdir)/liver.c
 +liver-dist:
 +      grep dummy_liver $(distdir)/liver.c
 +liver-not-dist: distdir
 +      test ! -r $(distdir)/liver.c
 +maude-not-dist: distdir
 +      test ! -r $(distdir)/maude.c
 +maude-lib:
 +      $(AR) t libtu.a | grep maude
 +maude-not-lib:
 +      $(AR) t libtu.a | grep maude && exit 1; exit 0
 +liver-lib:
 +      $(AR) t libtu.a | grep liver
 +liver-not-lib:
 +      $(AR) t libtu.a | grep liver && exit 1; exit 0
 +END
 +
 +cat > maude.c << 'END'
 +extern int dummy_maude;
 +END
 +
 +cat > liver.c << 'END'
 +extern int dummy_liver;
 +END
 +
 +sed '/%LIBOBJ-STUFF%/{
 +s/.*//
 +i\
 +AC_LIBOBJ(maude) dnl: do not quote this!
 +}' configure.proto > configure.in
 +cat configure.in # for debugging
 +
 +cat > extra-checks.am << 'END'
 +extra_checks = maude-src maude-dist maude-lib liver-not-dist
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
- $AUTOMAKE
++$AUTOMAKE -Wno-extra-portability
 +
 +./configure
 +
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
 +$MAKE distclean
 +
 +# Avoid timestamp-related differences.
 +rm -rf autom4te*.cache
 +
 +cat > extra-checks.am << 'END'
 +extra_checks = maude-src maude-dist liver-src liver-dist
 +if MAUDE_COND
 +extra_checks += maude-lib liver-not-lib
 +else
 +extra_checks += maude-not-lib liver-lib
 +endif
 +END
 +
 +sed '/%LIBOBJ-STUFF%/{
 +s/.*//
 +i\
 +AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
 +if test x"$MAUDE" = x"yes"; then\
 +  AC_LIBOBJ(maude) dnl: do not quote this!\
 +else\
 +  AC_LIBOBJ(liver) dnl: do not quote this!\
 +fi\
 +AC_LIBSOURCE(maude.c) dnl: do not quote this!\
 +AC_LIBSOURCE(liver.c) dnl: do not quote this!
 +}' configure.proto > configure.in
 +cat configure.in # for debugging
 +
 +$ACLOCAL
 +$AUTOCONF
++$AUTOMAKE -Wno-extra-portability
 +
 +./configure MAUDE=yes
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
 +$MAKE distclean
 +
 +./configure MAUDE=no
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
 +$MAKE distclean
 +
 +:
index 4f9db57f9039be7410aedc2fc9ca3ccbb1e1e56f,0000000000000000000000000000000000000000..a570e128475d7847fbad1b0778babb40a4598070
mode 100755,000000..100755
--- /dev/null
@@@ -1,65 -1,0 +1,66 @@@
- $AUTOMAKE
 +#! /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 AC_LIBOBJ accept non-literal arguments.
 +
 +. ./defs || Exit 1
 +
 +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])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES =
 +libtu_a_LIBADD = $(LIBOBJS)
 +END
 +
 +cat > quux.c <<'END'
 +extern int dummy;
 +END
 +
 +cat > zardoz.c <<'END'
 +extern int dummy;
 +END
 +
 +# These might print warnings, but should not error out.
 +$ACLOCAL
++$AUTOMAKE -a
 +$AUTOCONF
 +
 +./configure FOO=quux
 +$MAKE
 +ls -l # for debugging
 +test -f libtu.a
 +ar t libtu.a | $FGREP quux
 +ar t libtu.a | $FGREP zardoz && Exit 1
 +
 +$MAKE distclean
 +
 +./configure FOO=zardoz
 +$MAKE
 +ls -l # for debugging
 +test -f libtu.a
 +ar t libtu.a | $FGREP zardoz
 +ar t libtu.a | $FGREP quux && Exit 1
 +
 +:
index 5fba7804f25976ded328b32c53daaa67f49e186a,e14375361feac814ff799ecaeed0ed7c826bbd6c..66188c6997126bb91be8005ce3f6354706d3277f
  
  . ./defs || Exit 1
  
 -cat > configure.in << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +cat >> configure.in << 'END'
  AC_PROG_CC
 -AC_PROG_CC_STDC
+ AM_PROG_AR
  AC_PROG_RANLIB
 -AC_REPLACE_FUNCS(basename dirname strsignal)
 -AM_C_PROTOTYPES
 -AC_OUTPUT(Makefile)
 +foo=dummy bar=dummy baz=dummy
 +AC_LIBSOURCE([$foo.c])
 +AC_LIBSOURCES([$bar.c, $baz.c])
 +AC_OUTPUT
  END
  
  cat > Makefile.am << 'END'
index bc495b5b543c99e967381105f1cc7abb6590e25a,4fe685c3cac3215439fb81b2351905e104da8bce..205bc48c0f14c77ca867532ba6fc0b7322350c8d
  # 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 of subdir objects with C++.
 +# Test support for AC_CONFIG_LIBOBJ_DIR.
  
 -required=gcc
  . ./defs || Exit 1
  
 -set -e
 -
 -cat > configure.in << END
 -AC_INIT([$me], [1.0])
 -dnl Prevent automake from looking in .. and ../..
 -AC_CONFIG_AUX_DIR([.])
 -AM_INIT_AUTOMAKE
 +cat >> configure.in << 'END'
 +AC_CONFIG_LIBOBJ_DIR([libobj-dir])
  AC_PROG_CC
 -AC_PROG_CC_STDC
 -AM_PROG_CC_C_O
 -AM_C_PROTOTYPES
 -AC_CONFIG_FILES([Makefile])
++AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_LIBOBJ([foobar])
  AC_OUTPUT
  END
  
  cat > Makefile.am << 'END'
  AUTOMAKE_OPTIONS = subdir-objects
 -bin_PROGRAMS = hello
 -hello_SOURCES = sub/hello.c
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES =
 +libtu_a_LIBADD = $(LIBOBJS)
 +check-local: distdir
 +      ls -l $(srcdir)/* $(builddir)/* $(distdir)/*
 +      test -f libtu.a
 +      test ! -r $(srcdir)/foobar.c
 +      test -f $(srcdir)/libobj-dir/foobar.c
 +      test ! -r $(distdir)/foobar.c
 +      test -f $(distdir)/libobj-dir/foobar.c
 +      $(AR) t libtu.a
 +      $(AR) t libtu.a | grep foobar
  END
  
 -mkdir sub
 -cat > sub/hello.c << 'END'
 -#include <stdio.h>
 -int
 -main (int argc, char *argv[])
 -{
 -   printf ("yeah, yeah\n");
 -   return 0;
 -}
 +mkdir libobj-dir
 +cat > libobj-dir/foobar.c << 'END'
 +extern int dummy;
  END
  
 -# Ignore user CFLAGS.
 -CFLAGS=
 -export CFLAGS
++# FIXME: improve support for "installcheck" here.
++cp "$top_testsrcdir/lib/ar-lib" . || Exit 99
 -# We use gcc and not gcc -traditional as the latter fails on some
 -# Linux boxes (Red Hat 5.1 in particular).
  $ACLOCAL
  $AUTOCONF
 -$AUTOMAKE -a
 +$AUTOMAKE
 +
  ./configure
 -ANSI2KNR=./ansi2knr U=_ $MAKE -e
 -./hello
 +
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
  
  :
index 66ca0d04e122a1560641bd830f1866e63816ad27,36c01b3bac386a822c8b006b1eb4a13ac4b68a1a..1359bd42485baa938d3034ef0e63fe1adaeead36
  
  . ./defs || Exit 1
  
 -cat > configure.in << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +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])
 -AC_OUTPUT(subdir/Makefile)
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +SUBDIRS = subdir
 +check-local: distdir
 +      ls -l $(srcdir) $(srcdir)/subdir
 +      ls -l $(distdir) $(distdir)/subdir
 +      ls -l $(builddir) $(builddir)/subdir
 +      test -f $(srcdir)/subdir/fsusage.c
 +      test -f $(distdir)/subdir/fsusage.c
 +      $(AR) tv $(builddir)/subdir/libtu.a
  END
  
  mkdir subdir
@@@ -48,20 -38,10 +49,20 @@@ libtu_a_SOURCES 
  libtu_a_LIBADD = @LIBOBJS@
  END
  
 -: > ar-lib
 -: > subdir/fsusage.c
 +cat > subdir/fsusage.c << 'END'
 +extern int dummy;
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
- $AUTOMAKE
++$AUTOMAKE -a
 +
 +# Older grepping check, kept "just to be sure".
 +$FGREP 'fsusage.c' subdir/Makefile.in
 +
 +./configure
  
 -$ACLOCAL || Exit 1
 -$AUTOMAKE || Exit 1
 +$MAKE check
 +$MAKE distcheck
  
 -grep 'fsusage\.c' subdir/Makefile.in
 +:
index 2f90c843c69750e54f1a81b526f61b3ec98456a8,0000000000000000000000000000000000000000..b2f70632a521ec9b1026237c4675287ebb25b7b5
mode 100755,000000..100755
--- /dev/null
@@@ -1,43 -1,0 +1,45 @@@
 +#! /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/>.
 +
 +# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
 +# See also sister tests `libobj20b.test' and `libobj20c.test' .
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_LIBOBJ([foo])
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES =
 +libtu_a_LIBADD = $(LIBOBJS)
 +END
 +
 +mkdir libobj-dir
 +: > libobj-dir/foo.c
++: > ar-lib
 +
 +$ACLOCAL
 +AUTOMAKE_fails
 +grep 'LIBOBJS.*used outside.*libobj-dir' stderr
 +grep 'subdir-objects.*not set' stderr
 +
 +:
index d130a8abe13aec3df29aa3f2ae8f547d79a66c70,0000000000000000000000000000000000000000..374c8d932b9503394e7e26dd415e23965abfc0f4
mode 100755,000000..100755
--- /dev/null
@@@ -1,54 -1,0 +1,57 @@@
 +#! /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/>.
 +
 +# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
 +# See also sister tests `libobj20a.test' and `libobj20c.test' .
 +
 +. ./defs || Exit 1
 +
 +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
 +#       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +AUTOMAKE_OPTIONS = subdir-objects
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES =
 +libtu_a_LIBADD = $(LIBOBJS)
 +END
 +
++: > ar-lib
++
 +$ACLOCAL
 +
 +AUTOMAKE_fails
 +grep 'configure\.in:.*required directory.*libobj-dir' stderr
 +
 +mkdir libobj-dir
 +: > foobar.c # oops, it should be in libobj-dir...
 +AUTOMAKE_fails
 +grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
 +
 +rm -f foobar.c
 +
 +: > libobj-dir/foobar.c
 +$AUTOMAKE # now we should succeed
 +
 +:
index 1fb1f9d97c3f8a1cf5e074eba9b66ccc12942424,0000000000000000000000000000000000000000..c4d9a12b411de17996e019600c9a9837ecb64315
mode 100755,000000..100755
--- /dev/null
@@@ -1,51 -1,0 +1,54 @@@
 +#! /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/>.
 +
 +# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
 +# See also sister tests `libobj20a.test' and `libobj20b.test' .
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 +AC_PROG_CC
 +AC_PROG_RANLIB
 +AC_LIBOBJ([foobar])
 +END
 +
 +cat > Makefile.am << 'END'
 +AUTOMAKE_OPTIONS = subdir-objects
 +noinst_LIBRARIES = libtu.a
 +libtu_a_SOURCES =
 +libtu_a_LIBADD = $(LIBOBJS)
 +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
 +
 +mkdir libobj-dir
 +: > foobar.c # oops, it should be in libobj-dir!
 +AUTOMAKE_fails
 +grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
 +
 +rm -f foobar.c
 +
 +: > libobj-dir/foobar.c
 +$AUTOMAKE # now we should succeed
 +
 +:
index b7556b70bc6c04b23409b2e6e78e389fd0a48395,1ff36c4556561b2b72bb7f3ff4de0d252551e907..14b0571a83541496e26d9179823834b41a31a99d
  
  . ./defs || Exit 1
  
 -cat > configure.in << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 +cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
 -AC_REPLACE_FUNCS(basename dirname strsignal)
 -AC_OUTPUT(Makefile)
 +# `am__dummy_function' is there to ensure that at least one function is
 +# replaced, to avoid creating an empty archive which can cause problems
 +# with e.g. Solaris ar.
 +AC_REPLACE_FUNCS([basename dirname am__dummy_function])
 +AC_OUTPUT
  END
  
  cat > Makefile.am << 'END'
  noinst_LIBRARIES = libtu.a
  libtu_a_SOURCES =
  libtu_a_LIBADD = @LIBOBJS@
 +check-local: test1 test2 test3
 +.PHONY: test1 test2 test3
 +test1: all
 +      $(AR) tv libtu.a
 +test2:
 +      @echo DIST_COMMON = $(DIST_COMMON)
 +      echo ' ' $(DIST_COMMON) ' ' | grep '[ /]basename\.c '
 +      echo ' ' $(DIST_COMMON) ' ' | grep '[ /]dirname\.c '
 +      echo ' ' $(DIST_COMMON) ' ' | grep '[ /]am__dummy_function\.c '
 +test3: distdir
 +      test -f $(distdir)/basename.c
 +      test -f $(distdir)/dirname.c
 +      test -f $(distdir)/am__dummy_function.c
  END
  
 -: > ar-lib
 -: > basename.c
 -: > dirname.c
 -: > strsignal.c
 -
 -$ACLOCAL || Exit 1
 -$AUTOMAKE || Exit 1
 -
 -sed -n -e ': again
 -  /^DIST_COMMON.*[^\]$/ p
 -  /^DIST_COMMON/ {
 -     s/^DIST_COMMON//p
 -     n
 -     s/^/DIST_COMMON/
 -     b again
 -  }' < Makefile.in | $FGREP dirname.c
 +cat > basename.c <<'END'
 +extern int dummy1;
 +END
 +cat > dirname.c <<'END'
 +extern int dummy2;
 +END
 +cat > am__dummy_function.c <<'END'
 +extern int dummy3;
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
- $AUTOMAKE
++$AUTOMAKE --add-missing
 +
 +./configure
 +
 +$MAKE
 +$MAKE check
 +$MAKE distcheck
 +
 +:
index e3a981397b9fb3c8eb922c77b47bc615b67fe86a,8adc575c112d33269beac509e7aacec89d121470..8ad40f1c4fe8141aa6396e5338aaf416ce6d3404
@@@ -31,7 -31,7 +32,8 @@@ lib_LIBRARIES = libfoo.
  libfoo_a_DEPENDENCIES = libzot.a
  END
  
 -
 -$ACLOCAL || Exit 1
+ : > ar-lib
 +$ACLOCAL
  $AUTOMAKE
 +
 +:
index 72310bb7203486f314b8f57383f20850b81d44cf,44c072685f808344dd79b7e8f2ff897a612717f1..4f1a60e5b0628a115393dc4e35c89b69f34392d4
  
  required=libtoolize
  . ./defs || Exit 1
 -set -e
 -
  cat >> configure.in << 'END'
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  END
index 6e268dd601b2f1e7aff1f9f49f1a3e7154edc0c8,0120fa9e06b3d87e33f068d9a7929c9f86a7cb6f..f2fe1af32c8dbba994c43078ac34a15894c5f0d4
  required=libtoolize
  . ./defs || Exit 1
  
 -cat > configure.in << 'END'
 -AC_INIT
 -AM_INIT_AUTOMAKE(mypackage,0.1)
 -
 +cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
 -
 -AC_CONFIG_FILES([
 -  sub/Makefile
 -  Makefile
 -])
 +AC_CONFIG_FILES([sub/Makefile])
  AC_OUTPUT
  END
  
index 3a6a40eab82776d1ca93da115c1e8e93f5d0825f,1643f31ebda4997fc85df41f9db2f549a36bf7ab..dd8a67b4b8b706fb98d93590bf617813ce7e9f2b
  required='libtoolize gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AM_PROG_LIBTOOL
  AC_OUTPUT
  END
Simple merge
Simple merge
index 9700628625d80190699e2c0425e7a30d144b2fd6,8ebce0a2d863dcd987d859f90a9b5bbb23be65be..9cba6d1a7b840e8395442436c4417556fdb645d9
  required='libtoolize gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_LIBTOOL_DLOPEN
  AM_PROG_LIBTOOL
  AC_OUTPUT
Simple merge
Simple merge
index 677fe3f0a9d1b8db8bb95344f06769477b226d36,d7cc884a0253997d40343810221b631f4253cca5..6bd933df63b08686d08b0af2eed592b4bf11a879
@@@ -22,7 -20,8 +22,8 @@@ required=libtoo
  . ./defs || Exit 1
  
  cat >> configure.in << 'END'
 -AC_SUBST(LTLIBOBJS)
 +AC_SUBST([LTLIBOBJS])
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  END
  
index 9013e31d913bf379c066549628f71854da411138,60987963809987e77b8b97bbc050e65f471e3d9f..7eb6549bdc894bfa40c49c72d875faa36f4c9f48
@@@ -42,8 -45,10 +43,10 @@@ VAR = 1 
        3
  END
  
+ : > ar-lib
  $ACLOCAL
 -AUTOMAKE_fails
 +AUTOMAKE_fails -Wno-error
  
  # Smash the useless difference of lib file locations.
  sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
Simple merge
index d4bf0647bf9d1539a65ca6313d7408d0a288cc49,898c97138d9b939a1c6a410c7903aec6eb7d704e..95b985ab7c8c4ccefe08225a5ea41210187c35c7
  required='libtoolize gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_SUBST([HELLO_SYSTEM], [hello-generic.lo])
  AM_CONDITIONAL([LINUX], true)
index 2ea2705eb28bf400d5294237e32ec1314b4b9792,a130b9437fc26bce0970139f797055e97d74c632..afd27169999455a2f26b53bbfa7faf6976e21d85
  required='libtoolize gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_CONFIG_FILES(sub1/Makefile
                sub2/Makefile
index 3c41ec317bf5ee064025f2cfea2690e75e7639d9,7ece4d493ffe92147978b761f4ea45ead026d288..8f47402001901dee22548b303f22e1cf77ad5ae7
  required=libtool
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_PROG_CXX
  AM_CONDITIONAL(HACKING_COMPACT_BUILD, whatever)
index 42c39138e85a51db7e45fd24fc62f8368bbde46a,8b76bdf81fed09b60ad18928beefb48939827acd..7b324308eb1b1e5991c19705dea88824d65db7dc
  required='libtoolize'
  . ./defs || Exit 1
  
 -set -e
 -
  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])],
index dd1c5d6fdee2ced33fb979ec887e68a86264fb7a,a4d715e52173e16f02ee9b281e0529bc02d5fca8..506ae8ddda4584885afa5a55b772b6421e8a5755
  required='libtoolize'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AM_CONDITIONAL([COND], [:])
  AC_OUTPUT
@@@ -44,16 -47,16 +45,16 @@@ AUTOMAKE_fails --add-missin
  # 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: sub/liba2.la multiply defined in condition COND
 +Makefile.am:5: error: sub/liba2.la multiply defined in condition COND
  Makefile.am:5: `sub/liba2.la' should be installed below `lib' in condition COND ...
  Makefile.am:2: ... and should also be installed in `lib' in condition COND.
 -Makefile.am:4: liba1.la multiply defined in condition COND
 +Makefile.am:4: error: liba1.la multiply defined in condition COND
  Makefile.am:4: `liba1.la' should be installed in `pkglib' in condition COND ...
  Makefile.am:2: ... and should also be installed in `lib' in condition COND.
 -Makefile.am:2: Libtool libraries can be built for only one destination.
 +Makefile.am:2: Libtool libraries can be built for only one destination
  END
  
  grep '^Makefile.am' stderr | diff - expected
index 9a3d830b5c9fc87e3367835291f7757753771714,2df001721f3cd8ca5025885ca0f4ecceb3ed8061..e430cdde9d5bd483b2d0248f0eb14d49d88ea9ee
@@@ -21,7 -20,8 +21,8 @@@ required=libtoo
  . ./defs || Exit 1
  
  cat >> configure.in << 'END'
 -AC_SUBST(LTLIBOBJS)
 +AC_SUBST([LTLIBOBJS])
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  END
  
index 78ac8e2f7874e44a07fe5b2c64f2d60fd1ee23b4,e8fa6f0c79170638e89d538f97a1b3c5b84b33b9..1cdf06a646963bc0d1ca136dffdf436670577615
  required='libtool gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  END
index c41134137b8fff29cb1b85bff3b5df0370cbb457,ef4a5f71cf037d52b76c6286832141a3d61a9f23..d249596c88dd5fee006341c266fb2766dfdeb12f
  required='libtoolize'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  END
Simple merge
index 15d1b4994f2d53a1258f0612a4e7249df9ab408b,2a0cf68b3659dc199d56b3ac6135e586228c9d81..3a5a7135451c86fcba6fa4a3f50a86311c93a2ee
  required='libtoolize gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in <<'EOF'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  EOF
index 2fa9a60598ac8471d49f49d278b033b3b68b7095,cac8756278246a4acc2fde2f94c7224006377aea..fd2fe2807af090b057f1fcedf6531fd5f95b5543
  required='gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in <<'EOF'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
  AC_OUTPUT
  EOF
index 92f59ffd7a5f914eb03bc97f515d15a3ddd47401,b04bb0d620686b9767a3aedf110459502c01ce38..329990e1dd077bc09a1fd97b473a23f10c1321de
@@@ -37,8 -38,10 +38,10 @@@ AM_PROG_A
  AC_PROG_RANLIB
  END
  
 -$ACLOCAL || Exit 1
 -$AUTOMAKE || Exit 1
+ : > ar-lib
 +$ACLOCAL
 +$AUTOMAKE
  
  grep 'noinstdir' Makefile.in && Exit 1
  grep 'checkdir' Makefile.in && Exit 1
index a418fc26e2b0e48fda9c37945d70b7f279c8d4a5,0000000000000000000000000000000000000000..e3aef7a7fd9b2d4bca81c4162fff972d607eb856
mode 100755,000000..100755
--- /dev/null
@@@ -1,76 -1,0 +1,77 @@@
- $AUTOMAKE
 +#! /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/>.
 +
 +# Test that POSIX variable expansion `$(var:str=rpl)' works
 +# in when used in LDADD.
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_PROG_CC
 +AC_PROG_RANLIB
++AM_PROG_AR
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +u = libquux1.lib libquux2.lib
 +v = libquux1
 +w = none
 +
 +zardozdir = $(prefix)/zardoz
 +zardoz_PROGRAMS = foo bar
 +
 +noinst_LIBRARIES = libquux1.a libquux2.a libquux3.a
 +
 +# Also try an empty match suffix, to ensure that the `:=' in there is
 +# not confused by the parser with an unportable assignment operator.
 +LDADD = $(u:.lib=.a)
 +bar_LDADD = $(v:=.a) libquux2.a $(w:none=libquux3.a)
 +
 +libquux1.c:
 +      echo 'int quux1(void) { return 0; }' > $@
 +CLEANFILES = libquux1.c # for FreeBSD make
 +END
 +
 +cat > foo.c <<'END'
 +int main(void)
 +{
 +  int quux1(void), quux2(void);
 +  return quux1() + quux2();
 +}
 +END
 +
 +cat > bar.c <<'END'
 +int main(void)
 +{
 +  int quux1(void), quux2(void), quux3(void);
 +  return quux1() + quux2() + quux3();
 +}
 +END
 +
 +echo 'int quux2(void) { return 0; }' > libquux2.c
 +echo 'int quux3(void) { return 0; }' > libquux3.c
 +
 +$ACLOCAL
 +$AUTOCONF
++$AUTOMAKE -a
 +
 +./configure
 +$MAKE
 +test -f libquux1.c
 +$MAKE distcheck
 +
 +:
index 418d24175c716d48f98b478c7a1dd1c1dc32bc0b,0000000000000000000000000000000000000000..a5719bfb8d9d01b9ba074632e12c999f638b064b
mode 100755,000000..100755
--- /dev/null
@@@ -1,63 -1,0 +1,64 @@@
- $AUTOMAKE
 +#! /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/>.
 +
 +# Test that POSIX variable expansion `$(var:str=rpl)' works when used
 +# with the LIBRARIES primary in a "simple" way.
 +# Keep this in sync with sister test `posixsubst-ltlibraries.test'.
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_PROG_CC
 +AC_PROG_RANLIB
++AM_PROG_AR
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +foolibs = libfoo1 libfoo2
 +barlibs = libbaz
 +
 +# Also try an empty match suffix, to ensure that the `:=' in there is
 +# not confused by the parser with an unportable assignment operator.
 +lib_LIBRARIES = $(foolibs:=.a) $(barlibs:z=r.a)
 +
 +libbar.c:
 +      echo 'int bar(void) { return 0; }' > $@
 +CLEANFILES = libbar.c # for FreeBSD make
 +
 +installcheck-local:
 +      ls -l $(prefix)/lib
 +      test -f $(prefix)/lib/libfoo1.a
 +      test -f $(prefix)/lib/libfoo2.a
 +      test -f $(prefix)/lib/libbar.a
 +END
 +
 +echo 'int bar1(void) { return 0; }' > libfoo1.c
 +echo 'int bar2(void) { return 0; }' > libfoo2.c
 +
 +$ACLOCAL
 +$AUTOCONF
++$AUTOMAKE -a
 +
 +cwd=`pwd` || Exit 1
 +./configure --prefix="$cwd/_inst"
 +$MAKE
 +test -f libfoo2.c
 +$MAKE install
 +$MAKE installcheck
 +$MAKE distcheck
 +
 +:
index e95023c94475e2b1f8b56d67aa253007cb2b3208,0000000000000000000000000000000000000000..e3b3d030741b0d489c284aaf218c0c394ae3dce6
mode 100755,000000..100755
--- /dev/null
@@@ -1,65 -1,0 +1,66 @@@
 +#! /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/>.
 +
 +# Test that POSIX variable expansion `$(var:str=rpl)' works when used
 +# with the LTLIBRARIES primary in a "simple" way.
 +# Keep this in sync with sister test `posixsubst-libraries.test'.
 +
 +required='libtool libtoolize'
 +. ./defs || Exit 1
 +
 +cat >> configure.in << 'END'
 +AC_PROG_CC
++AM_PROG_AR
 +AC_PROG_LIBTOOL
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +foolibs = libfoo1 libfoo2
 +barlibs = libbaz
 +
 +# Also try an empty match suffix, to ensure that the `:=' in there is
 +# not confused by the parser with an unportable assignment operator.
 +lib_LTLIBRARIES = $(foolibs:=.la) $(barlibs:z=r.la)
 +
 +libbar.c:
 +      echo 'int bar(void) { return 0; }' > $@
 +CLEANFILES = libbar.c # for FreeBSD make
 +
 +installcheck-local:
 +      ls -l $(prefix)/lib
 +      test -f $(prefix)/lib/libfoo1.la
 +      test -f $(prefix)/lib/libfoo2.la
 +      test -f $(prefix)/lib/libbar.la
 +END
 +
 +echo 'int bar1(void) { return 0; }' > libfoo1.c
 +echo 'int bar2(void) { return 0; }' > libfoo2.c
 +
 +libtoolize
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +cwd=`pwd` || Exit 1
 +./configure --prefix="$cwd/_inst"
 +$MAKE
 +test -f libfoo2.c
 +$MAKE install
 +$MAKE installcheck
 +$MAKE distcheck
 +
 +:
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc tests/pr72.test
Simple merge
index 11055b0b388dae667fa17f24cf69072c0fab92c9,0000000000000000000000000000000000000000..87a0839b6fe4eeb783c45f87bcaada539ceeb2ea
mode 100755,000000..100755
--- /dev/null
@@@ -1,184 -1,0 +1,185 @@@
 +#! /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 that python support can work well with virtualenvs.
 +# This test also works as a mild stress-test on the python support.
 +
 +required='python virtualenv'
 +. ./defs || Exit 1
 +
 +# In case the user's config.site defines pythondir or pyexecdir.
 +CONFIG_SITE=/dev/null; export CONFIG_SITE
 +
 +# Skip the test if a proper virtualenv cannot be created.
 +virtualenv --verbose virtenv || Exit 77
 +test -f virtenv/bin/activate || Exit 77
 +
 +# Activate the virtualenv.
 +. ./virtenv/bin/activate
 +# Sanity check.
 +test -n "$VIRTUAL_ENV" || Exit 99
 +
 +cwd=`pwd`
 +py_version=`python -c 'import sys; print("%u.%u" % tuple(sys.version_info[:2]))'`
 +py_site=$VIRTUAL_ENV/lib/python$py_version/site-packages
 +
 +# We need control over the package name.
 +cat > configure.in << END
 +AC_INIT([am_virtenv], [1.0])
 +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
 +END
 +
 +cat > Makefile.am << 'END'
 +python_PYTHON = am_foo.py
 +pkgpython_PYTHON = __init__.py
 +pyexec_LIBRARIES = libquux.a
 +libquux_a_SOURCES = foo.c
 +pkgpyexec_LIBRARIES = libzardoz.a
 +libzardoz_a_SOURCES = foo.c
 +
 +py_site = $(MY_VIRTENV)/lib/python$(PYTHON_VERSION)/site-packages
 +
 +.PYTHON: debug test-run test-install test-uninstall
 +debug:
 +      @echo PYTHON: $(PYTHON)
 +      @echo PYTHON_VERSION: $(PYTHON_VERSION)
 +      @echo prefix: $(prefix)
 +      @echo pythondir: $(pythondir)
 +      @echo pkgpythondir: $(pkgpythondir)
 +      @echo pyexecdir: $(pyexecdir)
 +      @echo pkgpyexecdir: $(pkgpyexecdir)
 +test-run:
 +      ## In a virtualenv, the default python must be the custom
 +      ## virtualenv python.
 +      @: \
 +        && py1=`python -c 'import sys; print(sys.executable)'` \
 +        && py2=`$(PYTHON) -c 'import sys; print(sys.executable)'` \
 +        && echo "py1: $$py1" \
 +        && echo "py2: $$py2" \
 +        && test -n "$$py1" \
 +        && test -n "$$py2" \
 +        && test x"$$py1" = x"$$py2"
 +      ## Check that modules installed in the virtualenv are readily
 +      ## available.
 +      python -c 'from am_foo import foo_func; assert (foo_func () == 12345)'
 +      python -c 'from am_virtenv import old_am; assert (old_am () == "AutoMake")'
 +test-install:
 +      test -f $(py_site)/am_foo.py
 +      test -f $(py_site)/am_foo.pyc
 +      test -f $(py_site)/am_foo.pyo
 +      test -f $(py_site)/am_virtenv/__init__.py
 +      test -f $(py_site)/am_virtenv/__init__.pyc
 +      test -f $(py_site)/am_virtenv/__init__.pyo
 +      test -f $(py_site)/libquux.a
 +      test -f $(py_site)/am_virtenv/libzardoz.a
 +test-uninstall:
 +      test ! -f $(py_site)/am_foo.py
 +      test ! -f $(py_site)/am_foo.pyc
 +      test ! -f $(py_site)/am_foo.pyo
 +      test ! -f $(py_site)/am_virtenv/__init__.py
 +      test ! -f $(py_site)/am_virtenv/__init__.pyc
 +      test ! -f $(py_site)/am_virtenv/__init__.pyo
 +      test ! -f $(py_site)/libquux.a
 +      test ! -f $(py_site)/am_virtenv/libzardoz.a
 +all-local: debug
 +END
 +
 +cat > am_foo.py << 'END'
 +def foo_func ():
 +    return 12345
 +END
 +
 +cat > __init__.py << 'END'
 +def old_am ():
 +    return 'AutoMake'
 +END
 +
 +cat > foo.c << 'END'
 +int foo (void)
 +{
 +  return 0;
 +}
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE --add-missing
 +
 +# Try a VPATH build.
 +mkdir build
 +cd build
 +../configure --prefix="$VIRTUAL_ENV"
 +$MAKE install
 +$MAKE test-install
 +$MAKE test-run
 +$MAKE uninstall
 +$MAKE test-uninstall
 +cd ..
 +
 +# Try an in-tree build.
 +./configure --prefix="$VIRTUAL_ENV"
 +$MAKE install
 +$MAKE test-install
 +$MAKE test-run
 +$MAKE uninstall
 +$MAKE test-uninstall
 +
 +$MAKE distclean
 +
 +# Overriding pythondir and pyexecdir with cache variables should work.
 +./configure am_cv_python_pythondir="$py_site" \
 +            am_cv_python_pyexecdir="$py_site"
 +$MAKE install
 +$MAKE test-install
 +$MAKE test-run
 +$MAKE uninstall
 +$MAKE test-uninstall
 +
 +$MAKE distclean
 +
 +# Overriding pythondir and pyexecdir at make time should be enough.
 +./configure --prefix="$cwd/bad-prefix"
 +pythondir=$py_site pyexecdir=$py_site
 +export pythondir pyexecdir
 +$MAKE -e install
 +test ! -d bad-prefix
 +$MAKE -e test-install
 +$MAKE test-run
 +$MAKE -e uninstall
 +$MAKE -e test-uninstall
 +unset pythondir pyexecdir
 +
 +# Also check that the distribution is self-contained, for completeness.
 +$MAKE distcheck
 +
 +# Finally, check that if we disable the virtualenv, we shouldn't be
 +# able to access to the installed modules anymore.
 +cd build
 +$MAKE install
 +python -c 'import am_foo; print(am_foo.__file__)'
 +python -c 'import am_virtenv; print(am_virtenv.__file__)'
 +deactivate "nondestructive"
 +python -c 'import am_foo' && Exit 1
 +python -c 'import am_virtenv' && Exit 1
 +
 +:
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 01f66f186f66a5ed5422c4acc21b8d9724748387,bab0a38e0480913f38829cefb57bda4a5b0354dc..ea4b3a603f3c76874939eafbf43c09cd1e10a200
  required=strip
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
  AC_OUTPUT
  END
index 5f6f163d37280b67e23bf3a8c0b0cad4e03777ef,34b02545fb3ce2b143141ec44ac0573ebe5f1170..31e04e8ea478a78600273ad7d4af3254024ea273
  required='libtoolize strip'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AC_OUTPUT
  END
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c1b2dfc350af5c6b97dcdf3c166252c4f853064d,c7adc8c219357a19dd6779fe09ea5266ee36dbbf..e64efdb9439a26eb169647d5ada0a3b1c160c555
  required='gcc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in <<'EOF'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_RANLIB
  if test -n "$doit"; then
    AC_SUBST([basehdr], [sub/base.h])
Simple merge
index bb8b82ec627842ca44419e0349b8f4a13144384d,c790c66a46605c6fc16e839e64c25e0192359970..3701b0c382fe8e8efdabc75ef6a81e27205bbbfd
@@@ -28,19 -26,14 +28,31 @@@ EN
  
  cat > Makefile.am << 'END'
  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 -i
 -grep '^\.c\.o' Makefile.in
++  $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
 -$AUTOMAKE
 -grep '^\.c\.o' Makefile.in
++done
  
  :
Simple merge
index b1212a8acadda4c6463908837f7d2ef152b5ee85,f55d965c06000612dbb8b4313c7bf72483e61e24..434077b58f3ae31a07b0398b6e38eeece258ac3f
@@@ -22,8 -20,11 +22,9 @@@ required=libtooliz
  
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  END
  
@@@ -40,14 -42,8 +41,14 @@@ EN
  : > config.sub
  
  $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
  
index 60417e46eeb3fbabede3d1ca56d061b6b16fa3c8,2cf0afa7c26df62435c1caa315e7235766c3641c..48e905944fe441176cce9f63cd4563eb2534add9
  required=libtool
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
 +AC_SUBST([LINK], [:])
+ AM_PROG_AR
  AC_PROG_LIBTOOL
 +AC_OUTPUT
  END
  
  cat > Makefile.am << 'END'
@@@ -44,8 -37,9 +45,12 @@@ check-local: tes
  END
  
  : > ltmain.sh
 -: > config.guess
 -: > config.sub
 -: > ar-lib
 +
- cp "$testsrcdir/../lib/config.guess" "$testsrcdir/../lib/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
index 99582d764ea6366bb9a3cfa1298dea234d5fffa0,d2ba0d4ab80a134fdc8e4fa1ac103c5b6c577b1a..8a29b8b3f978766ffa6219a8dd0998c48371237f
  # 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 Automake supports multiple derivations for the same suffix.
 -# PR/37
 +# Test to make sure Automake supports multiple derivations for the
 +# same suffix.
 +# From PR/37.
  
 -required='gcc libtoolize'
 +required=libtoolize
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<'END'
+ AM_PROG_AR
  AM_PROG_LIBTOOL
  AC_OUTPUT
  END
diff --cc tests/vala.test
index 3e1ef65aa6091f8c6dfb181d54eb1c725745d18a,34b71d4a4e1726581287479bd2a994526b3fff00..6954dbd4ed062417a7b4db64c2e4069bc5833b06
  required="libtool"
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> 'configure.in' << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AM_PROG_VALAC
  AC_OUTPUT
index 5030f72320cdaf53695fb646825dc69ce1016ba9,b2c9e1606da23575b7910cb56fc8ab088ba7a4ea..7eb8d71d3298a1b9da76020f1b78a12591288a3f
  required="libtool"
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> 'configure.in' << 'END'
  AC_PROG_CC
+ AM_PROG_AR
  AC_PROG_LIBTOOL
  AM_PROG_VALAC
  AC_OUTPUT
index f811bbcb4b43d2157cc25cf0df86c70535e6458d,0000000000000000000000000000000000000000..624e86bfcd63a2c2e0763d1ac4b6f0b077c39f5f
mode 100755,000000..100755
--- /dev/null
@@@ -1,69 -1,0 +1,70 @@@
 +#! /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 we warn about possible variable typos when we should,
 +# Libtool variant.
 +
 +required=libtoolize
 +. ./defs || Exit 1
 +
 +cat >>configure.in <<'END'
++AM_PROG_AR
 +AC_PROG_LIBTOOL
 +AC_OUTPUT
 +END
 +
 +cat >Makefile.am <<'END'
 +libfoo_la_SOURCES = unused
 +nodist_libfoo_la_SOURCES = unused
 +EXTRA_libfoo_la_SOURCES = unused
 +libfoo_la_LIBADD = unused
 +libfoo_la_DEPENDENCIES = unused
 +EXTRA_libfoo_la_DEPENDENCIES = unused
 +END
 +
 +libtoolize
 +$ACLOCAL
 +AUTOMAKE_fails --add-missing
 +# The expected diagnostic is:
 +# automake: warnings are treated as errors
 +# Makefile.am:3: warning: variable `EXTRA_libfoo_la_SOURCES' is defined but no program or
 +# Makefile.am:3: library has `libfoo_la' as canonical name (possible typo)
 +# Makefile.am:1: warning: variable `libfoo_la_SOURCES' is defined but no program or
 +# Makefile.am:1: library has `libfoo_la' as canonical name (possible typo)
 +# Makefile.am:2: warning: variable `nodist_libfoo_la_SOURCES' is defined but no program or
 +# Makefile.am:2: library has `libfoo_la' as canonical name (possible typo)
 +# Makefile.am:4: warning: variable `libfoo_la_LIBADD' is defined but no program or
 +# Makefile.am:4: library has `libfoo_la' as canonical name (possible typo)
 +# Makefile.am:6: warning: variable `EXTRA_libfoo_la_DEPENDENCIES' is defined but no program or
 +# Makefile.am:6: library has `libfoo_la' as canonical name (possible typo)
 +# Makefile.am:5: warning: variable `libfoo_la_DEPENDENCIES' is defined but no program or
 +# Makefile.am:5: library has `libfoo_la' as canonical name (possible typo)
 +
 +
 +grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && Exit 1
 +test `grep 'variable.*is defined but' stderr | wc -l` = 6
 +
 +# If we add a global -Wnone, all warnings should disappear.
 +$AUTOMAKE -Wnone
 +
 +# Likewise, if matching programs or libraries are defined.
 +cat >>Makefile.am <<'END'
 +lib_LTLIBRARIES = libfoo.la
 +END
 +
 +$AUTOMAKE
 +
 +:
index 03747ed87391205d16bebdad8220ade261c26717,0000000000000000000000000000000000000000..cd8f7188611928f7c72e45c07326d4fa321dc995
mode 100755,000000..100755
--- /dev/null
@@@ -1,89 -1,0 +1,89 @@@
- AUTOMAKE_fails
 +#! /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 we warn about possible variable typos when we should.
 +
 +. ./defs || Exit 1
 +
 +cat >>configure.in <<'END'
 +AC_PROG_RANLIB
 +AC_OUTPUT
 +END
 +
 +cat >Makefile.am <<'END'
 +foo_SOURCES = unused
 +nodist_foo_SOURCES = unused
 +EXTRA_foo_SOURCES = unused
 +foo_LDADD = unused
 +foo_LDFLAGS = unused
 +foo_DEPENDENCIES = unused
 +EXTRA_foo_DEPENDENCIES = unused
 +
 +libfoo_a_SOURCES = unused
 +nodist_libfoo_a_SOURCES = unused
 +EXTRA_libfoo_a_SOURCES = unused
 +libfoo_a_LIBADD = unused
 +libfoo_a_DEPENDENCIES = unused
 +EXTRA_libfoo_a_DEPENDENCIES = unused
 +END
 +
 +$ACLOCAL
- $AUTOMAKE
++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
 +# Makefile.am:2: library has `foo' as canonical name (possible typo)
 +# Makefile.am:1: warning: variable `foo_SOURCES' is defined but no program or
 +# Makefile.am:1: library has `foo' as canonical name (possible typo)
 +# Makefile.am:9: warning: variable `libfoo_a_SOURCES' is defined but no program or
 +# Makefile.am:9: library has `libfoo_a' as canonical name (possible typo)
 +# Makefile.am:10: warning: variable `nodist_libfoo_a_SOURCES' is defined but no program or
 +# Makefile.am:10: library has `libfoo_a' as canonical name (possible typo)
 +# Makefile.am:11: warning: variable `EXTRA_libfoo_a_SOURCES' is defined but no program or
 +# Makefile.am:11: library has `libfoo_a' as canonical name (possible typo)
 +# Makefile.am:3: warning: variable `EXTRA_foo_SOURCES' is defined but no program or
 +# Makefile.am:3: library has `foo' as canonical name (possible typo)
 +# Makefile.am:12: warning: variable `libfoo_a_LIBADD' is defined but no program or
 +# Makefile.am:12: library has `libfoo_a' as canonical name (possible typo)
 +# Makefile.am:4: warning: variable `foo_LDADD' is defined but no program or
 +# Makefile.am:4: library has `foo' as canonical name (possible typo)
 +# Makefile.am:5: warning: variable `foo_LDFLAGS' is defined but no program or
 +# Makefile.am:5: library has `foo' as canonical name (possible typo)
 +# Makefile.am:14: warning: variable `EXTRA_libfoo_a_DEPENDENCIES' is defined but no program or
 +# Makefile.am:14: library has `libfoo_a' as canonical name (possible typo)
 +# Makefile.am:7: warning: variable `EXTRA_foo_DEPENDENCIES' is defined but no program or
 +# Makefile.am:7: library has `foo' as canonical name (possible typo)
 +# Makefile.am:6: warning: variable `foo_DEPENDENCIES' is defined but no program or
 +# Makefile.am:6: library has `foo' as canonical name (possible typo)
 +# Makefile.am:13: warning: variable `libfoo_a_DEPENDENCIES' is defined but no program or
 +# Makefile.am:13: library has `libfoo_a' as canonical name (possible typo)
 +
 +grep 'as canonical' stderr | grep -v ' .foo. ' | grep -v ' .libfoo_a. ' \
 +  && Exit 1
 +test `grep 'variable.*is defined but' stderr | wc -l` = 13
 +
 +# If we add a global -Wnone, all warnings should disappear.
 +$AUTOMAKE -Wnone
 +
 +# Likewise, if matching programs or libraries are defined.
 +cat >>Makefile.am <<'END'
 +bin_PROGRAMS = foo
 +lib_LIBRARIES = libfoo.a
 +END
 +
++$AUTOMAKE -Wno-extra-portability
 +
 +: