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
26 cat > configure.ac <<END
32 cat > sys-acdir/my-defs.m4 <<END
33 AC_DEFUN([MY_MACRO], [:])
36 ACLOCAL="$ACLOCAL --system-acdir=sys-acdir"
38 $ACLOCAL -I foo --install
39 test -f foo/my-defs.m4
41 $ACLOCAL --install -I "`pwd`/bar"
42 test -f bar/my-defs.m4
44 $ACLOCAL --install -I baz/sub/sub2
45 test -f baz/sub/sub2/my-defs.m4
48 # * zardoz1 should be created, and required m4 files copied into there.
49 # * zardoz2 shouldn't be preferred to quux, even if the former exists
50 # while the latter does not.
52 $ACLOCAL --install -I zardoz1 -I zardoz2
54 grep MY_MACRO zardoz1/my-defs.m4
55 ls zardoz2 | grep . && Exit 1
57 # Directories in ACLOCAL_PATH should never be created if they don't
59 ACLOCAL_PATH="`pwd`/none:`pwd`/none2" $ACLOCAL --install && Exit 1
62 ACLOCAL_PATH="`pwd`/none:`pwd`/none2" $ACLOCAL --install -I x
67 # It's better if aclocal doesn't create the first include dir on failure.
68 $ACLOCAL --install -I none -I none2 && Exit 1