#! /bin/sh# noinst-link.test - make sure we do not link with an installed# library when an uninstalled one is to be used# Test script header.need_prefix=yesif test -z "$srcdir"; thensrcdir=`echo "$0" | sed 's%/[^/]*$%%'`test "$srcdir" = "$0" && srcdir=.test "${VERBOSE+set}" != "set" && VERBOSE=yesfi. $srcdir/defs || exit 1# Check that things are built.if test -f $prefix/lib/libhello.la; then :elseecho "You must run demo-inst.test before $0" 1>&2exit 77fi# Change to our build directory.cd ../demo || exit 77echo "removing libhello.la and hell from ../demo"rm -f libhello.la hell$EXEEXTecho "linking hell with a broken ../demo/libhello.la"if $make hell$EXEEXT libhello_la_OBJECTS=hello.lo; thenecho "= Succeeded: this means the installed library was used, which is wrong"status=1firm -f libhello.la hell$EXEEXTexit $status