2 # Copyright (C) 2004, 2006, 2008, 2010, 2011 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 missing python.
20 # Python is not required for this test.
23 cat >>configure.
in <<'EOF'
24 m4_define([_AM_PYTHON_INTERPRETER_LIST], [IShouldNotExist1 IShouldNotExist2])
26 # The following be executed only after the first run, once a
27 # third argument has been added to the previous macro.
29 test "$PYTHON" = : || exit 1
37 .
/configure
>stdout
2>stderr
&& { cat stdout
; cat stderr
>&2; Exit
1; }
40 grep 'checking for IShouldNotExist1' stdout
41 grep 'checking for IShouldNotExist2' stdout
42 grep 'no suitable Python interpreter found' stderr
44 sed 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.
in >configure.int
45 mv -f configure.int configure.
in
48 # This one should define PYTHON as ":" and exit successfully.
51 # Any user setting should be used.
52 .
/configure PYTHON
=foo
>stdout
&& { cat stdout
; Exit
1; }
54 grep 'PYTHON = foo' stdout