5 # $Id: sw.in,v 1.2 2004/04/08 01:52:19 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.
34 # This is deliberately *not* the same as Autoconf's `config.guess'. The GNU
35 # names are too specific for our purposes, because they encode version
36 # numbering information that we don't really want to know about. This
37 # operation is deliberately simple, so that new things can be added easily.
39 # --- Step one: find out about the CPU architecture ---
41 CPU
=`uname -p`; CPU
=`echo $CPU | tr A-Z a-z`
43 unknown
) CPU
=`uname -m` ;;
50 # --- Step two: find out about the OS ---
52 OS
=`uname -s`; OS
=`echo $OS | tr A-Z a-z`
59 # --- Write the result ---
62 case "$1" in --archname
) echo $arch; exit 0;; esac
64 # --- Run the main `sw' binary ---
66 # Ugly hack for broken OSF1 /bin/sh.
72 exec "${datadir}/libexec/${arch}/${sw}"
74 exec "${datadir}/libexec/${arch}/${sw}" "$@"
77 #----- That's all, folks ----------------------------------------------------