#!/bin/sh #************************************************************************* # Copyright (c) 2002 The University of Chicago, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # EPICS BASE Versions 3.13.7 # and higher are distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* # # EpicsHostArch - returns the Epics host architecture suitable # for assigning to the EPICS_HOST_ARCH variable if [ "x${1}" != "x" ] then suffix="-"${1} else suffix="" fi sysname=`uname` case $sysname in Linux ) os=linux cpu=`uname -m` case $cpu in i386 | i486 | i586 | i686 ) cpu=x86 ;; esac echo ${os}-${cpu}${suffix} ;; Darwin ) os=darwin cpu=`uname -m` case "$cpu" in "Power Macintosh") cpu=ppc ;; esac echo ${os}-${cpu}${suffix} ;; HP-UX ) os=hpux cpu=`uname -m` case $cpu in 9000/[34678]??) cpu=m68k ;; esac echo ${os}-${cpu}${suffix} ;; OSF1 ) os=osf cpu=`uname -m` echo ${os}-${cpu}${suffix} ;; SunOS ) version=`uname -r | sed '1s/^\([0-9]*\).*$/\1/'` if [ ${version} -ge 5 ]; then os=solaris else os=sun4 fi cpu=`uname -m` case $cpu in sun4*) cpu=sparc ;; i86pc) cpu=x86 ;; esac echo ${os}-${cpu}${suffix} ;; * ) echo unsupported ;; esac