2 # Copyright (C) 2001-2017 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 PR automake/220.
18 # Test for problems when conditionals are not actually defined.
19 # Check that the problems is diagnosed by configure.
20 # This isn't perfect (ideally we'd like an error from autoconf),
21 # but it is the best we can do. It certainly makes it easier
22 # to debug the problem.
23 # Note that this should be also in the documentation.
27 cat > Makefile.am
<< 'EOF'
29 NEVER_DEFINED
= foo.txt
31 data_DATA
= $
(NEVER_DEFINED
)
34 cat >> configure.ac
<< 'EOF'
36 [ --enable-foo Enable foo
],
37 [ if test "foo" = "bar" ; then
38 AM_CONDITIONAL
([NEVER_TRUE
], [true
])
40 AM_CONDITIONAL
([NEVER_TRUE
], [false
])
53 # configure should fail since we've done something invalid.
54 ..
/configure
2>stderr
&& { cat stderr
>&2; exit 1; }
56 grep 'conditional.*NEVER_TRUE' stderr