source: trunk/essentials/sys-devel/flex/config.guess@ 3186

Last change on this file since 3186 was 3043, checked in by bird, 19 years ago

-> essentials

File size: 40.4 KB
Line 
1#! /bin/sh
2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5
6timestamp='2003-05-09'
7
8# This file is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16# General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21#
22# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program.
26
27# Originally written by Per Bothner <[email protected]>.
28# Please send patches to <[email protected]>. Submit a context
29# diff and a properly formatted ChangeLog entry.
30#
31# This script attempts to guess a canonical system name similar to
32# config.sub. If it succeeds, it prints the system name on stdout, and
33# exits with 0. Otherwise, it exits with 1.
34#
35# The plan is that this can be called by configure scripts if you
36# don't specify an explicit build system type.
37
38me=`echo "$0" | sed -e 's,.*/,,'`
39
40usage="\
41Usage: $0 [OPTION]
42
43Output the configuration name of the system \`$me' is run on.
44
45Operation modes:
46 -h, --help print this help, then exit
47 -t, --time-stamp print date of last modification, then exit
48 -v, --version print version number, then exit
49
50Report bugs and patches to <[email protected]>."
51
52version="\
53GNU config.guess ($timestamp)
54
55Originally written by Per Bothner.
56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
57Free Software Foundation, Inc.
58
59This is free software; see the source for copying conditions. There is NO
60warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
61
62help="
63Try \`$me --help' for more information."
64
65# Parse command line
66while test $# -gt 0 ; do
67 case $1 in
68 --time-stamp | --time* | -t )
69 echo "$timestamp" ; exit 0 ;;
70 --version | -v )
71 echo "$version" ; exit 0 ;;
72 --help | --h* | -h )
73 echo "$usage"; exit 0 ;;
74 -- ) # Stop option processing
75 shift; break ;;
76 - ) # Use stdin as input.
77 break ;;
78 -* )
79 echo "$me: invalid option $1$help" >&2
80 exit 1 ;;
81 * )
82 break ;;
83 esac
84done
85
86if test $# != 0; then
87 echo "$me: too many arguments$help" >&2
88 exit 1
89fi
90
91trap 'exit 1' 1 2 15
92
93# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
94# compiler to aid in system detection is discouraged as it requires
95# temporary files to be created and, as you can see below, it is a
96# headache to deal with in a portable fashion.
97
98# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
99# use `HOST_CC' if defined, but it is deprecated.
100
101# Portable tmp directory creation inspired by the Autoconf team.
102
103set_cc_for_build='
104trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
106: ${TMPDIR=/tmp} ;
107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
110dummy=$tmp/dummy ;
111tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
112case $CC_FOR_BUILD,$HOST_CC,$CC in
113 ,,) echo "int x;" > $dummy.c ;
114 for c in cc gcc c89 c99 ; do
115 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
116 CC_FOR_BUILD="$c"; break ;
117 fi ;
118 done ;
119 if test x"$CC_FOR_BUILD" = x ; then
120 CC_FOR_BUILD=no_compiler_found ;
121 fi
122 ;;
123 ,,*) CC_FOR_BUILD=$CC ;;
124 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
125esac ;'
126
127# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
128# ([email protected] 1994-08-24)
129if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
130 PATH=$PATH:/.attbin ; export PATH
131fi
132
133UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
134UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
135UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
136UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
137
138# Note: order is significant - the case branches are not exclusive.
139
140case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
141 *:NetBSD:*:*)
142 # NetBSD (nbsd) targets should (where applicable) match one or
143 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
144 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
145 # switched to ELF, *-*-netbsd* would select the old
146 # object file format. This provides both forward
147 # compatibility and a consistent mechanism for selecting the
148 # object file format.
149 #
150 # Note: NetBSD doesn't particularly care about the vendor
151 # portion of the name. We always set it to "unknown".
152 sysctl="sysctl -n hw.machine_arch"
153 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
154 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
155 case "${UNAME_MACHINE_ARCH}" in
156 armeb) machine=armeb-unknown ;;
157 arm*) machine=arm-unknown ;;
158 sh3el) machine=shl-unknown ;;
159 sh3eb) machine=sh-unknown ;;
160 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
161 esac
162 # The Operating System including object format, if it has switched
163 # to ELF recently, or will in the future.
164 case "${UNAME_MACHINE_ARCH}" in
165 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
166 eval $set_cc_for_build
167 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
168 | grep __ELF__ >/dev/null
169 then
170 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
171 # Return netbsd for either. FIX?
172 os=netbsd
173 else
174 os=netbsdelf
175 fi
176 ;;
177 *)
178 os=netbsd
179 ;;
180 esac
181 # The OS release
182 # Debian GNU/NetBSD machines have a different userland, and
183 # thus, need a distinct triplet. However, they do not need
184 # kernel version information, so it can be replaced with a
185 # suitable tag, in the style of linux-gnu.
186 case "${UNAME_VERSION}" in
187 Debian*)
188 release='-gnu'
189 ;;
190 *)
191 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
192 ;;
193 esac
194 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
195 # contains redundant information, the shorter form:
196 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
197 echo "${machine}-${os}${release}"
198 exit 0 ;;
199 amiga:OpenBSD:*:*)
200 echo m68k-unknown-openbsd${UNAME_RELEASE}
201 exit 0 ;;
202 arc:OpenBSD:*:*)
203 echo mipsel-unknown-openbsd${UNAME_RELEASE}
204 exit 0 ;;
205 hp300:OpenBSD:*:*)
206 echo m68k-unknown-openbsd${UNAME_RELEASE}
207 exit 0 ;;
208 mac68k:OpenBSD:*:*)
209 echo m68k-unknown-openbsd${UNAME_RELEASE}
210 exit 0 ;;
211 macppc:OpenBSD:*:*)
212 echo powerpc-unknown-openbsd${UNAME_RELEASE}
213 exit 0 ;;
214 mvme68k:OpenBSD:*:*)
215 echo m68k-unknown-openbsd${UNAME_RELEASE}
216 exit 0 ;;
217 mvme88k:OpenBSD:*:*)
218 echo m88k-unknown-openbsd${UNAME_RELEASE}
219 exit 0 ;;
220 mvmeppc:OpenBSD:*:*)
221 echo powerpc-unknown-openbsd${UNAME_RELEASE}
222 exit 0 ;;
223 pmax:OpenBSD:*:*)
224 echo mipsel-unknown-openbsd${UNAME_RELEASE}
225 exit 0 ;;
226 sgi:OpenBSD:*:*)
227 echo mipseb-unknown-openbsd${UNAME_RELEASE}
228 exit 0 ;;
229 sun3:OpenBSD:*:*)
230 echo m68k-unknown-openbsd${UNAME_RELEASE}
231 exit 0 ;;
232 wgrisc:OpenBSD:*:*)
233 echo mipsel-unknown-openbsd${UNAME_RELEASE}
234 exit 0 ;;
235 *:OpenBSD:*:*)
236 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
237 exit 0 ;;
238 alpha:OSF1:*:*)
239 if test $UNAME_RELEASE = "V4.0"; then
240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
241 fi
242 # According to Compaq, /usr/sbin/psrinfo has been available on
243 # OSF/1 and Tru64 systems produced since 1995. I hope that
244 # covers most systems running today. This code pipes the CPU
245 # types through head -n 1, so we only detect the type of CPU 0.
246 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
247 case "$ALPHA_CPU_TYPE" in
248 "EV4 (21064)")
249 UNAME_MACHINE="alpha" ;;
250 "EV4.5 (21064)")
251 UNAME_MACHINE="alpha" ;;
252 "LCA4 (21066/21068)")
253 UNAME_MACHINE="alpha" ;;
254 "EV5 (21164)")
255 UNAME_MACHINE="alphaev5" ;;
256 "EV5.6 (21164A)")
257 UNAME_MACHINE="alphaev56" ;;
258 "EV5.6 (21164PC)")
259 UNAME_MACHINE="alphapca56" ;;
260 "EV5.7 (21164PC)")
261 UNAME_MACHINE="alphapca57" ;;
262 "EV6 (21264)")
263 UNAME_MACHINE="alphaev6" ;;
264 "EV6.7 (21264A)")
265 UNAME_MACHINE="alphaev67" ;;
266 "EV6.8CB (21264C)")
267 UNAME_MACHINE="alphaev68" ;;
268 "EV6.8AL (21264B)")
269 UNAME_MACHINE="alphaev68" ;;
270 "EV6.8CX (21264D)")
271 UNAME_MACHINE="alphaev68" ;;
272 "EV6.9A (21264/EV69A)")
273 UNAME_MACHINE="alphaev69" ;;
274 "EV7 (21364)")
275 UNAME_MACHINE="alphaev7" ;;
276 "EV7.9 (21364A)")
277 UNAME_MACHINE="alphaev79" ;;
278 esac
279 # A Vn.n version is a released version.
280 # A Tn.n version is a released field test version.
281 # A Xn.n version is an unreleased experimental baselevel.
282 # 1.2 uses "1.2" for uname -r.
283 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
284 exit 0 ;;
285 Alpha\ *:Windows_NT*:*)
286 # How do we know it's Interix rather than the generic POSIX subsystem?
287 # Should we change UNAME_MACHINE based on the output of uname instead
288 # of the specific Alpha model?
289 echo alpha-pc-interix
290 exit 0 ;;
291 21064:Windows_NT:50:3)
292 echo alpha-dec-winnt3.5
293 exit 0 ;;
294 Amiga*:UNIX_System_V:4.0:*)
295 echo m68k-unknown-sysv4
296 exit 0;;
297 *:[Aa]miga[Oo][Ss]:*:*)
298 echo ${UNAME_MACHINE}-unknown-amigaos
299 exit 0 ;;
300 *:[Mm]orph[Oo][Ss]:*:*)
301 echo ${UNAME_MACHINE}-unknown-morphos
302 exit 0 ;;
303 *:OS/390:*:*)
304 echo i370-ibm-openedition
305 exit 0 ;;
306 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
307 echo arm-acorn-riscix${UNAME_RELEASE}
308 exit 0;;
309 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
310 echo hppa1.1-hitachi-hiuxmpp
311 exit 0;;
312 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
313 # [email protected] (Earle F. Ake) contributed MIS and NILE.
314 if test "`(/bin/universe) 2>/dev/null`" = att ; then
315 echo pyramid-pyramid-sysv3
316 else
317 echo pyramid-pyramid-bsd
318 fi
319 exit 0 ;;
320 NILE*:*:*:dcosx)
321 echo pyramid-pyramid-svr4
322 exit 0 ;;
323 DRS?6000:UNIX_SV:4.2*:7*)
324 case `/usr/bin/uname -p` in
325 sparc) echo sparc-icl-nx7 && exit 0 ;;
326 esac ;;
327 sun4H:SunOS:5.*:*)
328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 exit 0 ;;
330 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
331 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit 0 ;;
333 i86pc:SunOS:5.*:*)
334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit 0 ;;
336 sun4*:SunOS:6*:*)
337 # According to config.sub, this is the proper way to canonicalize
338 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
339 # it's likely to be more like Solaris than SunOS4.
340 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
341 exit 0 ;;
342 sun4*:SunOS:*:*)
343 case "`/usr/bin/arch -k`" in
344 Series*|S4*)
345 UNAME_RELEASE=`uname -v`
346 ;;
347 esac
348 # Japanese Language versions have a version number like `4.1.3-JL'.
349 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
350 exit 0 ;;
351 sun3*:SunOS:*:*)
352 echo m68k-sun-sunos${UNAME_RELEASE}
353 exit 0 ;;
354 sun*:*:4.2BSD:*)
355 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
356 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
357 case "`/bin/arch`" in
358 sun3)
359 echo m68k-sun-sunos${UNAME_RELEASE}
360 ;;
361 sun4)
362 echo sparc-sun-sunos${UNAME_RELEASE}
363 ;;
364 esac
365 exit 0 ;;
366 aushp:SunOS:*:*)
367 echo sparc-auspex-sunos${UNAME_RELEASE}
368 exit 0 ;;
369 # The situation for MiNT is a little confusing. The machine name
370 # can be virtually everything (everything which is not
371 # "atarist" or "atariste" at least should have a processor
372 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
373 # to the lowercase version "mint" (or "freemint"). Finally
374 # the system name "TOS" denotes a system which is actually not
375 # MiNT. But MiNT is downward compatible to TOS, so this should
376 # be no problem.
377 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
378 echo m68k-atari-mint${UNAME_RELEASE}
379 exit 0 ;;
380 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
381 echo m68k-atari-mint${UNAME_RELEASE}
382 exit 0 ;;
383 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
384 echo m68k-atari-mint${UNAME_RELEASE}
385 exit 0 ;;
386 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
387 echo m68k-milan-mint${UNAME_RELEASE}
388 exit 0 ;;
389 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
390 echo m68k-hades-mint${UNAME_RELEASE}
391 exit 0 ;;
392 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
393 echo m68k-unknown-mint${UNAME_RELEASE}
394 exit 0 ;;
395 powerpc:machten:*:*)
396 echo powerpc-apple-machten${UNAME_RELEASE}
397 exit 0 ;;
398 RISC*:Mach:*:*)
399 echo mips-dec-mach_bsd4.3
400 exit 0 ;;
401 RISC*:ULTRIX:*:*)
402 echo mips-dec-ultrix${UNAME_RELEASE}
403 exit 0 ;;
404 VAX*:ULTRIX*:*:*)
405 echo vax-dec-ultrix${UNAME_RELEASE}
406 exit 0 ;;
407 2020:CLIX:*:* | 2430:CLIX:*:*)
408 echo clipper-intergraph-clix${UNAME_RELEASE}
409 exit 0 ;;
410 mips:*:*:UMIPS | mips:*:*:RISCos)
411 eval $set_cc_for_build
412 sed 's/^ //' << EOF >$dummy.c
413#ifdef __cplusplus
414#include <stdio.h> /* for printf() prototype */
415 int main (int argc, char *argv[]) {
416#else
417 int main (argc, argv) int argc; char *argv[]; {
418#endif
419 #if defined (host_mips) && defined (MIPSEB)
420 #if defined (SYSTYPE_SYSV)
421 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
422 #endif
423 #if defined (SYSTYPE_SVR4)
424 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
425 #endif
426 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
427 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
428 #endif
429 #endif
430 exit (-1);
431 }
432EOF
433 $CC_FOR_BUILD -o $dummy $dummy.c \
434 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
435 && exit 0
436 echo mips-mips-riscos${UNAME_RELEASE}
437 exit 0 ;;
438 Motorola:PowerMAX_OS:*:*)
439 echo powerpc-motorola-powermax
440 exit 0 ;;
441 Motorola:*:4.3:PL8-*)
442 echo powerpc-harris-powermax
443 exit 0 ;;
444 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
445 echo powerpc-harris-powermax
446 exit 0 ;;
447 Night_Hawk:Power_UNIX:*:*)
448 echo powerpc-harris-powerunix
449 exit 0 ;;
450 m88k:CX/UX:7*:*)
451 echo m88k-harris-cxux7
452 exit 0 ;;
453 m88k:*:4*:R4*)
454 echo m88k-motorola-sysv4
455 exit 0 ;;
456 m88k:*:3*:R3*)
457 echo m88k-motorola-sysv3
458 exit 0 ;;
459 AViiON:dgux:*:*)
460 # DG/UX returns AViiON for all architectures
461 UNAME_PROCESSOR=`/usr/bin/uname -p`
462 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
463 then
464 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
465 [ ${TARGET_BINARY_INTERFACE}x = x ]
466 then
467 echo m88k-dg-dgux${UNAME_RELEASE}
468 else
469 echo m88k-dg-dguxbcs${UNAME_RELEASE}
470 fi
471 else
472 echo i586-dg-dgux${UNAME_RELEASE}
473 fi
474 exit 0 ;;
475 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
476 echo m88k-dolphin-sysv3
477 exit 0 ;;
478 M88*:*:R3*:*)
479 # Delta 88k system running SVR3
480 echo m88k-motorola-sysv3
481 exit 0 ;;
482 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
483 echo m88k-tektronix-sysv3
484 exit 0 ;;
485 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
486 echo m68k-tektronix-bsd
487 exit 0 ;;
488 *:IRIX*:*:*)
489 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
490 exit 0 ;;
491 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
492 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
493 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
494 i*86:AIX:*:*)
495 echo i386-ibm-aix
496 exit 0 ;;
497 ia64:AIX:*:*)
498 if [ -x /usr/bin/oslevel ] ; then
499 IBM_REV=`/usr/bin/oslevel`
500 else
501 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
502 fi
503 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
504 exit 0 ;;
505 *:AIX:2:3)
506 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
507 eval $set_cc_for_build
508 sed 's/^ //' << EOF >$dummy.c
509 #include <sys/systemcfg.h>
510
511 main()
512 {
513 if (!__power_pc())
514 exit(1);
515 puts("powerpc-ibm-aix3.2.5");
516 exit(0);
517 }
518EOF
519 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
520 echo rs6000-ibm-aix3.2.5
521 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
522 echo rs6000-ibm-aix3.2.4
523 else
524 echo rs6000-ibm-aix3.2
525 fi
526 exit 0 ;;
527 *:AIX:*:[45])
528 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
529 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
530 IBM_ARCH=rs6000
531 else
532 IBM_ARCH=powerpc