#!/bin/sh

# 20001031 RJVB
# a simple script that should output the machine dependent libraries. I.e., on an O2 (IP32 architecture),
# we need a basic Performer library to get at the pfSinCos() routine.
# 20020324: the env.variable XGLIBS can be used to (exceptionally) add libraries via the commandline.

MACH="`uname -s`"

case $MACH in
	Darwin|Linux)
		;;
	*)
		MACH="`uname -m`"
		;;
esac


if [ "`uname`" = "AIX" ] ;then
	MACH="AIX"
fi

LIBS=""

echo "Determining required machine-dependent libraries; flags \"$*\"" 1>&2

case $MACH in
	IP22*|IP32*|IRIX*|AIX)
		 # echo "-lstdc++"
		echo "${LIBS} -ldl"
		;;
	i686|i586|Linux)
		 # comment out for cygwin:
		LDL="-ldl"
		echo "${LIBS}" "${LDL}" -lm "-lc" #-lefence
		;;
	"Power Macintosh")
		 # Uncomment for systems before Panther (10.3)
# 		LDL="-ldl"
		echo "${LIBS}" "${LDL}" "-lc" #-lefence
		;;
esac
