2 # Copyright (C) 2003-2012 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
='cc native libtoolize'
22 cat >> configure.ac
<< 'END'
26 AC_SUBST
([HELLO_SYSTEM
], [hello-generic.lo
])
27 AM_CONDITIONAL
([LINUX
], [true
])
31 cat > Makefile.am
<< 'END'
32 lib_LTLIBRARIES
= libhello.la
33 libhello_la_SOURCES
= hello-common.c
34 EXTRA_libhello_la_SOURCES
= hello-linux.c hello-generic.c
35 libhello_la_LIBADD
= $
(HELLO_SYSTEM
)
36 libhello_la_DEPENDENCIES
= $
(HELLO_SYSTEM
)
38 lib_LTLIBRARIES
+= libhello2.la
39 libhello2_la_SOURCES
= hello-common.c
41 libhello2_la_SOURCES
+= hello-linux.c
43 libhello2_la_SOURCES
+= hello-generic.c
46 bin_PROGRAMS
= hello hello2
47 hello_SOURCES
= main.c
48 hello_LDADD
= libhello.la
49 hello2_SOURCES
= main.c
50 hello2_LDADD
= libhello2.la
53 .
/hello$
(EXEEXT
) |
grep hello-generic
54 .
/hello2$
(EXEEXT
) |
grep hello-linux
58 cat > hello-linux.c
<<'END'
59 const char* str (void)
65 cat > hello-generic.c
<<'END'
66 const char* str (void)
68 return "hello-generic";
72 cat > hello-common.c
<<'END'
74 const char* str (void);
92 $AUTOMAKE --add-missing