comparison config.guess @ 24469:c23008607eb9

Merge recent additions from autoconf source tree.
author Ben Elliston <bje@air.net.au>
date Wed, 10 Mar 1999 12:23:21 +0000
parents 4c04dff8f129
children 6de993b01982
comparison
equal deleted inserted replaced
24468:381eed7518c2 24469:c23008607eb9
21 # configuration script generated by Autoconf, you may include it under 21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that program. 22 # the same distribution terms that you use for the rest of that program.
23 23
24 # Written by Per Bothner <bothner@cygnus.com>. 24 # Written by Per Bothner <bothner@cygnus.com>.
25 # The master version of this file is at the FSF in /home/gd/gnu/lib. 25 # The master version of this file is at the FSF in /home/gd/gnu/lib.
26 # Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
26 # 27 #
27 # This script attempts to guess a canonical system name similar to 28 # This script attempts to guess a canonical system name similar to
28 # config.sub. If it succeeds, it prints the system name on stdout, and 29 # config.sub. If it succeeds, it prints the system name on stdout, and
29 # exits with 0. Otherwise, it exits with 1. 30 # exits with 0. Otherwise, it exits with 1.
30 # 31 #
44 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 45 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
45 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 46 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
46 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 47 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
47 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 48 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
48 49
49 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 50 dummy=dummy-$$
51 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
50 52
51 # Note: order is significant - the case branches are not exclusive. 53 # Note: order is significant - the case branches are not exclusive.
52 54
53 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 55 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
54 alpha:OSF1:*:*) 56 alpha:OSF1:*:*)
57 fi 59 fi
58 # A Vn.n version is a released version. 60 # A Vn.n version is a released version.
59 # A Tn.n version is a released field test version. 61 # A Tn.n version is a released field test version.
60 # A Xn.n version is an unreleased experimental baselevel. 62 # A Xn.n version is an unreleased experimental baselevel.
61 # 1.2 uses "1.2" for uname -r. 63 # 1.2 uses "1.2" for uname -r.
62 cat <<EOF >dummy.s 64 cat <<EOF >$dummy.s
63 .globl main 65 .globl main
64 .ent main 66 .ent main
65 main: 67 main:
66 .frame \$30,0,\$26,0 68 .frame \$30,0,\$26,0
67 .prologue 0 69 .prologue 0
74 addl \$1,\$0,\$0 76 addl \$1,\$0,\$0
75 addl \$2,\$0,\$0 77 addl \$2,\$0,\$0
76 ret \$31,(\$26),1 78 ret \$31,(\$26),1
77 .end main 79 .end main
78 EOF 80 EOF
79 ${CC-cc} dummy.s -o dummy 2>/dev/null 81 ${CC-cc} $dummy.s -o $dummy 2>/dev/null
80 if test "$?" = 0 ; then 82 if test "$?" = 0 ; then
81 ./dummy 83 ./$dummy
82 case "$?" in 84 case "$?" in
83 7) 85 7)
84 UNAME_MACHINE="alpha" 86 UNAME_MACHINE="alpha"
85 ;; 87 ;;
86 15) 88 15)
95 16) 97 16)
96 UNAME_MACHINE="alphaev6" 98 UNAME_MACHINE="alphaev6"
97 ;; 99 ;;
98 esac 100 esac
99 fi 101 fi
100 rm -f dummy.s dummy 102 rm -f $dummy.s $dummy
101 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` 103 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
102 exit 0 ;; 104 exit 0 ;;
103 21064:Windows_NT:50:3) 105 21064:Windows_NT:50:3)
104 echo alpha-dec-winnt3.5 106 echo alpha-dec-winnt3.5
105 exit 0 ;; 107 exit 0 ;;
148 echo pyramid-pyramid-sysv3 150 echo pyramid-pyramid-sysv3
149 else 151 else
150 echo pyramid-pyramid-bsd 152 echo pyramid-pyramid-bsd
151 fi 153 fi
152 exit 0 ;; 154 exit 0 ;;
153 NILE:*:*:dcosx) 155 NILE*:*:*:dcosx)
154 echo pyramid-pyramid-svr4 156 echo pyramid-pyramid-svr4
155 exit 0 ;; 157 exit 0 ;;
156 sun4H:SunOS:5.*:*) 158 sun4H:SunOS:5.*:*)
157 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 159 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
158 exit 0 ;; 160 exit 0 ;;
236 exit 0 ;; 238 exit 0 ;;
237 2020:CLIX:*:*) 239 2020:CLIX:*:*)
238 echo clipper-intergraph-clix${UNAME_RELEASE} 240 echo clipper-intergraph-clix${UNAME_RELEASE}
239 exit 0 ;; 241 exit 0 ;;
240 mips:*:*:UMIPS | mips:*:*:RISCos) 242 mips:*:*:UMIPS | mips:*:*:RISCos)
241 sed 's/^ //' << EOF >dummy.c 243 sed 's/^ //' << EOF >$dummy.c
242 int main (argc, argv) int argc; char **argv; { 244 #ifdef __cplusplus
245 int main (int argc, char *argv[]) {
246 #else
247 int main (argc, argv) int argc; char *argv[]; {
248 #endif
243 #if defined (host_mips) && defined (MIPSEB) 249 #if defined (host_mips) && defined (MIPSEB)
244 #if defined (SYSTYPE_SYSV) 250 #if defined (SYSTYPE_SYSV)
245 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 251 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
246 #endif 252 #endif
247 #if defined (SYSTYPE_SVR4) 253 #if defined (SYSTYPE_SVR4)
252 #endif 258 #endif
253 #endif 259 #endif
254 exit (-1); 260 exit (-1);
255 } 261 }
256 EOF 262 EOF
257 ${CC-cc} dummy.c -o dummy \ 263 ${CC-cc} $dummy.c -o $dummy \
258 && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 264 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
259 && rm dummy.c dummy && exit 0 265 && rm $dummy.c $dummy && exit 0
260 rm -f dummy.c dummy 266 rm -f $dummy.c $dummy
261 echo mips-mips-riscos${UNAME_RELEASE} 267 echo mips-mips-riscos${UNAME_RELEASE}
262 exit 0 ;; 268 exit 0 ;;
263 Night_Hawk:Power_UNIX:*:*) 269 Night_Hawk:Power_UNIX:*:*)
264 echo powerpc-harris-powerunix 270 echo powerpc-harris-powerunix
265 exit 0 ;; 271 exit 0 ;;
307 i?86:AIX:*:*) 313 i?86:AIX:*:*)
308 echo i386-ibm-aix 314 echo i386-ibm-aix
309 exit 0 ;; 315 exit 0 ;;
310 *:AIX:2:3) 316 *:AIX:2:3)
311 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 317 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
312 sed 's/^ //' << EOF >dummy.c 318 sed 's/^ //' << EOF >$dummy.c
313 #include <sys/systemcfg.h> 319 #include <sys/systemcfg.h>
314 320
315 main() 321 main()
316 { 322 {
317 if (!__power_pc()) 323 if (!__power_pc())
318 exit(1); 324 exit(1);
319 puts("powerpc-ibm-aix3.2.5"); 325 puts("powerpc-ibm-aix3.2.5");
320 exit(0); 326 exit(0);
321 } 327 }
322 EOF 328 EOF
323 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 329 ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
324 rm -f dummy.c dummy 330 rm -f $dummy.c $dummy
325 echo rs6000-ibm-aix3.2.5 331 echo rs6000-ibm-aix3.2.5
326 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 332 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
327 echo rs6000-ibm-aix3.2.4 333 echo rs6000-ibm-aix3.2.4
328 else 334 else
329 echo rs6000-ibm-aix3.2 335 echo rs6000-ibm-aix3.2
367 9000/[34678]??:HP-UX:*:*) 373 9000/[34678]??:HP-UX:*:*)
368 case "${UNAME_MACHINE}" in 374 case "${UNAME_MACHINE}" in
369 9000/31? ) HP_ARCH=m68000 ;; 375 9000/31? ) HP_ARCH=m68000 ;;
370 9000/[34]?? ) HP_ARCH=m68k ;; 376 9000/[34]?? ) HP_ARCH=m68k ;;
371 9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[13679] | 9000/892 ) 377 9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[13679] | 9000/892 )
372 sed 's/^ //' << EOF >dummy.c 378 sed 's/^ //' << EOF >$dummy.c
373 #include <stdlib.h> 379 #include <stdlib.h>
374 #include <unistd.h> 380 #include <unistd.h>
375 381
376 int main () 382 int main ()
377 { 383 {
378 #if defined(_SC_KERNEL_BITS) 384 #if defined(_SC_KERNEL_BITS)
379 long bits = sysconf(_SC_KERNEL_BITS); 385 long bits = sysconf(_SC_KERNEL_BITS);
380 #endif 386 #endif
381 long cpu = sysconf (_SC_CPU_VERSION); 387 long cpu = sysconf (_SC_CPU_VERSION);
382 388
383 switch (cpu) 389 switch (cpu)
384 { 390 {
385 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 391 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
386 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 392 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
387 case CPU_PA_RISC2_0: 393 case CPU_PA_RISC2_0:
388 #if defined(_SC_KERNEL_BITS) 394 #if defined(_SC_KERNEL_BITS)
389 switch (bits) 395 switch (bits)
390 { 396 {
391 case 64: puts ("hppa2.0w"); break; 397 case 64: puts ("hppa2.0w"); break;
392 case 32: puts ("hppa2.0n"); break; 398 case 32: puts ("hppa2.0n"); break;
393 default: puts ("hppa2.0"); break; 399 default: puts ("hppa2.0"); break;
394 } break; 400 } break;
395 #else /* !defined(_SC_KERNEL_BITS) */ 401 #else /* !defined(_SC_KERNEL_BITS) */
396 puts ("hppa2.0"); break; 402 puts ("hppa2.0"); break;
397 #endif 403 #endif
398 default: puts ("hppa1.0"); break; 404 default: puts ("hppa1.0"); break;
399 } 405 }
400 exit (0); 406 exit (0);
401 } 407 }
402 EOF 408 EOF
403 (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` 409 (${CC-cc} $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
404 rm -f dummy.c dummy 410 rm -f $dummy.c $dummy
405 esac 411 esac
406 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 412 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
407 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 413 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
408 exit 0 ;; 414 exit 0 ;;
409 3050*:HI-UX:*:*) 415 3050*:HI-UX:*:*)
410 sed 's/^ //' << EOF >dummy.c 416 sed 's/^ //' << EOF >$dummy.c
411 #include <unistd.h> 417 #include <unistd.h>
412 int 418 int
413 main () 419 main ()
414 { 420 {
415 long cpu = sysconf (_SC_CPU_VERSION); 421 long cpu = sysconf (_SC_CPU_VERSION);
430 puts ("m68k-hitachi-hiuxwe2"); 436 puts ("m68k-hitachi-hiuxwe2");
431 else puts ("unknown-hitachi-hiuxwe2"); 437 else puts ("unknown-hitachi-hiuxwe2");
432 exit (0); 438 exit (0);
433 } 439 }
434 EOF 440 EOF
435 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 441 ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
436 rm -f dummy.c dummy 442 rm -f $dummy.c $dummy
437 echo unknown-hitachi-hiuxwe2 443 echo unknown-hitachi-hiuxwe2
438 exit 0 ;; 444 exit 0 ;;
439 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 445 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
440 echo hppa1.1-hp-bsd 446 echo hppa1.1-hp-bsd
441 exit 0 ;; 447 exit 0 ;;
442 9000/8??:4.3bsd:*:*) 448 9000/8??:4.3bsd:*:*)
443 echo hppa1.0-hp-bsd 449 echo hppa1.0-hp-bsd
450 exit 0 ;;
451 *9??*:MPE*:*:*)
452 echo hppa1.0-hp-mpeix
444 exit 0 ;; 453 exit 0 ;;
445 *9??*:MPE*:*:*) 454 *9??*:MPE*:*:*)
446 echo hppa1.0-hp-mpeix 455 echo hppa1.0-hp-mpeix
447 exit 0 ;; 456 exit 0 ;;
448 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 457 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
490 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 499 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
491 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 500 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
492 exit 0 ;; 501 exit 0 ;;
493 CRAY*TS:*:*:*) 502 CRAY*TS:*:*:*)
494 echo t90-cray-unicos${UNAME_RELEASE} 503 echo t90-cray-unicos${UNAME_RELEASE}
504 exit 0 ;;
505 CRAY*T3E:*:*:*)
506 echo t3e-cray-unicosmk${UNAME_RELEASE}
495 exit 0 ;; 507 exit 0 ;;
496 CRAY-2:*:*:*) 508 CRAY-2:*:*:*)
497 echo cray2-cray-unicos 509 echo cray2-cray-unicos
498 exit 0 ;; 510 exit 0 ;;
499 F300:UNIX_System_V:*:*) 511 F300:UNIX_System_V:*:*)
511 echo m68k-unknown-openbsd${UNAME_RELEASE} 523 echo m68k-unknown-openbsd${UNAME_RELEASE}
512 exit 0 ;; 524 exit 0 ;;
513 sparc*:BSD/OS:*:*) 525 sparc*:BSD/OS:*:*)
514 echo sparc-unknown-bsdi${UNAME_RELEASE} 526 echo sparc-unknown-bsdi${UNAME_RELEASE}
515 exit 0 ;; 527 exit 0 ;;
516 i?86:BSD/386:*:* | *:BSD/OS:*:*) 528 i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
517 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 529 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
518 exit 0 ;; 530 exit 0 ;;
531 *:BSD/OS:*:*)
532 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
533 exit 0 ;;
519 *:FreeBSD:*:*) 534 *:FreeBSD:*:*)
535 if test -x /usr/bin/objformat; then
536 if test "elf" = "`/usr/bin/objformat`"; then
537 echo ${UNAME_MACHINE}-unknown-freebsdelf`echo${UNAME_RELEASE}|sed -e 's/[-_].*//'`
538 exit 0
539 fi
540 fi
520 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 541 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
521 exit 0 ;; 542 exit 0 ;;
522 *:NetBSD:*:*) 543 *:NetBSD:*:*)
523 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 544 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
524 exit 0 ;; 545 exit 0 ;;
542 exit 0 ;; 563 exit 0 ;;
543 *:Linux:*:*) 564 *:Linux:*:*)
544 # uname on the ARM produces all sorts of strangeness, and we need to 565 # uname on the ARM produces all sorts of strangeness, and we need to
545 # filter it out. 566 # filter it out.
546 case "$UNAME_MACHINE" in 567 case "$UNAME_MACHINE" in
568 armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
547 arm* | sa110*) UNAME_MACHINE="arm" ;; 569 arm* | sa110*) UNAME_MACHINE="arm" ;;
548 esac 570 esac
549 571
550 # The BFD linker knows what the default object file format is, so 572 # The BFD linker knows what the default object file format is, so
551 # first see if it will tell us. 573 # first see if it will tell us.
564 m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 586 m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
565 elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; 587 elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
566 esac 588 esac
567 589
568 if test "${UNAME_MACHINE}" = "alpha" ; then 590 if test "${UNAME_MACHINE}" = "alpha" ; then
569 sed 's/^ //' <<EOF >dummy.s 591 sed 's/^ //' <<EOF >$dummy.s
570 .globl main 592 .globl main
571 .ent main 593 .ent main
572 main: 594 main:
573 .frame \$30,0,\$26,0 595 .frame \$30,0,\$26,0
574 .prologue 0 596 .prologue 0
582 addl \$2,\$0,\$0 604 addl \$2,\$0,\$0
583 ret \$31,(\$26),1 605 ret \$31,(\$26),1
584 .end main 606 .end main
585 EOF 607 EOF
586 LIBC="" 608 LIBC=""
587 ${CC-cc} dummy.s -o dummy 2>/dev/null 609 ${CC-cc} $dummy.s -o $dummy 2>/dev/null
588 if test "$?" = 0 ; then 610 if test "$?" = 0 ; then
589 ./dummy 611 ./$dummy
590 case "$?" in 612 case "$?" in
591 7) 613 7)
592 UNAME_MACHINE="alpha" 614 UNAME_MACHINE="alpha"
593 ;; 615 ;;
594 15) 616 15)
601 UNAME_MACHINE="alphapca56" 623 UNAME_MACHINE="alphapca56"
602 ;; 624 ;;
603 16) 625 16)
604 UNAME_MACHINE="alphaev6" 626 UNAME_MACHINE="alphaev6"
605 ;; 627 ;;
606 esac 628 esac
607 629
608 objdump --private-headers dummy | \ 630 objdump --private-headers $dummy | \
609 grep ld.so.1 > /dev/null 631 grep ld.so.1 > /dev/null
610 if test "$?" = 0 ; then 632 if test "$?" = 0 ; then
611 LIBC="libc1" 633 LIBC="libc1"
612 fi 634 fi
613 fi 635 fi
614 rm -f dummy.s dummy 636 rm -f $dummy.s $dummy
615 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 637 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
616 elif test "${UNAME_MACHINE}" = "mips" ; then 638 elif test "${UNAME_MACHINE}" = "mips" ; then
617 cat >dummy.c <<EOF 639 cat >$dummy.c <<EOF
618 main(argc, argv) 640 #ifdef __cplusplus
619 int argc; 641 int main (int argc, char *argv[]) {
620 char *argv[]; 642 #else
621 { 643 int main (argc, argv) int argc; char *argv[]; {
644 #endif
622 #ifdef __MIPSEB__ 645 #ifdef __MIPSEB__
623 printf ("%s-unknown-linux-gnu\n", argv[1]); 646 printf ("%s-unknown-linux-gnu\n", argv[1]);
624 #endif 647 #endif
625 #ifdef __MIPSEL__ 648 #ifdef __MIPSEL__
626 printf ("%sel-unknown-linux-gnu\n", argv[1]); 649 printf ("%sel-unknown-linux-gnu\n", argv[1]);
627 #endif 650 #endif
628 return 0; 651 return 0;
629 } 652 }
630 EOF 653 EOF
631 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 654 ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
632 rm -f dummy.c dummy 655 rm -f $dummy.c $dummy
633 else 656 else
634 # Either a pre-BFD a.out linker (linux-gnuoldld) 657 # Either a pre-BFD a.out linker (linux-gnuoldld)
635 # or one that does not give us useful --help. 658 # or one that does not give us useful --help.
636 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. 659 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
637 # If ld does not provide *any* "supported emulations:" 660 # If ld does not provide *any* "supported emulations:"
646 *) 669 *)
647 VENDOR=unknown; 670 VENDOR=unknown;
648 ;; 671 ;;
649 esac 672 esac
650 # Determine whether the default compiler is a.out or elf 673 # Determine whether the default compiler is a.out or elf
651 cat >dummy.c <<EOF 674 cat >$dummy.c <<EOF
652 #include <features.h> 675 #include <features.h>
653 main(argc, argv) 676 #ifdef __cplusplus
654 int argc; 677 int main (int argc, char *argv[]) {
655 char *argv[]; 678 #else
656 { 679 int main (argc, argv) int argc; char *argv[]; {
680 #endif
657 #ifdef __ELF__ 681 #ifdef __ELF__
658 # ifdef __GLIBC__ 682 # ifdef __GLIBC__
659 # if __GLIBC__ >= 2 683 # if __GLIBC__ >= 2
660 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); 684 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
661 # else 685 # else
668 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); 692 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
669 #endif 693 #endif
670 return 0; 694 return 0;
671 } 695 }
672 EOF 696 EOF
673 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 697 ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
674 rm -f dummy.c dummy 698 rm -f $dummy.c $dummy
675 fi ;; 699 fi ;;
676 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 700 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
677 # are messed up and put the nodename in both sysname and nodename. 701 # are messed up and put the nodename in both sysname and nodename.
678 i?86:DYNIX/ptx:4*:*) 702 i?86:DYNIX/ptx:4*:*)
679 echo i386-sequent-sysv4 703 echo i386-sequent-sysv4
753 echo m68k-unknown-lynxos${UNAME_RELEASE} 777 echo m68k-unknown-lynxos${UNAME_RELEASE}
754 exit 0 ;; 778 exit 0 ;;
755 mc68030:UNIX_System_V:4.*:*) 779 mc68030:UNIX_System_V:4.*:*)
756 echo m68k-atari-sysv4 780 echo m68k-atari-sysv4
757 exit 0 ;; 781 exit 0 ;;
758 i?86:LynxOS:2.*:*) 782 i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
759 echo i386-unknown-lynxos${UNAME_RELEASE} 783 echo i386-unknown-lynxos${UNAME_RELEASE}
760 exit 0 ;; 784 exit 0 ;;
761 TSUNAMI:LynxOS:2.*:*) 785 TSUNAMI:LynxOS:2.*:*)
762 echo sparc-unknown-lynxos${UNAME_RELEASE} 786 echo sparc-unknown-lynxos${UNAME_RELEASE}
763 exit 0 ;; 787 exit 0 ;;
764 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) 788 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
765 echo rs6000-unknown-lynxos${UNAME_RELEASE} 789 echo rs6000-unknown-lynxos${UNAME_RELEASE}
766 exit 0 ;; 790 exit 0 ;;
767 SM[BE]S:UNIX_SV:*:*) 791 SM[BE]S:UNIX_SV:*:*)
768 echo mips-dde-sysv${UNAME_RELEASE} 792 echo mips-dde-sysv${UNAME_RELEASE}
793 exit 0 ;;
794 RM*:ReliantUNIX-*:*:*)
795 echo mips-sni-sysv4
769 exit 0 ;; 796 exit 0 ;;
770 RM*:SINIX-*:*:*) 797 RM*:SINIX-*:*:*)
771 echo mips-sni-sysv4 798 echo mips-sni-sysv4
772 exit 0 ;; 799 exit 0 ;;
773 *:SINIX-*:*:*) 800 *:SINIX-*:*:*)
795 echo m68k-apple-aux${UNAME_RELEASE} 822 echo m68k-apple-aux${UNAME_RELEASE}
796 exit 0 ;; 823 exit 0 ;;
797 news*:NEWS-OS:*:6*) 824 news*:NEWS-OS:*:6*)
798 echo mips-sony-newsos6 825 echo mips-sony-newsos6
799 exit 0 ;; 826 exit 0 ;;
800 R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) 827 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
801 if [ -d /usr/nec ]; then 828 if [ -d /usr/nec ]; then
802 echo mips-nec-sysv${UNAME_RELEASE} 829 echo mips-nec-sysv${UNAME_RELEASE}
803 else 830 else
804 echo mips-unknown-sysv${UNAME_RELEASE} 831 echo mips-unknown-sysv${UNAME_RELEASE}
805 fi 832 fi
811 echo powerpc-apple-beos 838 echo powerpc-apple-beos
812 exit 0 ;; 839 exit 0 ;;
813 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 840 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
814 echo i586-pc-beos 841 echo i586-pc-beos
815 exit 0 ;; 842 exit 0 ;;
843 SX-4:SUPER-UX:*:*)
844 echo sx4-nec-superux${UNAME_RELEASE}
845 exit 0 ;;
846 SX-5:SUPER-UX:*:*)
847 echo sx5-nec-superux${UNAME_RELEASE}
848 exit 0 ;;
849 Power*:Rhapsody:*:*)
850 echo powerpc-apple-rhapsody${UNAME_RELEASE}
851 exit 0 ;;
852 *:Rhapsody:*:*)
853 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
854 exit 0 ;;
816 esac 855 esac
817 856
818 #echo '(No uname command or uname output not recognized.)' 1>&2 857 #echo '(No uname command or uname output not recognized.)' 1>&2
819 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 858 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
820 859
821 cat >dummy.c <<EOF 860 cat >$dummy.c <<EOF
822 #ifdef _SEQUENT_ 861 #ifdef _SEQUENT_
823 # include <sys/types.h> 862 # include <sys/types.h>
824 # include <sys/utsname.h> 863 # include <sys/utsname.h>
825 #endif 864 #endif
826 main () 865 main ()
854 #if !defined (__ARCHITECTURE__) 893 #if !defined (__ARCHITECTURE__)
855 #define __ARCHITECTURE__ "m68k" 894 #define __ARCHITECTURE__ "m68k"
856 #endif 895 #endif
857 int version; 896 int version;
858 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 897 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
859 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 898 if (version < 4)
899 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
900 else
901 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
860 exit (0); 902 exit (0);
861 #endif 903 #endif
862 904
863 #if defined (MULTIMAX) || defined (n16) 905 #if defined (MULTIMAX) || defined (n16)
864 #if defined (UMAXV) 906 #if defined (UMAXV)
914 956
915 exit (1); 957 exit (1);
916 } 958 }
917 EOF 959 EOF
918 960
919 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 961 ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
920 rm -f dummy.c dummy 962 rm -f $dummy.c $dummy
921 963
922 # Apollos put the system type in the environment. 964 # Apollos put the system type in the environment.
923 965
924 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 966 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
925 967