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'
27 AC_SUBST
([HELLO_SYSTEM
], [hello-generic.lo
])
28 AM_CONDITIONAL
([LINUX
], true
)
32 cat > Makefile.am
<< 'END'
33 lib_LTLIBRARIES
= libhello.la
34 libhello_la_SOURCES
= hello-common.c
35 EXTRA_libhello_la_SOURCES
= hello-linux.c hello-generic.c
36 libhello_la_LIBADD
= $
(HELLO_SYSTEM
)
37 libhello_la_DEPENDENCIES
= $
(HELLO_SYSTEM
)
39 lib_LTLIBRARIES
+= libhello2.la
40 libhello2_la_SOURCES
= hello-common.c
42 libhello2_la_SOURCES
+= hello-linux.c
44 libhello2_la_SOURCES
+= hello-generic.c
47 bin_PROGRAMS
= hello hello2
48 hello_SOURCES
= main.c
49 hello_LDADD
= libhello.la
50 hello2_SOURCES
= main.c
51 hello2_LDADD
= libhello2.la
54 .
/hello$
(EXEEXT
) |
grep hello-generic
55 .
/hello2$
(EXEEXT
) |
grep hello-linux
59 echo 'char* str() { return "hello-linux"; }' >hello-linux.c
60 echo 'char* str() { return "hello-generic"; }' >hello-generic.c
61 cat >hello-common.c
<<'END'
69 echo 'int main() { print(); return 0; }' >main.c
74 $AUTOMAKE --add-missing