#!/bin/sh

# 20020422 RJVB
# a simple script that should output the machine dependent optimal compiler to
# compile the other (non ascanfc) modules with.
# 20090703: added 'ar' command

MACH="`uname -s`"

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

case $MACH in
	IP22*|IP32*|IRIX*)
		case $1 in
			ascanf)
				echo "ccopt"
				;;
			ar)
				echo "ar r"
				;;
			*)
				echo "gccopt"
				;;
		esac
		;;
	Darwin|"Power Macintosh")
		case $1 in
			dymod|ascanf)
				echo "gccopt"
				;;
			ar)
				echo "libtool -static -o"
				;;
			*)
				echo "gccopt"
				;;
		esac
		;;
	i686|i586|Linux)
		case $1 in
			dymod|ascanf)
# 				echo "gccopt -compiler gcc295.3 -inline"
				echo "gccopt"
				;;
			ar)
				echo "ar r"
				;;
			*)
				echo "gccopt"
				;;
		esac
		;;
	*)
		echo "gccopt"
		;;
esac
