llvm.org GIT mirror llvm / 0017180
Update all outdated autoconf files in the sample project. We might just use symlinks here, but I'm afraid of possible portability issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156235 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 8 years ago
6 changed file(s) with 599 addition(s) and 469 deletion(s). Raw diff Collapse all Expand all
0 #! /bin/sh
11 # Attempt to guess a canonical system name.
22 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4
5 timestamp='2003-02-22'
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011 Free Software Foundation, Inc.
5
6 timestamp='2011-08-20'
67
78 # This file is free software; you can redistribute it and/or modify it
89 # under the terms of the GNU General Public License as published by
1617 #
1718 # You should have received a copy of the GNU General Public License
1819 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21 # 02110-1301, USA.
2022 #
2123 # As a special exception to the GNU General Public License, if you
2224 # distribute this file as part of a program that contains a
2325 # configuration script generated by Autoconf, you may include it under
2426 # the same distribution terms that you use for the rest of that program.
2527
26 # Originally written by Per Bothner .
27 # Please send patches to . Submit a context
28 # diff and a properly formatted ChangeLog entry.
28
29 # Originally written by Per Bothner. Please send patches (context
30 # diff format) to and include a ChangeLog
31 # entry.
2932 #
3033 # This script attempts to guess a canonical system name similar to
3134 # config.sub. If it succeeds, it prints the system name on stdout, and
3235 # exits with 0. Otherwise, it exits with 1.
3336 #
34 # The plan is that this can be called by configure scripts if you
35 # don't specify an explicit build system type.
37 # You can get the latest version of this script from:
38 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3639
3740 me=`echo "$0" | sed -e 's,.*/,,'`
3841
5255 GNU config.guess ($timestamp)
5356
5457 Originally written by Per Bothner.
55 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
56 Free Software Foundation, Inc.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
59 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
60 Software Foundation, Inc.
5761
5862 This is free software; see the source for copying conditions. There is NO
5963 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6569 while test $# -gt 0 ; do
6670 case $1 in
6771 --time-stamp | --time* | -t )
68 echo "$timestamp" ; exit 0 ;;
72 echo "$timestamp" ; exit ;;
6973 --version | -v )
70 echo "$version" ; exit 0 ;;
74 echo "$version" ; exit ;;
7175 --help | --h* | -h )
72 echo "$usage"; exit 0 ;;
76 echo "$usage"; exit ;;
7377 -- ) # Stop option processing
7478 shift; break ;;
7579 - ) # Use stdin as input.
103107 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
104108 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
105109 : ${TMPDIR=/tmp} ;
106 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
107111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
108113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
109114 dummy=$tmp/dummy ;
110115 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
121126 ;;
122127 ,,*) CC_FOR_BUILD=$CC ;;
123128 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
124 esac ;'
129 esac ; set_cc_for_build= ;'
125130
126131 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
127132 # (ghazi@noc.rutgers.edu 1994-08-24)
156161 arm*) machine=arm-unknown ;;
157162 sh3el) machine=shl-unknown ;;
158163 sh3eb) machine=sh-unknown ;;
164 sh5el) machine=sh5le-unknown ;;
159165 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
160166 esac
161167 # The Operating System including object format, if it has switched
164170 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
165171 eval $set_cc_for_build
166172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
167 | grep __ELF__ >/dev/null
173 | grep -q __ELF__
168174 then
169175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
170176 # Return netbsd for either. FIX?
174180 fi
175181 ;;
176182 *)
177 os=netbsd
183 os=netbsd
178184 ;;
179185 esac
180186 # The OS release
194200 # contains redundant information, the shorter form:
195201 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
196202 echo "${machine}-${os}${release}"
197 exit 0 ;;
198 amiga:OpenBSD:*:*)
199 echo m68k-unknown-openbsd${UNAME_RELEASE}
200 exit 0 ;;
201 arc:OpenBSD:*:*)
202 echo mipsel-unknown-openbsd${UNAME_RELEASE}
203 exit 0 ;;
204 hp300:OpenBSD:*:*)
205 echo m68k-unknown-openbsd${UNAME_RELEASE}
206 exit 0 ;;
207 mac68k:OpenBSD:*:*)
208 echo m68k-unknown-openbsd${UNAME_RELEASE}
209 exit 0 ;;
210 macppc:OpenBSD:*:*)
211 echo powerpc-unknown-openbsd${UNAME_RELEASE}
212 exit 0 ;;
213 mvme68k:OpenBSD:*:*)
214 echo m68k-unknown-openbsd${UNAME_RELEASE}
215 exit 0 ;;
216 mvme88k:OpenBSD:*:*)
217 echo m88k-unknown-openbsd${UNAME_RELEASE}
218 exit 0 ;;
219 mvmeppc:OpenBSD:*:*)
220 echo powerpc-unknown-openbsd${UNAME_RELEASE}
221 exit 0 ;;
222 pmax:OpenBSD:*:*)
223 echo mipsel-unknown-openbsd${UNAME_RELEASE}
224 exit 0 ;;
225 sgi:OpenBSD:*:*)
226 echo mipseb-unknown-openbsd${UNAME_RELEASE}
227 exit 0 ;;
228 sun3:OpenBSD:*:*)
229 echo m68k-unknown-openbsd${UNAME_RELEASE}
230 exit 0 ;;
231 wgrisc:OpenBSD:*:*)
232 echo mipsel-unknown-openbsd${UNAME_RELEASE}
233 exit 0 ;;
203 exit ;;
234204 *:OpenBSD:*:*)
235 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
236 exit 0 ;;
205 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207 exit ;;
208 *:ekkoBSD:*:*)
209 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210 exit ;;
211 *:SolidBSD:*:*)
212 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
213 exit ;;
214 macppc:MirBSD:*:*)
215 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
216 exit ;;
217 *:MirBSD:*:*)
218 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
219 exit ;;
237220 alpha:OSF1:*:*)
238 if test $UNAME_RELEASE = "V4.0"; then
221 case $UNAME_RELEASE in
222 *4.0)
239223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
240 fi
224 ;;
225 *5.*)
226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227 ;;
228 esac
241229 # According to Compaq, /usr/sbin/psrinfo has been available on
242230 # OSF/1 and Tru64 systems produced since 1995. I hope that
243231 # covers most systems running today. This code pipes the CPU
275263 "EV7.9 (21364A)")
276264 UNAME_MACHINE="alphaev79" ;;
277265 esac
266 # A Pn.n version is a patched version.
278267 # A Vn.n version is a released version.
279268 # A Tn.n version is a released field test version.
280269 # A Xn.n version is an unreleased experimental baselevel.
281270 # 1.2 uses "1.2" for uname -r.
282 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
283 exit 0 ;;
271 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
273 exitcode=$?
274 trap '' 0
275 exit $exitcode ;;
284276 Alpha\ *:Windows_NT*:*)
285277 # How do we know it's Interix rather than the generic POSIX subsystem?
286278 # Should we change UNAME_MACHINE based on the output of uname instead
287279 # of the specific Alpha model?
288280 echo alpha-pc-interix
289 exit 0 ;;
281 exit ;;
290282 21064:Windows_NT:50:3)
291283 echo alpha-dec-winnt3.5
292 exit 0 ;;
284 exit ;;
293285 Amiga*:UNIX_System_V:4.0:*)
294286 echo m68k-unknown-sysv4
295 exit 0;;
287 exit ;;
296288 *:[Aa]miga[Oo][Ss]:*:*)
297289 echo ${UNAME_MACHINE}-unknown-amigaos
298 exit 0 ;;
290 exit ;;
299291 *:[Mm]orph[Oo][Ss]:*:*)
300292 echo ${UNAME_MACHINE}-unknown-morphos
301 exit 0 ;;
293 exit ;;
302294 *:OS/390:*:*)
303295 echo i370-ibm-openedition
304 exit 0 ;;
296 exit ;;
297 *:z/VM:*:*)
298 echo s390-ibm-zvmoe
299 exit ;;
300 *:OS400:*:*)
301 echo powerpc-ibm-os400
302 exit ;;
305303 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
306304 echo arm-acorn-riscix${UNAME_RELEASE}
307 exit 0;;
305 exit ;;
306 arm:riscos:*:*|arm:RISCOS:*:*)
307 echo arm-unknown-riscos
308 exit ;;
308309 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
309310 echo hppa1.1-hitachi-hiuxmpp
310 exit 0;;
311 exit ;;
311312 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
312313 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
313314 if test "`(/bin/universe) 2>/dev/null`" = att ; then
315316 else
316317 echo pyramid-pyramid-bsd
317318 fi
318 exit 0 ;;
319 exit ;;
319320 NILE*:*:*:dcosx)
320321 echo pyramid-pyramid-svr4
321 exit 0 ;;
322 DRS?6000:UNIX_SV:4.2*:7*)
322 exit ;;
323 DRS?6000:unix:4.0:6*)
324 echo sparc-icl-nx6
325 exit ;;
326 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
323327 case `/usr/bin/uname -p` in
324 sparc) echo sparc-icl-nx7 && exit 0 ;;
328 sparc) echo sparc-icl-nx7; exit ;;
325329 esac ;;
330 s390x:SunOS:*:*)
331 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;;
326333 sun4H:SunOS:5.*:*)
327334 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
328 exit 0 ;;
335 exit ;;
329336 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
330337 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
331 exit 0 ;;
332 i86pc:SunOS:5.*:*)
333 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334 exit 0 ;;
338 exit ;;
339 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
340 echo i386-pc-auroraux${UNAME_RELEASE}
341 exit ;;
342 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
343 eval $set_cc_for_build
344 SUN_ARCH="i386"
345 # If there is a compiler, see if it is configured for 64-bit objects.
346 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
347 # This test works for both compilers.
348 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
349 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
350 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
351 grep IS_64BIT_ARCH >/dev/null
352 then
353 SUN_ARCH="x86_64"
354 fi
355 fi
356 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
357 exit ;;
335358 sun4*:SunOS:6*:*)
336359 # According to config.sub, this is the proper way to canonicalize
337360 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
338361 # it's likely to be more like Solaris than SunOS4.
339362 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
340 exit 0 ;;
363 exit ;;
341364 sun4*:SunOS:*:*)
342365 case "`/usr/bin/arch -k`" in
343366 Series*|S4*)
346369 esac
347370 # Japanese Language versions have a version number like `4.1.3-JL'.
348371 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
349 exit 0 ;;
372 exit ;;
350373 sun3*:SunOS:*:*)
351374 echo m68k-sun-sunos${UNAME_RELEASE}
352 exit 0 ;;
375 exit ;;
353376 sun*:*:4.2BSD:*)
354377 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
355378 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
361384 echo sparc-sun-sunos${UNAME_RELEASE}
362385 ;;
363386 esac
364 exit 0 ;;
387 exit ;;
365388 aushp:SunOS:*:*)
366389 echo sparc-auspex-sunos${UNAME_RELEASE}
367 exit 0 ;;
390 exit ;;
368391 # The situation for MiNT is a little confusing. The machine name
369392 # can be virtually everything (everything which is not
370393 # "atarist" or "atariste" at least should have a processor
374397 # MiNT. But MiNT is downward compatible to TOS, so this should
375398 # be no problem.
376399 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
377 echo m68k-atari-mint${UNAME_RELEASE}
378 exit 0 ;;
400 echo m68k-atari-mint${UNAME_RELEASE}
401 exit ;;
379402 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
380403 echo m68k-atari-mint${UNAME_RELEASE}
381 exit 0 ;;
404 exit ;;
382405 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
383 echo m68k-atari-mint${UNAME_RELEASE}
384 exit 0 ;;
406 echo m68k-atari-mint${UNAME_RELEASE}
407 exit ;;
385408 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
386 echo m68k-milan-mint${UNAME_RELEASE}
387 exit 0 ;;
409 echo m68k-milan-mint${UNAME_RELEASE}
410 exit ;;
388411 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
389 echo m68k-hades-mint${UNAME_RELEASE}
390 exit 0 ;;
412 echo m68k-hades-mint${UNAME_RELEASE}
413 exit ;;
391414 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
392 echo m68k-unknown-mint${UNAME_RELEASE}
393 exit 0 ;;
415 echo m68k-unknown-mint${UNAME_RELEASE}
416 exit ;;
417 m68k:machten:*:*)
418 echo m68k-apple-machten${UNAME_RELEASE}
419 exit ;;
394420 powerpc:machten:*:*)
395421 echo powerpc-apple-machten${UNAME_RELEASE}
396 exit 0 ;;
422 exit ;;
397423 RISC*:Mach:*:*)
398424 echo mips-dec-mach_bsd4.3
399 exit 0 ;;
425 exit ;;
400426 RISC*:ULTRIX:*:*)
401427 echo mips-dec-ultrix${UNAME_RELEASE}
402 exit 0 ;;
428 exit ;;
403429 VAX*:ULTRIX*:*:*)
404430 echo vax-dec-ultrix${UNAME_RELEASE}
405 exit 0 ;;
431 exit ;;
406432 2020:CLIX:*:* | 2430:CLIX:*:*)
407433 echo clipper-intergraph-clix${UNAME_RELEASE}
408 exit 0 ;;
434 exit ;;
409435 mips:*:*:UMIPS | mips:*:*:RISCos)
410436 eval $set_cc_for_build
411437 sed 's/^ //' << EOF >$dummy.c
429455 exit (-1);
430456 }
431457 EOF
432 $CC_FOR_BUILD -o $dummy $dummy.c \
433 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
434 && exit 0
458 $CC_FOR_BUILD -o $dummy $dummy.c &&
459 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
460 SYSTEM_NAME=`$dummy $dummyarg` &&
461 { echo "$SYSTEM_NAME"; exit; }
435462 echo mips-mips-riscos${UNAME_RELEASE}
436 exit 0 ;;
463 exit ;;
437464 Motorola:PowerMAX_OS:*:*)
438465 echo powerpc-motorola-powermax
439 exit 0 ;;
466 exit ;;
440467 Motorola:*:4.3:PL8-*)
441468 echo powerpc-harris-powermax
442 exit 0 ;;
469 exit ;;
443470 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
444471 echo powerpc-harris-powermax
445 exit 0 ;;
472 exit ;;
446473 Night_Hawk:Power_UNIX:*:*)
447474 echo powerpc-harris-powerunix
448 exit 0 ;;
475 exit ;;
449476 m88k:CX/UX:7*:*)
450477 echo m88k-harris-cxux7
451 exit 0 ;;
478 exit ;;
452479 m88k:*:4*:R4*)
453480 echo m88k-motorola-sysv4
454 exit 0 ;;
481 exit ;;
455482 m88k:*:3*:R3*)
456483 echo m88k-motorola-sysv3
457 exit 0 ;;
484 exit ;;
458485 AViiON:dgux:*:*)
459 # DG/UX returns AViiON for all architectures
460 UNAME_PROCESSOR=`/usr/bin/uname -p`
486 # DG/UX returns AViiON for all architectures
487 UNAME_PROCESSOR=`/usr/bin/uname -p`
461488 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
462489 then
463490 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
470497 else
471498 echo i586-dg-dgux${UNAME_RELEASE}
472499 fi
473 exit 0 ;;
500 exit ;;
474501 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
475502 echo m88k-dolphin-sysv3
476 exit 0 ;;
503 exit ;;
477504 M88*:*:R3*:*)
478505 # Delta 88k system running SVR3
479506 echo m88k-motorola-sysv3
480 exit 0 ;;
507 exit ;;
481508 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
482509 echo m88k-tektronix-sysv3
483 exit 0 ;;
510 exit ;;
484511 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
485512 echo m68k-tektronix-bsd
486 exit 0 ;;
513 exit ;;
487514 *:IRIX*:*:*)
488515 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
489 exit 0 ;;
516 exit ;;
490517 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
491 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
492 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
518 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
519 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
493520 i*86:AIX:*:*)
494521 echo i386-ibm-aix
495 exit 0 ;;
522 exit ;;
496523 ia64:AIX:*:*)
497524 if [ -x /usr/bin/oslevel ] ; then
498525 IBM_REV=`/usr/bin/oslevel`
500527 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
501528 fi
502529 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
503 exit 0 ;;
530 exit ;;
504531 *:AIX:2:3)
505532 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
506533 eval $set_cc_for_build
515542 exit(0);
516543 }
517544 EOF
518 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
519 echo rs6000-ibm-aix3.2.5
545 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
546 then
547 echo "$SYSTEM_NAME"
548 else
549 echo rs6000-ibm-aix3.2.5
550 fi
520551 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
521552 echo rs6000-ibm-aix3.2.4
522553 else
523554 echo rs6000-ibm-aix3.2
524555 fi
525 exit 0 ;;
526 *:AIX:*:[45])
556 exit ;;
557 *:AIX:*:[4567])
527558 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
528559 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
529560 IBM_ARCH=rs6000
536567 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
537568 fi
538569 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
539 exit 0 ;;
570 exit ;;
540571 *:AIX:*:*)
541572 echo rs6000-ibm-aix
542 exit 0 ;;
573 exit ;;
543574 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
544575 echo romp-ibm-bsd4.4
545 exit 0 ;;
576 exit ;;
546577 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
547578 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
548 exit 0 ;; # report: romp-ibm BSD 4.3
579 exit ;; # report: romp-ibm BSD 4.3
549580 *:BOSX:*:*)
550581 echo rs6000-bull-bosx
551 exit 0 ;;
582 exit ;;
552583 DPX/2?00:B.O.S.:*:*)
553584 echo m68k-bull-sysv3
554 exit 0 ;;
585 exit ;;
555586 9000/[34]??:4.3bsd:1.*:*)
556587 echo m68k-hp-bsd
557 exit 0 ;;
588 exit ;;
558589 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
559590 echo m68k-hp-bsd4.4
560 exit 0 ;;
591 exit ;;
561592 9000/[34678]??:HP-UX:*:*)
562593 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
563594 case "${UNAME_MACHINE}" in
566597 9000/[678][0-9][0-9])
567598 if [ -x /usr/bin/getconf ]; then
568599 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
569 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
570 case "${sc_cpu_version}" in
571 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
572 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
573 532) # CPU_PA_RISC2_0
574 case "${sc_kernel_bits}" in
575 32) HP_ARCH="hppa2.0n" ;;
576 64) HP_ARCH="hppa2.0w" ;;
600 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
601 case "${sc_cpu_version}" in
602 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
603 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
604 532) # CPU_PA_RISC2_0
605 case "${sc_kernel_bits}" in
606 32) HP_ARCH="hppa2.0n" ;;
607 64) HP_ARCH="hppa2.0w" ;;
577608 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
578 esac ;;
579 esac
609 esac ;;
610 esac
580611 fi
581612 if [ "${HP_ARCH}" = "" ]; then
582613 eval $set_cc_for_build
583 sed 's/^ //' << EOF >$dummy.c
584
585 #define _HPUX_SOURCE
586 #include
587 #include
588
589 int main ()
590 {
591 #if defined(_SC_KERNEL_BITS)
592 long bits = sysconf(_SC_KERNEL_BITS);
593 #endif
594 long cpu = sysconf (_SC_CPU_VERSION);
595
596 switch (cpu)
597 {
598 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
599 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
600 case CPU_PA_RISC2_0:
601 #if defined(_SC_KERNEL_BITS)
602 switch (bits)
603 {
604 case 64: puts ("hppa2.0w"); break;
605 case 32: puts ("hppa2.0n"); break;
606 default: puts ("hppa2.0"); break;
607 } break;
608 #else /* !defined(_SC_KERNEL_BITS) */
609 puts ("hppa2.0"); break;
610 #endif
611 default: puts ("hppa1.0"); break;
612 }
613 exit (0);
614 }
614 sed 's/^ //' << EOF >$dummy.c
615
616 #define _HPUX_SOURCE
617 #include
618 #include
619
620 int main ()
621 {
622 #if defined(_SC_KERNEL_BITS)
623 long bits = sysconf(_SC_KERNEL_BITS);
624 #endif
625 long cpu = sysconf (_SC_CPU_VERSION);
626
627 switch (cpu)
628 {
629 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
630 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
631 case CPU_PA_RISC2_0:
632 #if defined(_SC_KERNEL_BITS)
633 switch (bits)
634 {
635 case 64: puts ("hppa2.0w"); break;
636 case 32: puts ("hppa2.0n"); break;
637 default: puts ("hppa2.0"); break;
638 } break;
639 #else /* !defined(_SC_KERNEL_BITS) */
640 puts ("hppa2.0"); break;
641 #endif
642 default: puts ("hppa1.0"); break;
643 }
644 exit (0);
645 }
615646 EOF
616647 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
617648 test -z "$HP_ARCH" && HP_ARCH=hppa
619650 esac
620651 if [ ${HP_ARCH} = "hppa2.0w" ]
621652 then
622 # avoid double evaluation of $set_cc_for_build
623 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
624 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
653 eval $set_cc_for_build
654
655 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
656 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
657 # generating 64-bit code. GNU and HP use different nomenclature:
658 #
659 # $ CC_FOR_BUILD=cc ./config.guess
660 # => hppa2.0w-hp-hpux11.23
661 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
662 # => hppa64-hp-hpux11.23
663
664 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
665 grep -q __LP64__
625666 then
626667 HP_ARCH="hppa2.0w"
627668 else
629670 fi
630671 fi
631672 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
632 exit 0 ;;
673 exit ;;
633674 ia64:HP-UX:*:*)
634675 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
635676 echo ia64-hp-hpux${HPUX_REV}
636 exit 0 ;;
677 exit ;;
637678 3050*:HI-UX:*:*)
638679 eval $set_cc_for_build
639680 sed 's/^ //' << EOF >$dummy.c
661702 exit (0);
662703 }
663704 EOF
664 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
705 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
706 { echo "$SYSTEM_NAME"; exit; }
665707 echo unknown-hitachi-hiuxwe2
666 exit 0 ;;
708 exit ;;
667709 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
668710 echo hppa1.1-hp-bsd
669 exit 0 ;;
711 exit ;;
670712 9000/8??:4.3bsd:*:*)
671713 echo hppa1.0-hp-bsd
672 exit 0 ;;
714 exit ;;
673715 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
674716 echo hppa1.0-hp-mpeix
675 exit 0 ;;
717 exit ;;
676718 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
677719 echo hppa1.1-hp-osf
678 exit 0 ;;
720 exit ;;
679721 hp8??:OSF1:*:*)
680722 echo hppa1.0-hp-osf
681 exit 0 ;;
723 exit ;;
682724 i*86:OSF1:*:*)
683725 if [ -x /usr/sbin/sysversion ] ; then
684726 echo ${UNAME_MACHINE}-unknown-osf1mk
685727 else
686728 echo ${UNAME_MACHINE}-unknown-osf1
687729 fi
688 exit 0 ;;
730 exit ;;
689731 parisc*:Lites*:*:*)
690732 echo hppa1.1-hp-lites
691 exit 0 ;;
733 exit ;;
692734 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
693735 echo c1-convex-bsd
694 exit 0 ;;
736 exit ;;
695737 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
696738 if getsysinfo -f scalar_acc
697739 then echo c32-convex-bsd
698740 else echo c2-convex-bsd
699741 fi
700 exit 0 ;;
742 exit ;;
701743 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
702744 echo c34-convex-bsd
703 exit 0 ;;
745 exit ;;
704746 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
705747 echo c38-convex-bsd
706 exit 0 ;;
748 exit ;;
707749 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
708750 echo c4-convex-bsd
709 exit 0 ;;
751 exit ;;
710752 CRAY*Y-MP:*:*:*)
711753 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
712 exit 0 ;;
754 exit ;;
713755 CRAY*[A-Z]90:*:*:*)
714756 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
715757 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
716758 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
717759 -e 's/\.[^.]*$/.X/'
718 exit 0 ;;
760 exit ;;
719761 CRAY*TS:*:*:*)
720762 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
721 exit 0 ;;
763 exit ;;
722764 CRAY*T3E:*:*:*)
723765 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
724 exit 0 ;;
766 exit ;;
725767 CRAY*SV1:*:*:*)
726768 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
727 exit 0 ;;
769 exit ;;
728770 *:UNICOS/mp:*:*)
729 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
730 exit 0 ;;
771 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
772 exit ;;
731773 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
732774 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
733 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
734 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
735 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
736 exit 0 ;;
775 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
776 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
777 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
778 exit ;;
779 5000:UNIX_System_V:4.*:*)
780 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
781 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
782 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
783 exit ;;
737784 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
738785 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
739 exit 0 ;;
786 exit ;;
740787 sparc*:BSD/OS:*:*)
741788 echo sparc-unknown-bsdi${UNAME_RELEASE}
742 exit 0 ;;
789 exit ;;
743790 *:BSD/OS:*:*)
744791 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
745 exit 0 ;;
792 exit ;;
746793 *:FreeBSD:*:*)
747 # Determine whether the default compiler uses glibc.
748 eval $set_cc_for_build
749 sed 's/^ //' << EOF >$dummy.c
750 #include
751 #if __GLIBC__ >= 2
752 LIBC=gnu
753 #else
754 LIBC=
755 #endif
756 EOF
757 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
758 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
759 exit 0 ;;
794 UNAME_PROCESSOR=`/usr/bin/uname -p`
795 case ${UNAME_PROCESSOR} in
796 amd64)
797 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 *)
799 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
800 esac
801 exit ;;
760802 i*:CYGWIN*:*)
761803 echo ${UNAME_MACHINE}-pc-cygwin
762 exit 0 ;;
763 i*:MINGW*:*)
804 exit ;;
805 *:MINGW*:*)
764806 echo ${UNAME_MACHINE}-pc-mingw32
765 exit 0 ;;
807 exit ;;
808 i*:windows32*:*)
809 # uname -m includes "-pc" on this system.
810 echo ${UNAME_MACHINE}-mingw32
811 exit ;;
766812 i*:PW*:*)
767813 echo ${UNAME_MACHINE}-pc-pw32
768 exit 0 ;;
769 x86:Interix*:3*)
770 echo i586-pc-interix3
771 exit 0 ;;
814 exit ;;
815 *:Interix*:*)
816 case ${UNAME_MACHINE} in
817 x86)
818 echo i586-pc-interix${UNAME_RELEASE}
819 exit ;;
820 authenticamd | genuineintel | EM64T)
821 echo x86_64-unknown-interix${UNAME_RELEASE}
822 exit ;;
823 IA64)
824 echo ia64-unknown-interix${UNAME_RELEASE}
825 exit ;;
826 esac ;;
772827 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
773828 echo i${UNAME_MACHINE}-pc-mks
774 exit 0 ;;
829 exit ;;
830 8664:Windows_NT:*)
831 echo x86_64-pc-mks
832 exit ;;
775833 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
776834 # How do we know it's Interix rather than the generic POSIX subsystem?
777835 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
778836 # UNAME_MACHINE based on the output of uname instead of i386?
779837 echo i586-pc-interix
780 exit 0 ;;
838 exit ;;
781839 i*:UWIN*:*)
782840 echo ${UNAME_MACHINE}-pc-uwin
783 exit 0 ;;
841 exit ;;
842 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
843 echo x86_64-unknown-cygwin
844 exit ;;
784845 p*:CYGWIN*:*)
785846 echo powerpcle-unknown-cygwin
786 exit 0 ;;
847 exit ;;
787848 prep*:SunOS:5.*:*)
788849 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
789 exit 0 ;;
850 exit ;;
790851 *:GNU:*:*)
852 # the GNU system
791853 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
792 exit 0 ;;
854 exit ;;
855 *:GNU/*:*:*)
856 # other systems with GNU libc and userland
857 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
858 exit ;;
793859 i*86:Minix:*:*)
794860 echo ${UNAME_MACHINE}-pc-minix
795 exit 0 ;;
796 arm*:Linux:*:*)
797 echo ${UNAME_MACHINE}-unknown-linux-gnu
798 exit 0 ;;
799 ia64:Linux:*:*)
800 echo ${UNAME_MACHINE}-unknown-linux-gnu
801 exit 0 ;;
802 m68*:Linux:*:*)
803 echo ${UNAME_MACHINE}-unknown-linux-gnu
804 exit 0 ;;
805 mips:Linux:*:*)
806 eval $set_cc_for_build
807 sed 's/^ //' << EOF >$dummy.c
808 #undef CPU
809 #undef mips
810 #undef mipsel
811 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
812 CPU=mipsel
813 #else
814 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
815 CPU=mips
816 #else
817 CPU=
818 #endif
819 #endif
820 EOF
821 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
822 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
823 ;;
824 mips64:Linux:*:*)
825 eval $set_cc_for_build
826 sed 's/^ //' << EOF >$dummy.c
827 #undef CPU
828 #undef mips64
829 #undef mips64el
830 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
831 CPU=mips64el
832 #else
833 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
834 CPU=mips64
835 #else
836 CPU=
837 #endif
838 #endif
839 EOF
840 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
841 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
842 ;;
843 ppc:Linux:*:*)
844 echo powerpc-unknown-linux-gnu
845 exit 0 ;;
846 ppc64:Linux:*:*)
847 echo powerpc64-unknown-linux-gnu
848 exit 0 ;;
861 exit ;;
849862 alpha:Linux:*:*)
850863 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
851864 EV5) UNAME_MACHINE=alphaev5 ;;
855868 EV6) UNAME_MACHINE=alphaev6 ;;
856869 EV67) UNAME_MACHINE=alphaev67 ;;
857870 EV68*) UNAME_MACHINE=alphaev68 ;;
858 esac
859 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
871 esac
872 objdump --private-headers /bin/sh | grep -q ld.so.1
860873 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
861874 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
862 exit 0 ;;
875 exit ;;
876 arm*:Linux:*:*)
877 eval $set_cc_for_build
878 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
879 | grep -q __ARM_EABI__
880 then
881 echo ${UNAME_MACHINE}-unknown-linux-gnu
882 else
883 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
884 | grep -q __ARM_PCS_VFP
885 then
886 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
887 else
888 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
889 fi
890 fi
891 exit ;;
892 avr32*:Linux:*:*)
893 echo ${UNAME_MACHINE}-unknown-linux-gnu
894 exit ;;
895 cris:Linux:*:*)
896 echo cris-axis-linux-gnu
897 exit ;;
898 crisv32:Linux:*:*)
899 echo crisv32-axis-linux-gnu
900 exit ;;
901 frv:Linux:*:*)
902 echo frv-unknown-linux-gnu
903 exit ;;
904 i*86:Linux:*:*)
905 LIBC=gnu
906 eval $set_cc_for_build
907 sed 's/^ //' << EOF >$dummy.c
908 #ifdef __dietlibc__
909 LIBC=dietlibc
910 #endif
911 EOF
912 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
913 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
914 exit ;;
915 ia64:Linux:*:*)
916 echo ${UNAME_MACHINE}-unknown-linux-gnu
917 exit ;;
918 m32r*:Linux:*:*)
919 echo ${UNAME_MACHINE}-unknown-linux-gnu
920 exit ;;
921 m68*:Linux:*:*)
922 echo ${UNAME_MACHINE}-unknown-linux-gnu
923 exit ;;
924 mips:Linux:*:* | mips64:Linux:*:*)
925 eval $set_cc_for_build
926 sed 's/^ //' << EOF >$dummy.c
927 #undef CPU
928 #undef ${UNAME_MACHINE}
929 #undef ${UNAME_MACHINE}el
930 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
931 CPU=${UNAME_MACHINE}el
932 #else
933 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
934 CPU=${UNAME_MACHINE}
935 #else
936 CPU=
937 #endif
938 #endif
939 EOF
940 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
941 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
942 ;;
943 or32:Linux:*:*)
944 echo or32-unknown-linux-gnu
945 exit ;;
946 padre:Linux:*:*)
947 echo sparc-unknown-linux-gnu
948 exit ;;
949 parisc64:Linux:*:* | hppa64:Linux:*:*)
950 echo hppa64-unknown-linux-gnu
951 exit ;;
863952 parisc:Linux:*:* | hppa:Linux:*:*)
864953 # Look for CPU level
865954 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
867956 PA8*) echo hppa2.0-unknown-linux-gnu ;;
868957 *) echo hppa-unknown-linux-gnu ;;
869958 esac
870 exit 0 ;;
871 parisc64:Linux:*:* | hppa64:Linux:*:*)
872 echo hppa64-unknown-linux-gnu
873 exit 0 ;;
959 exit ;;
960 ppc64:Linux:*:*)
961 echo powerpc64-unknown-linux-gnu
962 exit ;;
963 ppc:Linux:*:*)
964 echo powerpc-unknown-linux-gnu
965 exit ;;
874966 s390:Linux:*:* | s390x:Linux:*:*)
875967 echo ${UNAME_MACHINE}-ibm-linux
876 exit 0 ;;
968 exit ;;
969 sh64*:Linux:*:*)
970 echo ${UNAME_MACHINE}-unknown-linux-gnu
971 exit ;;
877972 sh*:Linux:*:*)
878973 echo ${UNAME_MACHINE}-unknown-linux-gnu
879 exit 0 ;;
974 exit ;;
880975 sparc:Linux:*:* | sparc64:Linux:*:*)
881976 echo ${UNAME_MACHINE}-unknown-linux-gnu
882 exit 0 ;;
977 exit ;;
978 tile*:Linux:*:*)
979 echo ${UNAME_MACHINE}-unknown-linux-gnu
980 exit ;;
981 vax:Linux:*:*)
982 echo ${UNAME_MACHINE}-dec-linux-gnu
983 exit ;;
883984 x86_64:Linux:*:*)
884985 echo x86_64-unknown-linux-gnu
885 exit 0 ;;
886 i*86:Linux:*:*)
887 # The BFD linker knows what the default object file format is, so
888 # first see if it will tell us. cd to the root directory to prevent
889 # problems with other programs or directories called `ld' in the path.
890 # Set LC_ALL=C to ensure ld outputs messages in English.
891 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
892 | sed -ne '/supported targets:/!d
893 s/[ ][ ]*/ /g
894 s/.*supported targets: *//
895 s/ .*//
896 p'`
897 case "$ld_supported_targets" in
898 elf32-i386)
899 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
900 ;;
901 a.out-i386-linux)
902 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
903 exit 0 ;;
904 coff-i386)
905 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
906 exit 0 ;;
907 "")
908 # Either a pre-BFD a.out linker (linux-gnuoldld) or
909 # one that does not give us useful --help.
910 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
911 exit 0 ;;
912 esac
913 # Determine whether the default compiler is a.out or elf
914 eval $set_cc_for_build
915 sed 's/^ //' << EOF >$dummy.c
916 #include
917 #ifdef __ELF__
918 # ifdef __GLIBC__
919 # if __GLIBC__ >= 2
920 LIBC=gnu
921 # else
922 LIBC=gnulibc1
923 # endif
924 # else
925 LIBC=gnulibc1
926 # endif
927 #else
928 #ifdef __INTEL_COMPILER
929 LIBC=gnu
930 #else
931 LIBC=gnuaout
932 #endif
933 #endif
934 EOF
935 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
936 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
937 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
938 ;;
986 exit ;;
987 xtensa*:Linux:*:*)
988 echo ${UNAME_MACHINE}-unknown-linux-gnu
989 exit ;;
939990 i*86:DYNIX/ptx:4*:*)
940991 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
941992 # earlier versions are messed up and put the nodename in both
942993 # sysname and nodename.
943994 echo i386-sequent-sysv4
944 exit 0 ;;
995 exit ;;
945996 i*86:UNIX_SV:4.2MP:2.*)
946 # Unixware is an offshoot of SVR4, but it has its own version
947 # number series starting with 2...
948 # I am not positive that other SVR4 systems won't match this,
997 # Unixware is an offshoot of SVR4, but it has its own version
998 # number series starting with 2...
999 # I am not positive that other SVR4 systems won't match this,
9491000 # I just have to hope. -- rms.
950 # Use sysv4.2uw... so that sysv4* matches it.
1001 # Use sysv4.2uw... so that sysv4* matches it.
9511002 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
952 exit 0 ;;
1003 exit ;;
9531004 i*86:OS/2:*:*)
9541005 # If we were able to find `uname', then EMX Unix compatibility
9551006 # is probably installed.
9561007 echo ${UNAME_MACHINE}-pc-os2-emx
957 exit 0 ;;
1008 exit ;;
9581009 i*86:XTS-300:*:STOP)
9591010 echo ${UNAME_MACHINE}-unknown-stop
960 exit 0 ;;
1011 exit ;;
9611012 i*86:atheos:*:*)
9621013 echo ${UNAME_MACHINE}-unknown-atheos
963 exit 0 ;;
964 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1014 exit ;;
1015 i*86:syllable:*:*)
1016 echo ${UNAME_MACHINE}-pc-syllable
1017 exit ;;
1018 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
9651019 echo i386-unknown-lynxos${UNAME_RELEASE}
966 exit 0 ;;
1020 exit ;;
9671021 i*86:*DOS:*:*)
9681022 echo ${UNAME_MACHINE}-pc-msdosdjgpp
969 exit 0 ;;
1023 exit ;;
9701024 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
9711025 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
9721026 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
9741028 else
9751029 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
9761030 fi
977 exit 0 ;;
978 i*86:*:5:[78]*)
1031 exit ;;
1032 i*86:*:5:[678]*)
1033 # UnixWare 7.x, OpenUNIX and OpenServer 6.
9791034 case `/bin/uname -X | grep "^Machine"` in
9801035 *486*) UNAME_MACHINE=i486 ;;
9811036 *Pentium) UNAME_MACHINE=i586 ;;
9821037 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
9831038 esac
9841039 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
985 exit 0 ;;
1040 exit ;;
9861041 i*86:*:3.2:*)
9871042 if test -f /usr/options/cb.name; then
9881043 UNAME_REL=`sed -n 's/.*Version //p'
10001055 else
10011056 echo ${UNAME_MACHINE}-pc-sysv32
10021057 fi
1003 exit 0 ;;
1058 exit ;;
10041059 pc:*:*:*)
10051060 # Left here for compatibility:
1006 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1007 # the processor, so we play safe by assuming i386.
1008 echo i386-pc-msdosdjgpp
1009 exit 0 ;;
1061 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1062 # the processor, so we play safe by assuming i586.
1063 # Note: whatever this is, it MUST be the same as what config.sub
1064 # prints for the "djgpp" host, or else GDB configury will decide that
1065 # this is a cross-build.
1066 echo i586-pc-msdosdjgpp
1067 exit ;;
10101068 Intel:Mach:3*:*)
10111069 echo i386-pc-mach3
1012 exit 0 ;;
1070 exit ;;
10131071 paragon:*:*:*)
10141072 echo i860-intel-osf1
1015 exit 0 ;;
1073 exit ;;
10161074 i860:*:4.*:*) # i860-SVR4
10171075 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
10181076 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
10191077 else # Add other i860-SVR4 vendors below as they are discovered.
10201078 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
10211079 fi
1022 exit 0 ;;
1080 exit ;;
10231081 mini*:CTIX:SYS*5:*)
10241082 # "miniframe"
10251083 echo m68010-convergent-sysv
1026 exit 0 ;;
1084 exit ;;
10271085 mc68k:UNIX:SYSTEM5:3.51m)
10281086 echo m68k-convergent-sysv
1029 exit 0 ;;
1087 exit ;;
10301088 M680?0:D-NIX:5.3:*)
10311089 echo m68k-diab-dnix
1032 exit 0 ;;
1033 M68*:*:R3V[567]*:*)
1034 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1035 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
1090 exit ;;
1091 M68*:*:R3V[5678]*:*)
1092 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1093 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
10361094 OS_REL=''
10371095 test -r /etc/.relid \
10381096 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
10391097 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1040 && echo i486-ncr-sysv4.3${OS_REL} && exit 0
1098 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
10411099 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1042 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1100 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
10431101 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1044 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1045 && echo i486-ncr-sysv4 && exit 0 ;;
1102 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1103 && { echo i486-ncr-sysv4; exit; } ;;
1104 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1105 OS_REL='.3'
1106 test -r /etc/.relid \
1107 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1108 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1109 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1110 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1111 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1112 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1113 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
10461114 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
10471115 echo m68k-unknown-lynxos${UNAME_RELEASE}
1048 exit 0 ;;
1116 exit ;;
10491117 mc68030:UNIX_System_V:4.*:*)
10501118 echo m68k-atari-sysv4
1051 exit 0 ;;
1119 exit ;;
10521120 TSUNAMI:LynxOS:2.*:*)
10531121 echo sparc-unknown-lynxos${UNAME_RELEASE}
1054 exit 0 ;;
1122 exit ;;
10551123 rs6000:LynxOS:2.*:*)
10561124 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1057 exit 0 ;;
1058 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1125 exit ;;
1126 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
10591127 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1060 exit 0 ;;
1128 exit ;;
10611129 SM[BE]S:UNIX_SV:*:*)
10621130 echo mips-dde-sysv${UNAME_RELEASE}
1063 exit 0 ;;
1131 exit ;;
10641132 RM*:ReliantUNIX-*:*:*)
10651133 echo mips-sni-sysv4
1066 exit 0 ;;
1134 exit ;;
10671135 RM*:SINIX-*:*:*)
10681136 echo mips-sni-sysv4
1069 exit 0 ;;
1137 exit ;;
10701138 *:SINIX-*:*:*)
10711139 if uname -p 2>/dev/null >/dev/null ; then
10721140 UNAME_MACHINE=`(uname -p) 2>/dev/null`
10741142 else
10751143 echo ns32k-sni-sysv
10761144 fi
1077 exit 0 ;;
1078 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1079 # says
1080 echo i586-unisys-sysv4
1081 exit 0 ;;
1145 exit ;;
1146 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1147 # says
1148 echo i586-unisys-sysv4
1149 exit ;;
10821150 *:UNIX_System_V:4*:FTX*)
10831151 # From Gerald Hewes .
10841152 # How about differentiating between stratus architectures? -djm
10851153 echo hppa1.1-stratus-sysv4
1086 exit 0 ;;
1154 exit ;;
10871155 *:*:*:FTX*)
10881156 # From seanf@swdc.stratus.com.
10891157 echo i860-stratus-sysv4
1090 exit 0 ;;
1158 exit ;;
1159 i*86:VOS:*:*)
1160 # From Paul.Green@stratus.com.
1161 echo ${UNAME_MACHINE}-stratus-vos
1162 exit ;;
10911163 *:VOS:*:*)
10921164 # From Paul.Green@stratus.com.
10931165 echo hppa1.1-stratus-vos
1094 exit 0 ;;
1166 exit ;;
10951167 mc68*:A/UX:*:*)
10961168 echo m68k-apple-aux${UNAME_RELEASE}
1097 exit 0 ;;
1169 exit ;;
10981170 news*:NEWS-OS:6*:*)
10991171 echo mips-sony-newsos6
1100 exit 0 ;;
1172 exit ;;
11011173 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
11021174 if [ -d /usr/nec ]; then
1103 echo mips-nec-sysv${UNAME_RELEASE}
1175 echo mips-nec-sysv${UNAME_RELEASE}
11041176 else
1105 echo mips-unknown-sysv${UNAME_RELEASE}
1106 fi
1107 exit 0 ;;
1177 echo mips-unknown-sysv${UNAME_RELEASE}
1178 fi
1179 exit ;;
11081180 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
11091181 echo powerpc-be-beos
1110 exit 0 ;;
1182 exit ;;
11111183 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
11121184 echo powerpc-apple-beos
1113 exit 0 ;;
1185 exit ;;
11141186 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
11151187 echo i586-pc-beos
1116 exit 0 ;;
1188 exit ;;
1189 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1190 echo i586-pc-haiku
1191 exit ;;
11171192 SX-4:SUPER-UX:*:*)
11181193 echo sx4-nec-superux${UNAME_RELEASE}
1119 exit 0 ;;
1194 exit ;;
11201195 SX-5:SUPER-UX:*:*)
11211196 echo sx5-nec-superux${UNAME_RELEASE}
1122 exit 0 ;;
1197 exit ;;
11231198 SX-6:SUPER-UX:*:*)
11241199 echo sx6-nec-superux${UNAME_RELEASE}
1125 exit 0 ;;
1200 exit ;;
1201 SX-7:SUPER-UX:*:*)
1202 echo sx7-nec-superux${UNAME_RELEASE}
1203 exit ;;
1204 SX-8:SUPER-UX:*:*)
1205 echo sx8-nec-superux${UNAME_RELEASE}
1206 exit ;;
1207 SX-8R:SUPER-UX:*:*)
1208 echo sx8r-nec-superux${UNAME_RELEASE}
1209 exit ;;
11261210 Power*:Rhapsody:*:*)
11271211 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1128 exit 0 ;;
1212 exit ;;
11291213 *:Rhapsody:*:*)
11301214 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1131 exit 0 ;;
1215 exit ;;
11321216 *:Darwin:*:*)
1133 case `uname -p` in
1134 *86) UNAME_PROCESSOR=i686 ;;
1135 powerpc) UNAME_PROCESSOR=powerpc ;;
1217 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1218 case $UNAME_PROCESSOR in
1219 i386)
1220 eval $set_cc_for_build
1221 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1222 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1223 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1224 grep IS_64BIT_ARCH >/dev/null
1225 then
1226 UNAME_PROCESSOR="x86_64"
1227 fi
1228 fi ;;
1229 unknown) UNAME_PROCESSOR=powerpc ;;
11361230 esac
11371231 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1138 exit 0 ;;
1232 exit ;;
11391233 *:procnto*:*:* | *:QNX:[0123456789]*:*)
11401234 UNAME_PROCESSOR=`uname -p`
11411235 if test "$UNAME_PROCESSOR" = "x86"; then
11431237 UNAME_MACHINE=pc
11441238 fi
11451239 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1146 exit 0 ;;
1240 exit ;;
11471241 *:QNX:*:4*)
11481242 echo i386-pc-qnx
1149 exit 0 ;;
1150 NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
1243 exit ;;
1244 NEO-?:NONSTOP_KERNEL:*:*)
1245 echo neo-tandem-nsk${UNAME_RELEASE}
1246 exit ;;
1247 NSE-?:NONSTOP_KERNEL:*:*)
1248 echo nse-tandem-nsk${UNAME_RELEASE}
1249 exit ;;
1250 NSR-?:NONSTOP_KERNEL:*:*)
11511251 echo nsr-tandem-nsk${UNAME_RELEASE}
1152 exit 0 ;;
1252 exit ;;
11531253 *:NonStop-UX:*:*)
11541254 echo mips-compaq-nonstopux
1155 exit 0 ;;
1255 exit ;;
11561256 BS2000:POSIX*:*:*)
11571257 echo bs2000-siemens-sysv
1158 exit 0 ;;
1258 exit ;;
11591259 DS/*:UNIX_System_V:*:*)
11601260 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1161 exit 0 ;;
1261 exit ;;
11621262 *:Plan9:*:*)
11631263 # "uname -m" is not consistent, so use $cputype instead. 386
11641264 # is converted to i386 for consistency with other x86
11691269 UNAME_MACHINE="$cputype"
11701270 fi
11711271 echo ${UNAME_MACHINE}-unknown-plan9
1172 exit 0 ;;
1272 exit ;;
11731273 *:TOPS-10:*:*)
11741274 echo pdp10-unknown-tops10
1175 exit 0 ;;
1275 exit ;;
11761276 *:TENEX:*:*)
11771277 echo pdp10-unknown-tenex
1178 exit 0 ;;
1278 exit ;;
11791279 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
11801280 echo pdp10-dec-tops20
1181 exit 0 ;;
1281 exit ;;
11821282 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
11831283 echo pdp10-xkl-tops20
1184 exit 0 ;;
1284 exit ;;
11851285 *:TOPS-20:*:*)
11861286 echo pdp10-unknown-tops20
1187 exit 0 ;;
1287 exit ;;
11881288 *:ITS:*:*)
11891289 echo pdp10-unknown-its
1190 exit 0 ;;
1290 exit ;;
1291 SEI:*:*:SEIUX)
1292 echo mips-sei-seiux${UNAME_RELEASE}
1293 exit ;;
1294 *:DragonFly:*:*)
1295 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1296 exit ;;
1297 *:*VMS:*:*)
1298 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1299 case "${UNAME_MACHINE}" in
1300 A*) echo alpha-dec-vms ; exit ;;
1301 I*) echo ia64-dec-vms ; exit ;;
1302 V*) echo vax-dec-vms ; exit ;;
1303 esac ;;
1304 *:XENIX:*:SysV)
1305 echo i386-pc-xenix
1306 exit ;;
1307 i*86:skyos:*:*)
1308 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1309 exit ;;
1310 i*86:rdos:*:*)
1311 echo ${UNAME_MACHINE}-pc-rdos
1312 exit ;;
1313 i*86:AROS:*:*)
1314 echo ${UNAME_MACHINE}-pc-aros
1315 exit ;;
11911316 esac
11921317
11931318 #echo '(No uname command or uname output not recognized.)' 1>&2
12101335 #include
12111336 printf ("m68k-sony-newsos%s\n",
12121337 #ifdef NEWSOS4
1213 "4"
1338 "4"
12141339 #else
1215 ""
1216 #endif
1217 ); exit (0);
1340 ""
1341 #endif
1342 ); exit (0);
12181343 #endif
12191344 #endif
12201345
12211346 #if defined (__arm) && defined (__acorn) && defined (__unix)
1222 printf ("arm-acorn-riscix"); exit (0);
1347 printf ("arm-acorn-riscix\n"); exit (0);
12231348 #endif
12241349
12251350 #if defined (hp300) && !defined (hpux)
13081433 }
13091434 EOF
13101435
1311 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1436 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1437 { echo "$SYSTEM_NAME"; exit; }
13121438
13131439 # Apollos put the system type in the environment.
13141440
1315 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
1441 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
13161442
13171443 # Convex versions that predate uname can use getsysinfo(1)
13181444
13211447 case `getsysinfo -f cpu_type` in
13221448 c1*)
13231449 echo c1-convex-bsd
1324 exit 0 ;;
1450 exit ;;
13251451 c2*)
13261452 if getsysinfo -f scalar_acc
13271453 then echo c32-convex-bsd
13281454 else echo c2-convex-bsd
13291455 fi
1330 exit 0 ;;
1456 exit ;;
13311457 c34*)
13321458 echo c34-convex-bsd
1333 exit 0 ;;
1459 exit ;;
13341460 c38*)
13351461 echo c38-convex-bsd
1336 exit 0 ;;
1462 exit ;;
13371463 c4*)
13381464 echo c4-convex-bsd
1339 exit 0 ;;
1465 exit ;;
13401466 esac
13411467 fi
13421468
13471473 the operating system you are using. It is advised that you
13481474 download the most up to date version of the config scripts from
13491475
1350 ftp://ftp.gnu.org/pub/gnu/config/
1476 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1477 and
1478 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
13511479
13521480 If the version you run ($0) is already up to date, please
13531481 send the following data and any information you think might be
33 #
44 AC_DEFUN([AC_CONFIG_MAKEFILE],
55 [AC_CONFIG_COMMANDS($1,
6 [${srcdir}/autoconf/mkinstalldirs `dirname $1`
7 ${SHELL} ${srcdir}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1])
6 [${llvm_src}/autoconf/mkinstalldirs `dirname $1`
7 ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1])
88 ])
55 AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
66 AC_LANG_PUSH([C++])
77 ac_save_CXXFLAGS=$CXXFLAGS
8 CXXFLAGS+=" -pedantic"
8 CXXFLAGS="$CXXFLAGS -pedantic"
99 AC_RUN_IFELSE(
1010 AC_LANG_PROGRAM(
1111 [#include ],
99
1010 # Check for ld64.
1111 if (echo "$version_string" | grep -q "ld64"); then
12 llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#")
12 llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#")
1313 else
1414 llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#")
1515 fi
77 [llvm_cv_cxx_visibility_inlines_hidden],
88 [ AC_LANG_PUSH([C++])
99 oldcxxflags="$CXXFLAGS"
10 CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
11 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
10 CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror"
11 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
12 [template struct X { void __attribute__((noinline)) f() {} };],
13 [X().f();])],
1214 [llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no])
1315 CXXFLAGS="$oldcxxflags"
1416 AC_LANG_POP([C++])
76317631
76327632 # Check for ld64.
76337633 if (echo "$version_string" | grep -q "ld64"); then
7634 llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#")
7634 llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#")
76357635 else
76367636 llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#")
76377637 fi
1597315973 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1597415974
1597515975 ac_save_CXXFLAGS=$CXXFLAGS
15976 CXXFLAGS+=" -pedantic"
15976 CXXFLAGS="$CXXFLAGS -pedantic"
1597715977 if test "$cross_compiling" = yes; then
1597815978 ac_cv_huge_val_sanity=yes
1597915979 else
2079920799 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2080020800
2080120801 oldcxxflags="$CXXFLAGS"
20802 CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
20802 CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror"
2080320803 cat >conftest.$ac_ext <<_ACEOF
2080420804 /* confdefs.h. */
2080520805 _ACEOF
2080620806 cat confdefs.h >>conftest.$ac_ext
2080720807 cat >>conftest.$ac_ext <<_ACEOF
2080820808 /* end confdefs.h. */
20809
20809 template struct X { void __attribute__((noinline)) f() {} };
2081020810 int
2081120811 main ()
2081220812 {
20813
20813 X().f();
2081420814 ;
2081520815 return 0;
2081620816 }
2209722097
2209822098
2209922099 case $ac_file$ac_mode in
22100 "Makefile":C) ${srcdir}/autoconf/mkinstalldirs `dirname Makefile`
22101 ${SHELL} ${srcdir}/autoconf/install-sh -m 0644 -c ${srcdir}/Makefile Makefile ;;
22102 "lib/Makefile":C) ${srcdir}/autoconf/mkinstalldirs `dirname lib/Makefile`
22103 ${SHELL} ${srcdir}/autoconf/install-sh -m 0644 -c ${srcdir}/lib/Makefile lib/Makefile ;;
22104 "lib/sample/Makefile":C) ${srcdir}/autoconf/mkinstalldirs `dirname lib/sample/Makefile`
22105 ${SHELL} ${srcdir}/autoconf/install-sh -m 0644 -c ${srcdir}/lib/sample/Makefile lib/sample/Makefile ;;
22106 "tools/Makefile":C) ${srcdir}/autoconf/mkinstalldirs `dirname tools/Makefile`
22107 ${SHELL} ${srcdir}/autoconf/install-sh -m 0644 -c ${srcdir}/tools/Makefile tools/Makefile ;;
22108 "tools/sample/Makefile":C) ${srcdir}/autoconf/mkinstalldirs `dirname tools/sample/Makefile`
22109 ${SHELL} ${srcdir}/autoconf/install-sh -m 0644 -c ${srcdir}/tools/sample/Makefile tools/sample/Makefile ;;
22100 "Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname Makefile`
22101 ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/Makefile Makefile ;;
22102 "lib/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/Makefile`
22103 ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/lib/Makefile lib/Makefile ;;
22104 "lib/sample/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/sample/Makefile`
22105 ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/lib/sample/Makefile lib/sample/Makefile ;;
22106 "tools/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname tools/Makefile`
22107 ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/tools/Makefile tools/Makefile ;;
22108 "tools/sample/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname tools/sample/Makefile`
22109 ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/tools/sample/Makefile tools/sample/Makefile ;;
2211022110
2211122111 esac
2211222112 done # for ac_tag