2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Test if AM_PROG_AR triggers the use of the ar-lib script.
18 # This test requires Microsoft lib.
19 # Keep this test in sync with sister test 'ar-lib5b.test'.
24 cat > configure.ac
<< END
26 AC_CONFIG_AUX_DIR([auxdir])
28 AC_CONFIG_FILES([Makefile])
32 # We want to test the content of am_cv_ar_interface in the Makefile.
33 AC_SUBST([am_cv_ar_interface])
37 cat > Makefile.am
<< 'END'
38 lib_LIBRARIES
= libwish.a
39 libwish_a_SOURCES
= wish.c
42 test x
'$(am_cv_ar_interface)' = x
'lib'
45 MOSTLYCLEANFILES
= ar-lib-worked
49 int wish
(void
) { return 0; }
53 cat - "$am_scriptdir/ar-lib" > auxdir
/ar-lib
<< 'END'
57 chmod +x auxdir
/ar-lib
61 $AUTOMAKE --add-missing
63 # Sanity check: test that it is ok to use 'am_cv_ar_interface' as we do.
64 $FGREP 'am_cv_ar_interface=' configure
66 .
/configure AR
=lib RANLIB
=:
69 $MAKE distcheck DISTCHECK_CONFIGURE_FLAGS
='AR=lib RANLIB=:'