2 # Copyright (C) 2003, 2004, 2010 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 cat > Makefile.am << 'END'
27 test ! -r $(distdir)/sdir/dest3
28 test ! -r $(distdir)/sdir/dest2
29 test ! -r $(distdir)/dest3
30 test ! -r $(distdir)/dest2
31 test -f $(distdir)/src2
32 ## src3 cannot be distributed, Automake knows nothing about it
33 test ! -r $(distdir)/sdir/src3
34 test ! -r $(distdir)/src3
43 cat >>configure.in << 'EOF'
44 AC_CONFIG_FILES(sdir/Makefile)
47 AC_CONFIG_LINKS(sdir/dest2:src2 sdir/dest3:$my_src_dir/src3)
48 AC_CONFIG_LINKS($my_dest:src)
49 # the following is a link whose source is itself a link
50 AC_CONFIG_LINKS(dest4:sdir/dest2)
51 # Some package prefer to compute links.
53 AC_CONFIG_LINKS($cmplink)
61 # $my_src_dir and $my_dest are variables local to configure, they should
62 # not appear in Makefile.
63 grep my_src_dir Makefile.in && Exit 1
64 grep my_dest Makefile.in && Exit 1
77 test -r dest # Should still exist, Automake knows nothing about it.
82 ## Cannot do the following, because at the time of writing Autoconf
83 ## (2.59) does not support AC_CONFIG_LINKS source in the build tree.