automake currently defines $(AR) only if it sees a _LIBRARIES primary.
That may be an issue or not (and the wrong value for cross setups that
it defines is definitely an issue), but not important for this test
IMVHO, so how about this patch to avoid a spurious test failure as in
http://autobuild.josefsson.org/automake/log-201101150749395803000.txt

        test -f ./subdir/fsusage.c
        test -f libobj2-1.0/subdir/fsusage.c
         tv ./subdir/libtu.a
Make: Cannot load tv.  Stop.
*** Error exit code 1

(The important point for fixing the other $(AR) issues is that the
definition must not clash with one from AC_PROG_LIBTOOL or from users.)

Thanks,
Ralf

    Fix libobj2.test failure with non-GNU make: define $(AR).
    
    * tests/libobj2.test: Ensure $(AR) is suitably defined.

diff --git a/tests/libobj2.test b/tests/libobj2.test
index 3b3ec98..66ca0d0 100755
--- a/tests/libobj2.test
+++ b/tests/libobj2.test
@@ -24,6 +24,7 @@ cat >> configure.in << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_CHECK_TOOLS([AR], [ar])
 AC_LIBOBJ([fsusage])
 AC_OUTPUT
 END

Reply via email to