2 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Test for libtool convenience libraries.
22 # This example is taken from the manual.
24 required
='libtoolize gcc'
29 cat >>configure.
in <<'END'
32 AC_CONFIG_FILES(sub1/Makefile
45 cat >Makefile.am
<<'END'
47 lib_LTLIBRARIES = libtop.la
53 bin_PROGRAMS = ltconvtest
54 ltconvtest_SOURCES = test.c
55 ltconvtest_LDADD = libtop.la
61 $(bindir)/ltconvtest$(EXEEXT)
65 cat >sub
1/Makefile.am
<<'END'
66 noinst_LTLIBRARIES = libsub1.la
67 libsub1_la_SOURCES = sub1.c
70 echo 'int sub1 () { return 1; }' > sub
1/sub1.c
72 cat >sub
2/Makefile.am
<<'END'
74 noinst_LTLIBRARIES = libsub2.la
75 libsub2_la_SOURCES = sub2.c
81 echo 'int sub2 () { return 2; }' > sub
2/sub2.c
83 cat >sub
2/sub21
/Makefile.am
<<'END'
84 noinst_LTLIBRARIES = libsub21.la
85 libsub21_la_SOURCES = sub21.c
88 echo 'int sub21 () { return 21; }' > sub
2/sub21
/sub21.c
90 cat >sub
2/sub22
/Makefile.am
<<'END'
91 noinst_LTLIBRARIES = libsub22.la
92 libsub22_la_SOURCES = sub22.c
95 echo 'int sub22 () { return 22; }' > sub
2/sub22
/sub22.c
116 $AUTOMAKE --add-missing
118 # Install libraries in lib/, programs in bin/, and the rest in empty/.
119 # (in fact there is no "rest", so as the name imply empty/ is
120 # expected to remain empty).
121 .
/configure
--prefix=`pwd`/empty
--libdir=`pwd`/lib
--bindir=`pwd`/bin
125 test -f sub
1/libsub1.la
126 test -f sub
2/libsub2.la
127 test -f sub
2/sub21
/libsub21.la
128 test -f sub
2/sub22
/libsub22.la
134 test -f lib
/libtop.la
136 test -f installcheck-ok
137 rm -f installcheck-ok
139 find empty
-type f
-print > empty.lst
141 test 0 = `wc -l < empty.lst`
145 test ! -f sub
1/libsub1.la
146 test ! -f sub
2/libsub2.la
147 test ! -f sub
2/sub21
/libsub21.la
148 test ! -f sub
2/sub22
/libsub22.la
152 test -f installcheck-ok
153 rm -f installcheck-ok
156 find lib
-type f
-print > lib.lst
157 test 0 = `wc -l < lib.lst`
158 find bin
-type f
-print > bin.lst
159 test 0 = `wc -l < bin.lst`