2 # Copyright (C) 2003, 2004 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 for bug in conditionals.
19 required
='libtoolize gcc'
24 cat >> configure.
in << 'END'
28 AC_SUBST
([HELLO_SYSTEM
], [hello-generic.lo
])
29 AM_CONDITIONAL
([LINUX
], true
)
33 cat > Makefile.am
<< 'END'
34 lib_LTLIBRARIES
= libhello.la
35 libhello_la_SOURCES
= hello-common.c
36 EXTRA_libhello_la_SOURCES
= hello-linux.c hello-generic.c
37 libhello_la_LIBADD
= $
(HELLO_SYSTEM
)
38 libhello_la_DEPENDENCIES
= $
(HELLO_SYSTEM
)
40 lib_LTLIBRARIES
+= libhello2.la
41 libhello2_la_SOURCES
= hello-common.c
43 libhello2_la_SOURCES
+= hello-linux.c
45 libhello2_la_SOURCES
+= hello-generic.c
48 bin_PROGRAMS
= hello hello2
49 hello_SOURCES
= main.c
50 hello_LDADD
= libhello.la
51 hello2_SOURCES
= main.c
52 hello2_LDADD
= libhello2.la
55 .
/hello$
(EXEEXT
) |
grep hello-generic
56 .
/hello2$
(EXEEXT
) |
grep hello-linux
60 echo 'char* str() { return "hello-linux"; }' >hello-linux.c
61 echo 'char* str() { return "hello-generic"; }' >hello-generic.c
62 cat >hello-common.c
<<'END'
70 echo 'int main() { print(); return 0; }' >main.c
75 $AUTOMAKE --add-missing