1#! /bin/sh
2# link.test - make sure that linking against libraries is legal.
3
4# Test script header.
5need_prefix=no
6if test -z "$srcdir"; then
7  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
8  test "$srcdir" = "$0" && srcdir=.
9  test "${VERBOSE+set}" != "set" && VERBOSE=yes
10fi
11. $srcdir/defs || exit 1
12
13# Try a sample link command.
14linkresult=`$libtool -n --mode=link $CC -o gettext ../lib/libnlsut.a`
15test $? -eq 0 || exit 1
16
17echo "$linkresult"
18case "$linkresult" in
19*../lib/libnlsut.a) ;;
20*)
21  echo "$progname: ../lib/libnlsut.a was not used as expected in linking"
22  exit 1
23  ;;
24esac
25exit 0
26