5 # $Id: sw.in,v 1.1 1999/06/02 16:53:32 mdw Exp $
7 # Determine a canonical `sw' architecture name
9 # MAKE SURE I GET UPDATED WHEN NEW ARCHITECTURES ARE ADDED!
14 #----- Licensing notice -----------------------------------------------------
16 # This file is part of sw-tools.
18 # sw-tools is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 2 of the License, or
21 # (at your option) any later version.
23 # sw-tools is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 # GNU General Public License for more details.
28 # You should have received a copy of the GNU General Public License
29 # along with sw-tools; if not, write to the Free Software Foundation,
30 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 #----- Revision history -----------------------------------------------------
35 # Revision 1.1 1999/06/02 16:53:32 mdw
41 # This is deliberately *not* the same as Autoconf's `config.guess'. The GNU
42 # names are too specific for our purposes, because they encode version
43 # numbering information that we don't really want to know about. This
44 # operation is deliberately simple, so that new things can be added easily.
46 # --- Step one: find out about the CPU architecture ---
48 CPU=`uname -p`; CPU=`echo $CPU | tr A-Z a-z`
50 unknown) CPU=`uname -m` ;;
57 # --- Step two: find out about the OS ---
59 OS=`uname -s`; OS=`echo $OS | tr A-Z a-z`
66 # --- Write the result ---
69 case "$1" in --archname) echo $arch; exit 0;; esac
71 # --- Run the main `sw' binary ---
73 # Ugly hack for broken OSF1 /bin/sh.
79 exec "${datadir}/libexec/${arch}/${sw}"
81 exec "${datadir}/libexec/${arch}/${sw}" "$@"
84 #----- That's all, folks ----------------------------------------------------