#! /bin/sh # # $Id: guess_port 1825 2013-02-26 09:39:47Z viari $ # # @file: guess_port # @desc: attempt to guess the portname # @usage: guess_port # # @history: # @+ Nov. 2000 first draft adapted from GNU config.guess # @+ Feb. 2010 moved to sh # mach=`uname -m` syst=`uname -s` rels=`uname -r` case ${mach}:${syst}:${rels} in alpha:OSF1:* ) echo alpha-osf1;; sun4*:SunOS:5.* ) echo sparc-solaris;; i86pc:SunOS:5.* ) echo i386-solaris;; sun4*:SunOS:* ) echo sparc-sunos;; Power*:Darwin:* ) echo ppc-darwin;; i*86:Linux:* ) echo i386-linux;; x*86*:Linux:* ) echo i386-linux;; i*86:Darwin:* ) echo i386-darwin;; x*86*:Darwin:* ) echo i386-darwin;; arm64:Darwin:* ) echo arm64-darwin;; IP*:IRIX*:* ) echo mips-irix;; i*86:MINGW32*:* ) echo x86-mingw32;; *) echo unknown ${mach}:${syst}:${rels}; exit 1;; esac exit 0