2 # Copyright (C) 2011 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 # ACLOCAL_PATH, acdir and `--install' interactions when serial number
20 am_create_testdir
=empty
25 cat > configure.
in << 'END'
33 sed '/^# serial/d' $file > t
36 *) (echo "# serial $serial" && cat t
) > $file; rm -f t
;;
38 cat $file # For debugging.
44 sdir
) ok
=sdir ko
=pdir
;;
45 pdir
) ok
=pdir ko
=sdir
;;
46 *) fatal_
"win(): invalud argument \`$1'";;
48 # This is required on fast machine, to avoid caching and timestamp
49 # issues with the autotools (already happened in practice).
50 rm -rf configure aclocal.
m4 autom4te
*.cache m
4/*
51 $ACLOCAL -I m4 --install
52 test -f m
4/foo.
m4 # Sanity check.
54 $FGREP "::$ok:" m
4/foo.
m4
55 $FGREP "::$ok::" configure
56 $FGREP "::$ko::" m
4/foo.
m4 configure
&& Exit
1
62 ACLOCAL
="$ACLOCAL --system-acdir=`pwd`/sdir"
63 ACLOCAL_PATH
=.
/pdir
; export ACLOCAL_PATH
65 cat > sdir
/foo.
m4 << 'END'
66 AC_DEFUN
([AM_FOO
], [::sdir
::])
68 cat > pdir
/foo.
m4 << 'END'
69 AC_DEFUN
([AM_FOO
], [::pdir
::])
72 set_serial
2 sdir
/foo.
m4
73 set_serial
1 pdir
/foo.
m4
76 set_serial
3.3 sdir
/foo.
m4
77 set_serial
5.7 pdir
/foo.
m4
80 set_serial
0 sdir
/foo.
m4
81 set_serial none pdir
/foo.
m4
84 set_serial none sdir
/foo.
m4
85 set_serial
1.2.3 pdir
/foo.
m4