2 # demo-noinst-link.test - make sure we do not link with an installed
3 # library when an uninstalled one is to be used
5 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
6 # Written by Gary V. Vaughan, 2003
8 # This file is part of GNU Libtool.
10 # GNU Libtool is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version.
15 # GNU Libtool is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with GNU Libtool; see the file COPYING. If not, a copy
22 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
23 # or obtained by writing to the Free Software Foundation, Inc.,
24 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 . tests/defs || exit 1
31 mv -f "$objdir"/temp/libs/* "$objdir"
32 mv -f "$objdir/temp/libhello.la" "$objdir/temp/hell$EXEEXT" .
38 func_mkdir_p "$objdir/temp/libs"
39 cp -f libhello.la "hell$EXEEXT" "$objdir/temp"
40 cp -f "$objdir"/* "$objdir"/temp/libs
41 trap "func_restore_files" 0 1 2 13 15
44 func_require "demo-inst" "$prefix/lib/libhello.la"
50 func_msg "removing \`libhello.la' and \`hell' from demo"
51 rm -f libhello.la "hell$EXEEXT"
54 func_msg "linking \`hell' with a broken \`demo/libhello.la'"
55 if $MAKE "hell$EXEEXT" libhello_la_OBJECTS=hello.lo; then
56 func_msg "Succeeded: this means the installed library was used, which is wrong"