#!/bin/sh

# (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
# All rights reserved.  The file named COPYRIGHT specifies the terms 
# and conditions for redistribution.


#
# $Id: testlib,v 8.1 1993/03/13 01:23:48 panos Exp $
#

#
# Purpose:
#		Invoke the tester script. This is necessary because the tester
#		script requires functions and /bin/sh does not support functions
#		on all OS's. This script decides what shell to use to execute
#		tester. On Suns, it uses /bin/sh. On DECstations, it uses
#		/usr/bin/ksh
#		The decision is made by checking $ARCH
#		

case "$ARCH" in
	"")
		echo "ARCH not defined. Please define it."
		exit 1
		;;
	
	sun4|sun3)
		TESTSHELL=/bin/sh
		LDFLAGS="-Bstatic -lm"
		;;

	dec-mips)
		TESTSHELL=/usr/bin/ksh
		LDFLAGS=
		;;

	*) echo "Unknown architecture: $ARCH"
		exit 2
		;;
esac

export LDFLAGS
export TESTSHELL
$TESTSHELL tester $*

