compile: implement library search to support MSVC static linking
[automake.git] / tests / conflnk.test
blob6bc59709f1bebb39d7007db722b11e6f8afc2eda
1 #! /bin/sh
2 # Copyright (C) 2003 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)
7 # any later version.
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 links created by AC_CONFIG_LINKS get removed with
18 # `make distclean'
20 . ./defs || Exit 1
22 set -e
24 echo 'SUBDIRS = sdir' > Makefile.am
25 : > src
26 mkdir sdir
27 : > sdir/Makefile.am
28 : > sdir/src2
29 mkdir sdir-no-make
31 cat >>configure.in << 'EOF'
32 AC_CONFIG_FILES(sdir/Makefile)
33 AC_CONFIG_LINKS(dest:src)
34 AC_CONFIG_LINKS(dest2:src)
35 AC_CONFIG_LINKS(sdir/dest3:src)
36 AC_CONFIG_LINKS(dest4:sdir/src2)
37 AC_CONFIG_LINKS(sdir/dest5:sdir/src2 sdir-no-make/dest6:src)
38 AC_OUTPUT
39 EOF
41 $ACLOCAL
42 $AUTOMAKE
43 $AUTOCONF
44 ./configure
46 # Make sure nothing is deleted by `make clean'
47 $MAKE clean
49 test -r dest
50 test -r dest2
51 test -r sdir/dest3
52 test -r dest4
53 test -r sdir/dest5
54 test -r sdir-no-make/dest6
55 test -f src
56 test -f sdir/src2
58 # Make sure the links are deleted by `make distclean' and the original files
59 # are not.
60 $MAKE distclean
62 test -f src
63 test -f sdir/src2
65 test -r dest && Exit 1
66 test -r dest2 && Exit 1
67 test -r sdir/dest3 && Exit 1
68 test -r dest4 && Exit 1
69 test -r sdir/dest5 && Exit 1
70 test -r sdir-no-make/dest6 && Exit 1