2 # Copyright (C) 2001, 2002, 2004, 2008, 2010 Free Software Foundation,
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Test for PR automake/220.
19 # Test for problems when conditionals are not actually defined.
20 # Check that the problems is diagnosed by configure.
21 # This isn't perfect (ideally we'd like an error from autoconf),
22 # but it is the best we can do. It certainly makes it easier
23 # to debug the problem.
24 # Note that this should be also in the documentation.
32 int main() { return 0; }
35 cat > Makefile.am << 'EOF'
37 NEVER_DEFINED = missingfile.c
41 main_SOURCES = main.c $(NEVER_DEFINED)
44 cat >> configure.in << 'EOF'
47 [ --enable-foo Enable foo],
48 [ if test "foo" = "bar" ; then
49 AM_CONDITIONAL(NEVER_TRUE, true)
51 AM_CONDITIONAL(NEVER_TRUE, false)
64 # configure should fail since we've done something invalid.
65 ../configure 2>stderr && { cat stderr >&2; Exit 1; }
67 grep 'conditional.*NEVER_TRUE' stderr