#!/bin/sh
#
# matlab_arch.sh
#
# Reports machine architecture "as if" it was Matlab's machine(); command

UNAME=`uname -s`
VERS=`uname -r`
MACH=`uname -m`

case $UNAME in

    Darwin)
	case $VERS in
	    10.6.*)
		echo MACI64
		;;
	    10.7.*)
		echo MACI64
		;;
	    10.8.*)
		echo MACI64
		;;
	    11.2.*)
		echo MACI64
		;;
	    *)
		echo MACI
		;;
	esac
	;;
    Linux)
	case $MACH in
	    i?86)
		echo GLNX86
		;;
	    x86_64)
		echo GLNXA64
		;;
	    *)
		echo GLNX_UNK
	esac
	;;
    *)
	echo UNKNOWN
	;;
esac

  