2 # Copyright (C) 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 # Check that "aclocal --install" creates the local m4 directory if
19 # FIXME: this is a good candidate for a conversion to TAP.
21 am_create_testdir
=empty
24 cat > configure.ac
<<END
30 cat > sys-acdir
/my-defs.
m4 <<END
31 AC_DEFUN([MY_MACRO], [:])
34 ACLOCAL
="$ACLOCAL --system-acdir=sys-acdir"
36 $ACLOCAL -I foo
--install
37 test -f foo
/my-defs.
m4
39 $ACLOCAL --install -I "$(pwd)/bar"
40 test -f bar
/my-defs.
m4
42 $ACLOCAL --install -I baz
/sub
/sub2
43 test -f baz
/sub
/sub
2/my-defs.
m4
46 # * zardoz1 should be created, and required m4 files copied into there.
47 # * zardoz2 shouldn't be preferred to quux, even if the former exists
48 # while the latter does not.
50 $ACLOCAL --install -I zardoz1
-I zardoz2
52 grep MY_MACRO zardoz
1/my-defs.
m4
53 ls zardoz2 |
grep .
&& exit 1
55 # Directories in ACLOCAL_PATH should never be created if they don't
57 ACLOCAL_PATH
="$(pwd)/none:$(pwd)/none2" $ACLOCAL --install && exit 1
60 ACLOCAL_PATH
="$(pwd)/none:$(pwd)/none2" $ACLOCAL --install -I x
65 # It's better if aclocal doesn't create the first include dir on failure.
66 $ACLOCAL --install -I none
-I none2
&& exit 1