]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
ar-lib: new 'AM_PROG_AR' macro, triggering the 'ar-lib' script
authorPeter Rosin <peda@lysator.liu.se>
Thu, 20 Oct 2011 22:23:34 +0000 (00:23 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Thu, 20 Oct 2011 22:23:34 +0000 (00:23 +0200)
* 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.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
104 files changed:
ChangeLog
NEWS
automake.in
doc/automake.texi
m4/Makefile.am
m4/Makefile.in
m4/ar-lib.m4 [new file with mode: 0644]
tests/Makefile.am
tests/Makefile.in
tests/aclibobj.test
tests/aclocal4.test
tests/ansi10.test
tests/ar-lib2.test [new file with mode: 0755]
tests/ar-lib3.test [new file with mode: 0755]
tests/ar-lib4.test [new file with mode: 0755]
tests/ar-lib5a.test [new file with mode: 0755]
tests/ar-lib5b.test [new file with mode: 0755]
tests/ar-lib6a.test [new file with mode: 0755]
tests/ar-lib6b.test [new file with mode: 0755]
tests/ar-lib7.test [new file with mode: 0755]
tests/ar.test
tests/ar2.test
tests/ar3.test [new file with mode: 0755]
tests/ar4.test [new file with mode: 0755]
tests/ar5.test [new file with mode: 0755]
tests/canon4.test
tests/compile4.test
tests/cond13.test
tests/condlib.test
tests/defs.in
tests/depcomp4.test
tests/depcomp6.test
tests/depcomp7.test
tests/depcomp8b.test
tests/fort5.test
tests/instdir-ltlib.test
tests/instdir-prog.test
tests/instfail-libtool.test
tests/instfail.test
tests/instspc.test
tests/ldflags.test
tests/libobj10.test
tests/libobj11.test
tests/libobj12.test
tests/libobj13.test
tests/libobj2.test
tests/libobj7.test
tests/libobj8.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/pr300-lib.test
tests/pr300-ltlib.test
tests/pr307.test
tests/pr401.test
tests/pr401b.test
tests/pr401c.test
tests/pr72.test
tests/primary-prefix-couples-documented-valid.test
tests/primary-prefix-couples-force-valid.test
tests/primary-prefix-invalid-couples.test
tests/primary-prefix-valid-couples.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/suffix10.test
tests/suffix2.test
tests/suffix5.test
tests/suffix8.test
tests/vala.test
tests/vala1.test

index 4e1c0670f6121f0e7e65e37f00194f03e348f471..1d7b68de58de718f5ced98f867e3a6de9286c96d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+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-09-05  Peter Rosin  <peda@lysator.liu.se>
 
        * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
diff --git a/NEWS b/NEWS
index b59a8202576f3aee9de3205097aaf72dc16da345..baddcad4ced90d434c1faceb998bbbf61d9a47d2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,11 @@ New in 1.11.0a:
     user; still, the old Makefile.am files that used to define it should
     still continue to work as before.
 
+  - New macro AM_PROG_AR that looks for an archiver and wraps it in the new
+    'ar-lib' auxiliary script if the found archiver is Microsoft lib.  This
+    new macro is required for LIBRARIES and LTLIBRARIES when automake is
+    run with -Wportability (or -Wall) and -Werror.
+
 Bugs fixed in 1.11.0a:
 
 * Bugs introduced by 1.11:
index 83db668106d0703521efdcf50c754fb197129fa1..1d1bb15dc0073c6fcf10ac1d31b17435d7617d5f 100755 (executable)
@@ -396,6 +396,9 @@ my $package_version_location;
 # TRUE if we've seen AM_ENABLE_MULTILIB.
 my $seen_multilib = 0;
 
+# TRUE if we've seen AM_PROG_AR
+my $seen_ar = 0;
+
 # TRUE if we've seen AM_PROG_CC_C_O
 my $seen_cc_c_o = 0;
 
@@ -2820,6 +2823,13 @@ sub handle_libraries
              &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
            }
        }
+
+      if (! $seen_ar)
+       {
+         msg ('portability', $where,
+              "`$onelib': linking libraries using a non-POSIX\n"
+              . "archiver requires `AM_PROG_AR' in `$configure_ac'")
+       }
     }
 }
 
@@ -3057,6 +3067,13 @@ sub handle_ltlibraries
              &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
            }
        }
+
+      if (! $seen_ar)
+       {
+         msg ('portability', $where,
+              "`$onelib': linking libtool libraries using a non-POSIX\n"
+              . "archiver requires `AM_PROG_AR' in `$configure_ac'")
+       }
     }
 }
 
@@ -5268,6 +5285,7 @@ sub scan_autoconf_traces ($)
                AM_GNU_GETTEXT_INTL_SUBDIR => 0,
                AM_INIT_AUTOMAKE => 0,
                AM_MAINTAINER_MODE => 0,
+               AM_PROG_AR => 0,
                AM_PROG_CC_C_O => 0,
                AM_SILENT_RULES => 0,
                _AM_SUBST_NOTMAKE => 1,
@@ -5459,6 +5477,10 @@ sub scan_autoconf_traces ($)
        {
          $seen_maint_mode = $where;
        }
+      elsif ($macro eq 'AM_PROG_AR')
+       {
+         $seen_ar = $where;
+       }
       elsif ($macro eq 'AM_PROG_CC_C_O')
        {
          $seen_cc_c_o = $where;
index ce1bdbbdf1f5c77f62778d85e572957e355ee84a..c789e743371adafb52dcc6aeb07f71939bab74de 100644 (file)
@@ -3945,6 +3945,15 @@ environment, or use the @option{--with-lispdir} option to
 @command{configure} to explicitly set the correct path (if you're sure
 you have an @command{emacs} that supports Emacs Lisp).
 
+@item AM_PROG_AR(@ovar{act-if-fail})
+@acindex AM_PROG_AR
+@vindex AR
+You must use this macro when you use the archiver in your project, if
+you want support for unusual archivers such as Microsoft lib.  The
+content of the optional argument is executed if the archiver
+interface is not recognized; the default action is to abort configure
+with an error message.
+
 @item AM_PROG_AS
 @acindex AM_PROG_AS
 @vindex CCAS
@@ -4568,6 +4577,7 @@ AC_INIT([hand], [1.2])
 AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -5008,12 +5018,14 @@ by invoking @samp{$(AR) $(ARFLAGS)} followed by the name of the
 library and the list of objects, and finally by calling
 @samp{$(RANLIB)} on that library.  You should call
 @code{AC_PROG_RANLIB} from your @file{configure.ac} to define
-@code{RANLIB} (Automake will complain otherwise).  @code{AR} and
-@code{ARFLAGS} default to @code{ar} and @code{cru} respectively; you
-can override these two variables my setting them in your
-@file{Makefile.am}, by @code{AC_SUBST}ing them from your
-@file{configure.ac}, or by defining a per-library @code{maude_AR}
-variable (@pxref{Program and Library Variables}).
+@code{RANLIB} (Automake will complain otherwise).  You should also
+call @code{AM_PROG_AR} to define @code{AR}, in order to support unusual
+archivers such as Microsoft lib.  @code{ARFLAGS} will default to
+@code{cru}; you can override this variable by setting it in your
+@file{Makefile.am} or by @code{AC_SUBST}ing it from your
+@file{configure.ac}.  You can override the @code{AR} variable by
+defining a per-library @code{maude_AR} variable (@pxref{Program and
+Library Variables}).
 
 @cindex Empty libraries
 Be careful when selecting library components conditionally.  Because
index 0cf074b4ebb597951b03e283813027864543054c..c801894f967536ee202a7da364f30b5cb1dc506d 100644 (file)
@@ -22,6 +22,7 @@ m4datadir = $(datadir)/aclocal-$(APIVERSION)
 
 dist_m4data_DATA = \
 $(top_srcdir)/m4/amversion.m4 \
+ar-lib.m4 \
 as.m4 \
 auxdir.m4 \
 ccstdc.m4 \
index ff4dd433fd29e54592aea7a656fc5f91571eec9d..16388ee14c387883e59588bd981597fda9d48dcf 100644 (file)
@@ -188,6 +188,7 @@ top_srcdir = @top_srcdir@
 m4datadir = $(datadir)/aclocal-$(APIVERSION)
 dist_m4data_DATA = \
 $(top_srcdir)/m4/amversion.m4 \
+ar-lib.m4 \
 as.m4 \
 auxdir.m4 \
 ccstdc.m4 \
diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4
new file mode 100644 (file)
index 0000000..822ca60
--- /dev/null
@@ -0,0 +1,58 @@
+##                                                          -*- Autoconf -*-
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          m4_default([$1],
+            [AC_MSG_ERROR([could not determine $AR interface])])
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   ])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
index f1fd4ceaac60ad8737d72b62c7dbf345c950b957..b0be5564b3a50e86c6e8be2f02b310a4cba0170a 100644 (file)
@@ -106,8 +106,19 @@ ansi8.test \
 ansi9.test \
 ansi10.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 \
index a6e17a1a85c32837ff193978c299c39970303d0e..3c19988d0cca86866b8da463288012db04c298f7 100644 (file)
@@ -384,8 +384,19 @@ ansi8.test \
 ansi9.test \
 ansi10.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 \
index 6ef6f6bcfad6af31be7221f8a88911832844d7ac..a40baa40d9a4a457474d946b4896bb71bfe3210b 100755 (executable)
@@ -20,6 +20,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
@@ -32,6 +33,7 @@ END
 
 : > maude.c
 : > liver.c
+: > ar-lib
 
 $ACLOCAL
 
index 9fa96ece88dccf7da9e4fa7dab0d7de50b069c04..eab8ca80605f55d5c126f53bb32bc50d0d1ce809 100755 (executable)
@@ -25,6 +25,7 @@ set -e
 
 cat >>configure.in <<EOF
 AC_PROG_RANLIB
+AM_PROG_AR
 AC_PROG_CC
 MY_MACRO
 AC_CONFIG_FILES([lib/Makefile])
@@ -60,7 +61,7 @@ EOF
 
 $ACLOCAL -I m4
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
 ./configure
 $MAKE check-not-foo
 
index 4ff2c8633a70c7ca16dd80e6f9c0f5981aabdaff..68e12498f216c4518677b45d1b268b47cb2cb193 100755 (executable)
@@ -25,6 +25,7 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CC_STDC
 AM_C_PROTOTYPES
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([hello])
 AC_CONFIG_FILES([dir/Makefile])
diff --git a/tests/ar-lib2.test b/tests/ar-lib2.test
new file mode 100755 (executable)
index 0000000..67a64e9
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if AM_PROG_AR installs ar-lib.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_AR
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = wish
+wish_SOURCES = a.c
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+# Make sure ar-lib is installed, and that Automake says so.
+grep '^configure\.in:.*install.*ar-lib' stderr
+test -f ar-lib
+
+:
diff --git a/tests/ar-lib3.test b/tests/ar-lib3.test
new file mode 100755 (executable)
index 0000000..6bcf6c2
--- /dev/null
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if lib_LIBRARIES requests AM_PROG_AR.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+
+grep 'requires.*AM_PROG_AR' stderr
+
+cat >> configure.in << 'END'
+AM_PROG_AR
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+
+:
diff --git a/tests/ar-lib4.test b/tests/ar-lib4.test
new file mode 100755 (executable)
index 0000000..e05a8c2
--- /dev/null
@@ -0,0 +1,57 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if lib_LTLIBRARIES requests AM_PROG_AR.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cp configure.in X
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = libfoo.la
+libfoo_la_SOURCES = foo.c
+END
+
+libtoolize
+$ACLOCAL
+AUTOMAKE_fails
+
+grep 'requires.*AM_PROG_AR' stderr
+
+cp X configure.in
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+
+:
diff --git a/tests/ar-lib5a.test b/tests/ar-lib5a.test
new file mode 100755 (executable)
index 0000000..cb73f92
--- /dev/null
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if AM_PROG_AR triggers the use of the ar-lib script.
+# This test requires Microsoft lib.
+# Keep this test in sync with sister test `ar-lib5b.test'.
+
+required=lib
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+# We want to test the content of am_cv_ar_interface in the Makefile.
+AC_SUBST([am_cv_ar_interface])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libwish.a
+libwish_a_SOURCES = wish.c
+
+check-local:
+       test x'$(am_cv_ar_interface)' = x'lib'
+       test -f ar-lib-worked
+MOSTLYCLEANFILES = ar-lib-worked
+END
+
+cat > wish.c << 'END'
+int wish(void) { return 0; }
+END
+
+mkdir auxdir
+cat > auxdir/ar-lib << 'END'
+# /bin/sh
+:> ar-lib-worked
+END
+chmod +x auxdir/ar-lib
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Sanity check: test that it is ok to use `am_cv_ar_interface' as we do.
+$FGREP 'am_cv_ar_interface=' configure
+
+./configure AR=lib RANLIB=:
+
+$MAKE check
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS='AR=lib RANLIB=:'
+
+:
diff --git a/tests/ar-lib5b.test b/tests/ar-lib5b.test
new file mode 100755 (executable)
index 0000000..181c24b
--- /dev/null
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if AM_PROG_AR triggers the use of the ar-lib script.
+# This test does not require Microsoft lib.
+# Keep this test in sync with sister test `ar-lib5a.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+# We want to test the content of am_cv_ar_interface in the Makefile.
+AC_SUBST([am_cv_ar_interface])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libwish.a
+libwish_a_SOURCES = wish.c
+
+check-local:
+       test x'$(am_cv_ar_interface)' = x'lib'
+       test -f ar-lib-worked
+MOSTLYCLEANFILES = ar-lib-worked
+END
+
+cat > wish.c << 'END'
+int wish(void) { return 0; }
+END
+
+mkdir auxdir
+cat > auxdir/ar-lib << 'END'
+# /bin/sh
+:> ar-lib-worked
+END
+chmod +x auxdir/ar-lib
+
+# Let's fake microsoft lib.
+mkdir bin
+cat > bin/lib << 'END'
+# /bin/sh
+case " $* " in
+  *' -OUT:'*) exit 0;;
+  *' cru '*) exit 1;;
+  *) : > ar-lib-worked;;
+esac
+END
+chmod +x bin/lib
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Sanity check: test that it is ok to use `am_cv_ar_interface' as we do.
+$FGREP 'am_cv_ar_interface=' configure
+
+./configure AR=bin/lib RANLIB=:
+
+$MAKE check
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="AR=`pwd`/bin/lib RANLIB=:"
+
+:
diff --git a/tests/ar-lib6a.test b/tests/ar-lib6a.test
new file mode 100755 (executable)
index 0000000..f1b982c
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test AM_PROG_AR ordering requirements
+# Keep this test in sync with sister test `ar-lib6b.test'.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
+AM_PROG_AR
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+
+$EGREP '(AC_PROG_LIBTOOL|LT_INIT).*before.*AM_PROG_AR' stderr
+
+:
diff --git a/tests/ar-lib6b.test b/tests/ar-lib6b.test
new file mode 100755 (executable)
index 0000000..5487add
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test AM_PROG_AR ordering requirements for older Libtools
+# Keep this test in sync with sister test `ar-lib6a.test'.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_AR
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+
+$EGREP 'AC_PROG_LIBTOOL.*before.*AM_PROG_AR' stderr
+
+:
diff --git a/tests/ar-lib7.test b/tests/ar-lib7.test
new file mode 100755 (executable)
index 0000000..3f758a9
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if automake warns if ar-lib is missing when AM_PROG_AR is used.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_PROG_AR
+END
+
+:> Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails
+
+grep '^configure\.in:.*ar-lib.*not found' stderr
+
+$AUTOMAKE --add-missing
+
+:
index dbdf2465760409dbca8fb9b1b28a8fedca93a099..06dcde3841b4309e01063d06416aeb4cdca2040b 100755 (executable)
@@ -21,6 +21,7 @@
 set -e
 
 cat >> configure.in << 'END'
+AM_PROG_AR
 AC_SUBST([AR], ['echo it works'])
 AC_SUBST([ARFLAGS], ['>'])
 AC_SUBST([RANLIB], ['echo really works >>'])
@@ -32,6 +33,8 @@ lib_LIBRARIES = libfoo.a
 libfoo_a_SOURCES =
 END
 
+:> ar-lib
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
index 329f80491c5d4d4ccd562504fd3c054acd802534..f8ad559877175221e6d5d6ae2ad83522fb6cebfb 100755 (executable)
@@ -33,7 +33,7 @@ libfoo_a_SOURCES = foo.c
 END
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 grep '^ARFLAGS =' Makefile.in
 grep '^AR =' Makefile.in
 
diff --git a/tests/ar3.test b/tests/ar3.test
new file mode 100755 (executable)
index 0000000..1d5e84e
--- /dev/null
@@ -0,0 +1,43 @@
+#! /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 AR, ARFLAGS, etc. works also when the macro AM_PROG_AR
+# is used.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+EXTRA_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+END
+
+: > ar-lib
+
+$ACLOCAL
+$AUTOMAKE
+$EGREP '^ARFLAGS =' Makefile.in
+$EGREP '^AR =' Makefile.in
+
+:
diff --git a/tests/ar4.test b/tests/ar4.test
new file mode 100755 (executable)
index 0000000..ebd8c57
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test if configure bails out if $AR does not work and AM_PROG_AR is used.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_PROG_AR
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure AR=/bin/false 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+
+grep 'configure: error: could not determine /bin/false interface' stderr
+
+:
diff --git a/tests/ar5.test b/tests/ar5.test
new file mode 100755 (executable)
index 0000000..d00f421
--- /dev/null
@@ -0,0 +1,33 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test the optional argument of AM_PROG_AR.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_PROG_AR([echo spy > bad-archiver-interface-detected])
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure AR=/bin/false
+test -f bad-archiver-interface-detected
+
+:
index 52e968dc5b55921383fa39e62223206f89dd7ba5..d98636f322aeae2ac631840d819ff6507f31baaa 100755 (executable)
@@ -22,6 +22,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
@@ -30,6 +31,8 @@ noinst_LIBRARIES = libx-y.a
 libx_y_a_SOURCES = xy.c
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
 
index 5a0bdf3c305e4f865f228df28fef8d5c104f84c4..0b3e98171337379ed1adf5083936ab056bfa2baf 100755 (executable)
@@ -48,6 +48,7 @@ absmainobj=`pwd`/main.obj
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
index e5f6be9c5eedfdbea1e6e2608de8ee10e353e7fc..28f6cd3e832294588e3d27d6165b9d264a64d4df 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_CONDITIONAL(COND1, true)
 AM_CONDITIONAL(COND2, true)
@@ -49,6 +50,8 @@ endif
 libtest_a_SOURCES = $(TESTSOURCES)
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
 
index b6c998d71be7c755388b5057b3ca51c77d32dad1..88ef3086b3a2ef69d1dece6215ceb594b7033e6f 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AM_MAINTAINER_MODE
+AM_PROG_AR
 AC_PROG_CC
 END
 
@@ -36,6 +37,8 @@ nodist_librsaref_a_SOURCES = desc.c digit.c
 BUILT_SOURCES = $(nodist_librsaref_a_SOURCES)
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE
 
index 2959f8bac2c462035d739b28eb6368627e726e4b..b8edd3b52be46d7d65ffc1ee8afb70d4409d226f 100644 (file)
@@ -278,6 +278,14 @@ do
       echo "$me: running javac -version -help"
       javac -version -help || exit 77
       ;;
+    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
index 4f2df974c0f02987012251cfa5ea35dd3679ec4e..3c3602f587499a9809bfaf1ef784b40037a310e0 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index ea15e20ad79241f8c2b15fb24cb6e749304be423..c7734b138a953b1afcc4c1f43bf5e78bf49923f1 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
index 47f09fc4a46624a7345d446119ae9ffb5daa4f2c..9b0ed220d8718479ff62f071b4a7dbddbc635ae4 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
index d36e75462cd298d289b624ff0c82ec6514afcfbb..56514792df1182847130de36ad3a3c169d74d047 100755 (executable)
@@ -26,6 +26,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index d6151a714d0b168b65d23a7770831b48a9d8342d..cc93403192bc9044c07ee20291aef820ba21cb2e 100755 (executable)
@@ -56,6 +56,7 @@ AC_PROG_FC
 AC_FC_SRCEXT([f90], [],
   [AC_MSG_FAILURE([$FC compiler cannot create executables], 77)])
 AC_FC_LIBRARY_LDFLAGS
+AM_PROG_AR
 LT_PREREQ([2.0])
 AC_PROG_LIBTOOL
 AC_OUTPUT
index 1fb4f37a89197c6238ad05b405171741d1d23020..f4003775ad0a905ca1a5b5f7f3658114e7154a80 100755 (executable)
@@ -25,6 +25,7 @@ set -e
 cat >>configure.in <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index 6a73b7572c98bbf3dd6a301d47745314e4a6f1e2..66a489227e72d0b24302147a19b0a47f7cc6c923 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 cat >>configure.in <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
index 1e756a676c22647250fd0176a9a889b4dd027786..2e5e312f63ab8334be1c1820b91e318fcffaff9d 100755 (executable)
@@ -25,6 +25,7 @@ required='libtool libtoolize'
 set -e
 
 cat >>configure.in <<END
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index 38a1c9c99ae57856d7495d8566b32ee42a3a6859..3fb60b53835cbae147f80e56727777ceb078ee5f 100755 (executable)
@@ -25,6 +25,7 @@ set -e
 
 cat >>configure.in <<END
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_PATH_LISPDIR
 AC_OUTPUT
index 7d007884f8f7f66c84cc5de142a9dffb44f72ad3..c30546196d453a06f8ace3d6357548867c41d60f 100755 (executable)
@@ -33,6 +33,7 @@ set -e
 
 cat >> configure.in <<'EOF'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 EOF
index 39ca274648c15c2242ce551a390b373e89d4cd8b..c00f227d705e8f589f80efb214cebbcfa0447ce8 100755 (executable)
@@ -21,6 +21,7 @@ required=libtool
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_SUBST([LTLIBOBJS], [q.o])
 AM_CONDITIONAL(USE_SWIG, :)
@@ -37,6 +38,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 : > q.c
index 0d24741620f15bddaf80311e8be553f544bb43de..97dffecd02e795d0b4cc9d0fbb0fd9cab9071ebb 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foo])
 AC_OUTPUT
@@ -33,6 +34,8 @@ noinst_LIBRARIES = libfoo.a
 libfoo_a_LIBADD = @LIBOBJS@
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'Makefile.am:2:.*foo\.c' stderr
index 204ff8bb4c90b03167f2a4cb791e94eee8c5d93d..fc7f17372f6cf461f863d5e71205f2035118d930 100755 (executable)
@@ -22,6 +22,7 @@ cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([mountlist])
 AC_OUTPUT(Makefile)
@@ -33,6 +34,7 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = @LIBOBJS@
 END
 
+: > ar-lib
 : > mountlist.c
 
 $ACLOCAL || Exit 1
index 5f1d02908385465bc22b98c01dd69109b41771c2..e4522bc10d413b983c672c880951aed98cdbb443 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foo])
 AC_LIBOBJ([bar])
@@ -44,6 +45,7 @@ p1_LDADD = @LIBOBJS@
 p2_SOURCES = bar.c
 END
 
+: > ar-lib
 : > foo.c
 : > bar.c
 
index 6ca68c9e6fcb370cc4513a1f5c0288e4e56c4a53..fc3112b2d761c79c962a8708e3c6e78d5655a9f4 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_LIBOBJ([foo])
 AC_OUTPUT
index 81b0e7222317cee244c13e26fd3957e8955c7cb2..36c01b3bac386a822c8b006b1eb4a13ac4b68a1a 100755 (executable)
@@ -24,6 +24,7 @@ cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([fsusage])
 AC_OUTPUT(subdir/Makefile)
@@ -37,6 +38,7 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = @LIBOBJS@
 END
 
+: > ar-lib
 : > subdir/fsusage.c
 
 $ACLOCAL || Exit 1
index 73a8ab0e2fbc1efd420aeeb8cee7e8a94da088b4..1ff36c4556561b2b72bb7f3ff4de0d252551e907 100755 (executable)
@@ -22,6 +22,7 @@ cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_REPLACE_FUNCS(basename dirname strsignal)
 AC_OUTPUT(Makefile)
@@ -33,6 +34,7 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = @LIBOBJS@
 END
 
+: > ar-lib
 : > basename.c
 : > dirname.c
 : > strsignal.c
index 206bca6e6ff330a63db58dd650a8bf8ac80c62c4..e14375361feac814ff799ecaeed0ed7c826bbd6c 100755 (executable)
@@ -24,6 +24,7 @@ AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 AC_PROG_CC
 AC_PROG_CC_STDC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_REPLACE_FUNCS(basename dirname strsignal)
 AM_C_PROTOTYPES
@@ -43,6 +44,7 @@ END
 
 : > ansi2knr.1
 : > ansi2knr.c
+: > ar-lib
 
 $ACLOCAL || Exit 1
 $AUTOMAKE  -Wno-obsolete || Exit 1
index 1e2b58b9e713414fdd3d03ea7ee9f1231b9aee77..8adc575c112d33269beac509e7aacec89d121470 100755 (executable)
@@ -22,6 +22,7 @@ cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AM_MAINTAINER_MODE
 AC_PROG_CC
+AM_PROG_AR
 END
 
 cat > Makefile.am << 'END'
@@ -30,5 +31,7 @@ lib_LIBRARIES = libfoo.a
 libfoo_a_DEPENDENCIES = libzot.a
 END
 
+: > ar-lib
+
 $ACLOCAL || Exit 1
 $AUTOMAKE
index 51a68d48709c68b75a1ae9447a74215c52d5e34c..44c072685f808344dd79b7e8f2ff897a612717f1 100755 (executable)
@@ -22,6 +22,7 @@ required=libtoolize
 set -e
 
 cat >> configure.in << 'END'
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index a50f6a444dcf4e1c3126b169efda90bab0794db7..0120fa9e06b3d87e33f068d9a7929c9f86a7cb6f 100755 (executable)
@@ -24,6 +24,7 @@ AC_INIT
 AM_INIT_AUTOMAKE(mypackage,0.1)
 
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 
 AC_CONFIG_FILES([
index 3427f2892aab5ea867beb05d09178c5d36be5d48..1643f31ebda4997fc85df41f9db2f549a36bf7ab 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_OUTPUT
 END
index c7f0476db7311f92a5623e6abc7361da95520d01..820838812baa8c828633d7f4b82fc752d222e11d 100755 (executable)
@@ -27,6 +27,7 @@ cat >>configure.in <<'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [false])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index ad01b149a1e3fc52b25b907a3024dfdb72b3600d..ea5fd9c2c6366d2ed02e20f5a91869f8b2bb446f 100755 (executable)
@@ -26,6 +26,7 @@ cat >>configure.in <<'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [false])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index a2f912f432b5134ed1935958db2dd4e64e9061df..8ebce0a2d863dcd987d859f90a9b5bbb23be65be 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_OUTPUT
index a1bb88a5ce7484802e7c3aed16d5c79bd575c9db..ed1b6cf704ccf615bccd646e2bc1e8d33113d283 100755 (executable)
@@ -25,6 +25,7 @@ cat >>configure.in <<'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [false])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index c0d9688a8d7f1b48d998438f365619cfd4a86187..a27a1da057994cf70a9342d53789e14a6403d05e 100755 (executable)
@@ -26,6 +26,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_OUTPUT
index 5ff75db4d088de144b7c7966b1148c0224b771e7..d7cc884a0253997d40343810221b631f4253cca5 100755 (executable)
@@ -21,6 +21,7 @@ required=libtool
 
 cat >> configure.in << 'END'
 AC_SUBST(LTLIBOBJS)
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
@@ -34,6 +35,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 
index 13a21836aeb4be5e53ca8fb6d4aecd24072d8590..60987963809987e77b8b97bbc050e65f471e3d9f 100755 (executable)
@@ -24,6 +24,7 @@ cat >> configure.in << 'END'
 AM_CONDITIONAL([COND1], [true])
 AM_CONDITIONAL([COND2], [true])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
@@ -44,6 +45,8 @@ VAR = 1 \
       3
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 
index 0350a3d8a545cfcf5113666c54a3b267efa3fde1..401572be97aea0b73e3d3c0990f340ff2d4dfbe5 100755 (executable)
@@ -27,6 +27,7 @@ AM_CONDITIONAL([WANT_LIBFOO], [true])
 AM_CONDITIONAL([WANT_LIBBAR], [false])
 AC_SUBST([WANTEDLIBS], ['lib1foo.la lib1bar.la'])
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index 1687513cde32140d4da9b392c94860fc591bd110..898c97138d9b939a1c6a410c7903aec6eb7d704e 100755 (executable)
@@ -23,6 +23,7 @@ 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 0ec2132d2e8b54da441eb77087d6de2689ceda2b..a130b9437fc26bce0970139f797055e97d74c632 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_CONFIG_FILES(sub1/Makefile
                sub2/Makefile
index 43d0ae3cf59a188ca0e66fe864e9303839ff9873..7ece4d493ffe92147978b761f4ea45ead026d288 100755 (executable)
@@ -22,6 +22,7 @@ required=libtool
 set -e
 
 cat >> configure.in << 'END'
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_PROG_CXX
 AM_CONDITIONAL(HACKING_COMPACT_BUILD, whatever)
@@ -51,6 +52,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 
index b4eaad602ae61a43a825340e5c985ed37895d0c1..8b76bdf81fed09b60ad18928beefb48939827acd 100755 (executable)
@@ -25,6 +25,7 @@ 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 bb3203af1085021d7dad325463646b38d2c7ba29..a4d715e52173e16f02ee9b281e0529bc02d5fca8 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_CONDITIONAL([COND], [:])
 AC_OUTPUT
@@ -46,7 +47,7 @@ AUTOMAKE_fails --add-missing
 # libtoolize might have installed config.guess and config.sub already,
 # and autom4te might warn about bugs in Libtool macro files, so filter
 # out warnings about Makefile.am only.  We don't care in this test
-# whether automake installs config.guess and config.sub.
+# whether automake installs config.guess, config.sub and ar-lib.
 
 cat >expected <<'END'
 Makefile.am:5: sub/liba2.la multiply defined in condition COND
index fd664732465ef1d356a377a210b52511e133c929..2df001721f3cd8ca5025885ca0f4ecceb3ed8061 100755 (executable)
@@ -21,6 +21,7 @@ required=libtool
 
 cat >> configure.in << 'END'
 AC_SUBST(LTLIBOBJS)
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
@@ -32,6 +33,7 @@ END
 
 : > ltconfig
 : > ltmain.sh
+: > ar-lib
 : > config.guess
 : > config.sub
 
index 2c9911d0fcee318605e2a41f265eed12b0561a0a..e8fa6f0c79170638e89d538f97a1b3c5b84b33b9 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index 0f6921136beb7059131914992c47937186fe89ef..ef4a5f71cf037d52b76c6286832141a3d61a9f23 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat >>configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index 3f88be30a493b7ca921803404a404b6fe7aa9ec6..1072a574549ce9b71b33221c82f2ff63ac52dedb 100755 (executable)
@@ -66,6 +66,7 @@ AC_CONFIG_SRCDIR(foo.c)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_ENABLE_MULTILIB(Makefile,[..])
 AC_CONFIG_FILES([Makefile])
@@ -89,6 +90,7 @@ AC_INIT(libbar, 0.1, nobody@localhost)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AM_ENABLE_MULTILIB(Makefile,[..])
 AC_CONFIG_FILES([Makefile sub/Makefile])
index 12b055ec97fc73632d124e11792ff1d2d19969a7..2a0cf68b3659dc199d56b3ac6135e586228c9d81 100755 (executable)
@@ -26,6 +26,7 @@ set -e
 
 cat >> configure.in <<'EOF'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 EOF
index 8b0dc6e902350a67f50f292f244b3ee5ba1c9657..cac8756278246a4acc2fde2f94c7224006377aea 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in <<'EOF'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 EOF
index 3f33c32106d96ba41c58ace2b33eb57caecca53c..b04bb0d620686b9767a3aedf110459502c01ce38 100755 (executable)
@@ -34,9 +34,12 @@ END
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
+: > ar-lib
+
 $ACLOCAL || Exit 1
 $AUTOMAKE || Exit 1
 
index ee46b4b44ad9c2802986fc38a0079a582e8d7c2d..0b0d963c495ae151bc4ac69689a154243bd2dfbb 100755 (executable)
@@ -45,7 +45,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --copy --add-missing
+$AUTOMAKE -Wno-portability --copy --add-missing
 
 ./configure --prefix "`pwd`/inst"
 
index c47f32ebae04256fbc011d84512921a7e936764f..3189fb4cbc287b98b66afcb28e88e7765ca55c35 100755 (executable)
@@ -47,7 +47,7 @@ END
 libtoolize
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --copy --add-missing
+$AUTOMAKE -Wno-portability --copy --add-missing
 
 ./configure --prefix "`pwd`/inst"
 
index 7676c4bc6e597f62c2eedf503ac8fba5115fbd50..4bf2f74940dc8ae16f7360fa6e1bc0c4b71f37a9 100755 (executable)
@@ -68,7 +68,7 @@ done
 libtoolize --force
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE -Wno-portability -a
 
 # Sanity check: make sure the variable we are attempting to force
 # is used by configure
index 88f773380a9629d2d1f69e34273fe7fc84f91ce3..d06ddb431e8f4fb0db79b39575bb4cf09d1bda7b 100755 (executable)
@@ -81,7 +81,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 ./configure
 $MAKE distcheck
 
@@ -97,7 +97,7 @@ mv -f configure.int configure.in
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -108,7 +108,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @LIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-portability
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -139,7 +139,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
+$AUTOMAKE -Wno-portability --add-missing
 ./configure
 test ! -d src/lib
 test ! -d 'src/$(top_builddir)'
@@ -176,7 +176,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 ./configure
 $MAKE distcheck
 
index 0af46467a8cfd01a0b18a5b2dcc31e68d179f4bf..3e6c927e7ca4ab4d54ced096b4eaff36911b2367 100755 (executable)
@@ -82,7 +82,7 @@ EOF
 libtoolize
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE -Wno-portability -a
 ./configure
 $MAKE distcheck
 
@@ -99,7 +99,7 @@ mv -f configure.int configure.in
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE -Wno-portability -a
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -110,7 +110,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @LTLIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-portability
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -140,7 +140,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
+$AUTOMAKE -Wno-portability --add-missing
 ./configure
 test ! -d src/lib
 test ! -d 'src/$(top_builddir)'
@@ -177,7 +177,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 ./configure
 $MAKE distcheck
 
index b94bc16600571cfbfffdd83ee9040d44015d8d9a..fc6a1ba6a14a1e4fe5d267605882ccb1372f0dde 100755 (executable)
@@ -83,7 +83,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 ./configure
 $MAKE distcheck
 
@@ -100,7 +100,7 @@ mv -f configure.int configure.in
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -111,7 +111,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @ALLOCA@/' src/t > src/Makefile.am
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-portability
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -142,7 +142,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
+$AUTOMAKE -Wno-portability --add-missing
 ./configure
 $MAKE
 test ! -d src/lib
@@ -179,7 +179,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 ./configure
 $MAKE distcheck
 
index ab911ad15866aee350d8cbf055d5dab24e128c02..f2d507cff4acec24fa51c3781f751bc75e9ea029 100755 (executable)
@@ -39,7 +39,7 @@ END
 : > config.sub
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-portability
 
 grep '^LINK =' Makefile.in
 
index 645f318f256433e1d836916fe119516507db32bb..c09e6cab2eb552e82166549832ff4c811c81155f 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 AM_PROG_GCJ
index 315ee4ee82917e18df1445c2f748b89585358df1..d60ecbf0ccb4e76dc14bbfce18d346134f5ea429 100755 (executable)
@@ -30,6 +30,7 @@ set -e
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
@@ -75,7 +76,7 @@ END
 : > bar.h
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -a
 $AUTOCONF
 
 cwd=`pwd` || fatal_ "cannot get current working directory"
index 88e0817293bae0cd185a92fd330efe646b96cb88..16e9f43039617c668bc4ced6fecb0177c60e5bc8 100755 (executable)
@@ -26,6 +26,7 @@ set -e
 
 oIFS=$IFS # Saved for later.
 
+: > ar-lib
 : > ltmain.sh
 : > texinfo.tex
 : > elisp-comp
@@ -35,6 +36,7 @@ oIFS=$IFS # Saved for later.
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_SUBST([LIBTOOL], [:]) dnl So that we don't have to require Libtool.
 AM_PROG_GCJ
index f326808ff7a39a9bec9c4a18d737f14a1dc1bbd6..17f450a8d7e50d0274b0092bfc220d8ddc29aebc 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat >> configure.in <<'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 AM_PROG_GCJ
@@ -44,6 +45,7 @@ echo '@setfilename foo' > foo.texi
 : > texinfo.tex
 : > py-compile
 : > elisp-comp
+: > ar-lib
 
 # Setup Makefile.am.
 
index 17f19598021d09b2285a132360bae8603791fa60..4d66a0a99112e158c8cbd531720dee7d7e1c4aab 100755 (executable)
@@ -29,6 +29,7 @@ cat >>configure.in <<'EOF'
 AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
+AM_PROG_AR
 AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 AC_OUTPUT
index 9c343c0d779b9b3a3b010f409f404035d47999f5..4ef4653fedbcfb6b9b24130a5510e4419ff251a0 100755 (executable)
@@ -30,6 +30,7 @@ cat >>configure.in <<'EOF'
 AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
+AM_PROG_AR
 AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 AC_OUTPUT
index f0abb290295f14f98a939f00cf1387ab2c61bfef..76d97fcf7db06f2a54d57f6e32e7fd64eaee6e5d 100755 (executable)
@@ -30,6 +30,7 @@ AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 EOF
index 614d6c25e10ac0d967808794c59ec8781c905a97..d0c8ba66072216405e3ccfacfb219ecd4f0eccd5 100755 (executable)
@@ -61,6 +61,7 @@ AC_PROG_LEX
 AC_PROG_F77
 AC_PROG_FC
 AM_PROG_GCJ
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 AM_PROG_UPC
index 0dc7fccc4cb5319ae911bc4eaed0ecaafa7ee82a..f67fd7b7087fc09cc2f753047214f28041ffe910 100755 (executable)
@@ -24,6 +24,7 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CXX
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
@@ -35,6 +36,8 @@ libfoo_a_CFLAGS = -DBAR
 libfoo_a_CXXFLAGS = -DZOT
 END
 
+: > ar-lib
+
 # Make sure `compile' is required.
 $ACLOCAL
 AUTOMAKE_fails
index c5d543c230715141ae59ca15ab0e57a67daa146b..5da42adafb0b567761f5a8ebc202dfd76e5c961f 100755 (executable)
@@ -32,6 +32,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index 5786ded897f60bb8b8046b23a1ac9e27adfc16b7..bab0a38e0480913f38829cefb57bda4a5b0354dc 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_OUTPUT
 END
index b1596733487ca207f96726a2b3b873bee8c80e95..34b02545fb3ce2b143141ec44ac0573ebe5f1170 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
index 7ea10f8945ed4423983f6fe8f6d2a2f386bcfd93..9d4efec34b85ce71e44c711e2557f479a4f7dbca 100755 (executable)
@@ -26,6 +26,7 @@ mkdir lib src
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AC_PROG_CC
+AM_PROG_AR
 AC_CONFIG_FILES([lib/Makefile src/Makefile])
 AC_OUTPUT
 END
@@ -56,6 +57,8 @@ cat > src/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
+: > ar-lib
+
 $ACLOCAL
 $AUTOMAKE --gnu
 
index a84f28e9cba398fdb1bbedea3db2d8b97d258e5d..a6a0035b8864b28948ac05bd2d4e0cfab572f7b5 100755 (executable)
@@ -28,6 +28,7 @@ cat >> configure.in << 'END'
 AC_CONFIG_FILES([lib/Makefile])
 AC_PROG_RANLIB
 AC_PROG_CC
+AM_PROG_AR
 AC_OUTPUT
 END
 
index dbddf29c15f6dfc5fc6df799d18f50aed9f0f60b..e446fba7ab91876feb46983914845a3515a5d821 100755 (executable)
@@ -26,6 +26,7 @@ AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([subdir-objects])
 
 AM_PROG_AS
+AM_PROG_AR
 AC_PROG_RANLIB
 
 AC_CONFIG_FILES([Makefile])
index 83f3a31ef4317cf4f8005994032df8a109b34a76..39ba33e3a8886cebe99781ea9f5c5de63e53f346 100755 (executable)
@@ -25,6 +25,7 @@ cat > configure.in << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_CXX
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
index 36629372653a75a83cfb6ba9768ec7597df875ed..cb85bd46ac3a26e07e757f0584e5712c653ca29e 100755 (executable)
@@ -68,6 +68,7 @@ mkdir lib/src
 cat >lib/configure.ac <<'EOF'
 AC_INIT([lib], [2.3])
 AM_INIT_AUTOMAKE
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_YACC
 AC_CONFIG_HEADERS([config.h:config.hin])
index 1bcb170605833ce7469c4ef0ffb940c7d0e036f0..c7adc8c219357a19dd6779fe09ea5266ee36dbbf 100755 (executable)
@@ -24,6 +24,7 @@ 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])
index d82895470eb720fa82ca02955f56bac8a526d55c..34db19fcb0ea241b2abfdff2af655e1c9f9fb0cc 100755 (executable)
@@ -25,6 +25,7 @@ set -e
 cat >> configure.in << 'END'
 AC_CONFIG_SOURCE([fakelib.c])
 AC_PROG_CC
+AM_PROG_AR
 RANLIB=:
 AC_SUBST([RANLIB])
 SUBST=hei
@@ -42,6 +43,8 @@ libfake@SUBST@.a: Makefile $(libfake@SUBST@_a_OBJECTS) $(libfake@SUBST@_a_DEPEND
        @echo here we do some custom stuff, instead of invoking the linker
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'overrid.*libfake@SUBST@.a' stderr
index 131359c8fc58eff6c365650de4a195777213b72c..bdc4928e62ad18b36080bf5ed13c119129a50fd2 100755 (executable)
@@ -25,6 +25,7 @@ set -e
 cat >>configure.in <<EOF
 AC_PROG_CC
 AC_PROG_YACC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 EOF
index 405ce90c5ad98d6cd5bad13d1b4a7a14367eefd6..f55d965c06000612dbb8b4313c7bf72483e61e24 100755 (executable)
@@ -24,6 +24,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
index b3b36aaea5fbf657250acdcb3909359cf2df4ae8..2cf0afa7c26df62435c1caa315e7235766c3641c 100755 (executable)
@@ -24,6 +24,7 @@ required=libtool
 set -e
 
 cat >> configure.in << 'END'
+AM_PROG_AR
 AC_PROG_LIBTOOL
 END
 
@@ -38,6 +39,7 @@ END
 : > ltmain.sh
 : > config.guess
 : > config.sub
+: > ar-lib
 
 $ACLOCAL
 $AUTOMAKE
index 70ff3a5906e281c526a1b7c24789cff71104701b..d2ba0d4ab80a134fdc8e4fa1ac103c5b6c577b1a 100755 (executable)
@@ -23,6 +23,7 @@ required='gcc libtoolize'
 set -e
 
 cat >>configure.in <<'END'
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_OUTPUT
 END
index 3e9ae3648ca36171edfc121b8b347eaa868db72d..34b71d4a4e1726581287479bd2a994526b3fff00 100755 (executable)
@@ -28,6 +28,7 @@ set -e
 
 cat >> 'configure.in' << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_PROG_VALAC
 AC_OUTPUT
index d0cc241017e633ebe483d0664496c24b9f2f46b9..b2c9e1606da23575b7910cb56fc8ab088ba7a4ea 100755 (executable)
@@ -29,6 +29,7 @@ set -e
 
 cat >> 'configure.in' << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_PROG_VALAC
 AC_OUTPUT