2 # Copyright (C) 2011 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'.
26 cat > configure.in << END
28 AC_CONFIG_AUX_DIR([auxdir])
30 AC_CONFIG_FILES([Makefile])
34 # We want to test the content of am_cv_ar_interface in the Makefile.
35 AC_SUBST([am_cv_ar_interface])
39 cat > Makefile.am << 'END'
40 lib_LIBRARIES = libwish.a
41 libwish_a_SOURCES = wish.c
44 test x'$(am_cv_ar_interface)' = x'lib'
47 MOSTLYCLEANFILES = ar-lib-worked
51 int wish(void) { return 0; }
55 # FIXME: make this "installcheck-aware" once we are merged into the
56 # 'testsuite-work' branch.
57 cat - "$testsrcdir"/../lib/ar-lib > auxdir/ar-lib << 'END'
61 chmod +x auxdir/ar-lib
65 $AUTOMAKE --add-missing
67 # Sanity check: test that it is ok to use `am_cv_ar_interface' as we do.
68 $FGREP 'am_cv_ar_interface=' configure
70 ./configure AR=lib RANLIB=:
73 $MAKE distcheck DISTCHECK_CONFIGURE_FLAGS='AR=lib RANLIB=:'