#!/bin/sh

### figure out what machine we are on.

uname_i=`uname -i 2>/dev/null`
uname_s=`uname -s 2>/dev/null`
uname_m=`uname -m 2>/dev/null`
uname_o=`uname -o 2>/dev/null`
uname_r=`uname -r 2>/dev/null`

if [ "$uname_m" = "Power Macintosh" ]; then
	uname_r_major=${uname_r%%.*}
	if [ "$uname_r_major" = "8" ]; then
		echo "powerpc-apple-tiger"
	elif [ "$uname_r_major" = "7" ]; then
		echo "powerpc-apple-panther"
	else
		echo "unknown"
	fi
elif [ "$uname_s" = "SunOS" ]; then
	echo "sparc-sun-solaris"
elif [ "$uname_o" = "Cygwin" ]; then
	echo "i386-intel-cygwin"
elif [ "$uname_o" = "GNU/Linux" ]; then
	if [ "$uname_i" = "i386" ]; then
		echo "i386-intel-linux"
	elif [ "$uname_i" = "x86_64" ]; then
		echo "amd64-amd-linux"
	elif [ "$uname_i" = "ppc" ]; then
		echo "powerpc-apple-linux"
	else
		echo "unknown"
	fi
else
	echo "unknown"
fi

# There is also "i386-intel-win32"

