blob: ed527a21f8316fbc978c62cff7f516bbfb20c1e0 [file]
#! /bin/sh
# depdemo-dups.test - check that duplicate deplibs are not removed
# Test script header.
need_prefix=no
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1
status=:
# Check that things are built
if test -f ../depdemo/l2/libl2.la; then :
else
echo "You must run depdemo-make.test before $0" 1>&2
exit 77
fi
# Change to our build directory.
cd ../depdemo || exit 1
# Try to link with a library, and explicitly name its deplibs
pwd=`pwd`
result=`$libtool -n --mode=link gcc -o something $pwd/l2/libl2.la $pwd/l1/libl1.la` || status=false
$status || exit 1
echo "$result"
case "$result" in
*/libl1.*/libl1.*) ;;
*)
echo "$0: duplicate deplibs should not be removed."
exit 1
;;
esac
exit 0