2 # Copyright (C) 2003, 2004 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 # Test to make sure that AC_CONFIG_LINKS using a variable source
24 # Skip platforms where `test -e' does not work. (Note that Changing
25 # all `test -e' into `test -h' will not work when AC_CONFIG_LINKS
26 # copies or hardlinks files.)
27 (test -e configure.
in) >/dev
/null
2>&1 || Exit
77
29 cat > Makefile.am
<< 'END'
32 test ! -e $
(distdir
)/sdir
/dest3
33 test ! -e $
(distdir
)/sdir
/dest2
34 test ! -e $
(distdir
)/dest3
35 test ! -e $
(distdir
)/dest2
36 test -f $
(distdir
)/src2
37 ## src3 cannot be distributed, Automake knows nothing about it
38 test ! -e $
(distdir
)/sdir
/src3
39 test ! -e $
(distdir
)/src3
48 cat >>configure.
in << 'EOF'
49 AC_CONFIG_FILES
(sdir
/Makefile
)
52 AC_CONFIG_LINKS
(sdir
/dest2
:src2 sdir
/dest3
:$my_src_dir/src3
)
53 AC_CONFIG_LINKS
($my_dest:src
)
54 # the following is a link whose source is itself a link
55 AC_CONFIG_LINKS
(dest4
:sdir
/dest2
)
56 # Some package prefer to compute links.
58 AC_CONFIG_LINKS
($cmplink)
66 # $my_src_dir and $my_dest are variables local to configure, they should
67 # not appear in Makefile.
68 grep my_src_dir Makefile.
in && Exit
1
69 grep my_dest Makefile.
in && Exit
1
82 test -e dest
# Should still exist, Automake knows nothing about it.
87 ## Cannot do the following, because at the time of writing Autoconf
88 ## (2.59) does not support AC_CONFIG_LINKS source in the build tree.