2 # Copyright (C) 2003, 2004, 2007 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 3, 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 for libtool convenience libraries.
18 # This example is taken from the manual.
20 required
='libtoolize gcc'
25 cat >>configure.
in <<'END'
28 AC_CONFIG_FILES(sub1/Makefile
41 cat >Makefile.am
<<'END'
43 lib_LTLIBRARIES = libtop.la
49 bin_PROGRAMS = ltconvtest
50 ltconvtest_SOURCES = test.c
51 ltconvtest_LDADD = libtop.la
57 $(bindir)/ltconvtest$(EXEEXT)
61 cat >sub
1/Makefile.am
<<'END'
62 noinst_LTLIBRARIES = libsub1.la
63 libsub1_la_SOURCES = sub1.c
66 echo 'int sub1 () { return 1; }' > sub
1/sub1.c
68 cat >sub
2/Makefile.am
<<'END'
70 noinst_LTLIBRARIES = libsub2.la
71 libsub2_la_SOURCES = sub2.c
77 echo 'int sub2 () { return 2; }' > sub
2/sub2.c
79 cat >sub
2/sub21
/Makefile.am
<<'END'
80 noinst_LTLIBRARIES = libsub21.la
81 libsub21_la_SOURCES = sub21.c
84 echo 'int sub21 () { return 21; }' > sub
2/sub21
/sub21.c
86 cat >sub
2/sub22
/Makefile.am
<<'END'
87 noinst_LTLIBRARIES = libsub22.la
88 libsub22_la_SOURCES = sub22.c
91 echo 'int sub22 () { return 22; }' > sub
2/sub22
/sub22.c
112 $AUTOMAKE --add-missing
114 # Install libraries in lib/, programs in bin/, and the rest in empty/.
115 # (in fact there is no "rest", so as the name imply empty/ is
116 # expected to remain empty).
117 .
/configure
"--prefix=`pwd`/empty" "--libdir=`pwd`/lib" "--bindir=`pwd`/bin"
121 test -f sub
1/libsub1.la
122 test -f sub
2/libsub2.la
123 test -f sub
2/sub21
/libsub21.la
124 test -f sub
2/sub22
/libsub22.la
130 test -f lib
/libtop.la
132 test -f installcheck-ok
133 rm -f installcheck-ok
135 find empty
-type f
-print > empty.lst
137 test 0 = `wc -l < empty.lst`
141 test ! -f sub
1/libsub1.la
142 test ! -f sub
2/libsub2.la
143 test ! -f sub
2/sub21
/libsub21.la
144 test ! -f sub
2/sub22
/libsub22.la
148 test -f installcheck-ok
149 rm -f installcheck-ok
152 find lib
-type f
-print > lib.lst
153 test 0 = `wc -l < lib.lst`
154 find bin
-type f
-print > bin.lst
155 test 0 = `wc -l < bin.lst`