1#! /bin/sh 2# noinst-link.test - make sure we do not link with an installed 3# library when an uninstalled one is to be used 4 5# Test script header. 6need_prefix=yes 7if test -z "$srcdir"; then 8 srcdir=`echo "$0" | sed 's%/[^/]*$%%'` 9 test "$srcdir" = "$0" && srcdir=. 10 test "${VERBOSE+set}" != "set" && VERBOSE=yes 11fi 12. $srcdir/defs || exit 1 13 14# Check that things are built. 15if test -f $prefix/lib/libhello.la; then : 16else 17 echo "You must run demo-inst.test before $0" 1>&2 18 exit 77 19fi 20 21# Change to our build directory. 22cd ../demo || exit 77 23 24echo "removing libhello.la and hell from ../demo" 25rm -f libhello.la hell$EXEEXT 26 27echo "linking hell with a broken ../demo/libhello.la" 28if $make hell$EXEEXT libhello_la_OBJECTS=hello.lo; then 29 echo "= Succeeded: this means the installed library was used, which is wrong" 30 status=1 31fi 32 33rm -f libhello.la hell$EXEEXT 34 35exit $status 36