doc: update Vala documentation
[automake.git] / t / libtool8.sh
blobe7a414657f125f1065238ce045372ecda8489664
1 #!/bin/sh
2 # Copyright (C) 2004-2024 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)
7 # any later version.
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 <https://www.gnu.org/licenses/>.
17 # Make sure Automake diagnoses conflicting installations.
19 required='libtoolize'
20 . test-init.sh
22 cat >>configure.ac <<'END'
23 AM_CONDITIONAL([COND1], [true])
24 AM_CONDITIONAL([COND2], [false])
25 AC_PROG_CC
26 AM_PROG_AR
27 AC_PROG_LIBTOOL
28 AC_OUTPUT
29 END
31 cat >Makefile.am <<'END'
32 if COND1
33 lib_LTLIBRARIES = liba.la
34 EXTRA_LTLIBRARIES = libc.la libc.la libb.la
35 else
36 lib_LTLIBRARIES = libb.la
37 endif
38 if COND2
39 if COND1
40 pkglib_LTLIBRARIES = liba.la
41 endif
42 LIBTOOLFLAGS = ouch
43 endif
44 END
46 libtoolize
47 $ACLOCAL
48 AUTOMAKE_fails --add-missing
49 grep libb stderr && exit 1
50 grep 'Makefile.am:3:.*libc.la.*multiply defined' stderr
51 grep "Makefile.am:9:.*'pkglib" stderr
52 grep "Makefile.am:2:.*'lib" stderr
53 grep 'Makefile.am:11:.*AM_LIBTOOLFLAGS' stderr