2 # Copyright (C) 2002-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 # Make sure that Automake suggest using AM_PATH_LISPDIR to define lispdir.
22 : TRY
1 -- We lack both EMACS and lispdir.
24 cat > Makefile.am
<< 'END'
30 grep AM_PATH_LISPDIR stderr
31 grep '[Ll]isp source.*EMACS.* undefined' stderr
32 grep '[Ll]isp source.*lispdir.* undefined' stderr
33 grep ' add .*AM_PATH_LISPDIR' stderr
36 : TRY
2 -- Setting lispdir should not be enough.
38 cat > Makefile.am
<< 'END'
39 lispdir
= /usr
/share
/emacs
/site-lisp
45 grep 'lispdir.*undefined' stderr
&& exit 1
46 grep '[Ll]isp source.*EMACS.* undefined' stderr
47 grep 'define .*EMACS.* add .*AM_PATH_LISPDIR' stderr
50 : TRY
3 -- Setting EMACS should not be enough.
52 cat > Makefile.am
<< 'END'
59 grep 'EMACS.*undefined' stderr
&& exit 1
60 grep '[Ll]isp source.*lispdir.* undefined' stderr
61 grep 'define .*lispdir.* add .*AM_PATH_LISPDIR' stderr
64 : TRY
4 -- Setting both EMACS and lispdir is OK.
66 cat > Makefile.am
<< 'END'
67 lispdir
= /usr
/share
/emacs
/site-lisp