/[autoconf]/autoconf/config/config.guess
ViewVC logotype

Diff of /autoconf/config/config.guess

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by akim, Fri Nov 2 16:38:16 2001 UTC revision 1.6 by akim, Thu Jan 24 17:35:01 2002 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2  # Attempt to guess a canonical system name.  # Attempt to guess a canonical system name.
3  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4  #   Free Software Foundation, Inc.  #   2000, 2001, 2002 Free Software Foundation, Inc.
5    
6  timestamp='2001-10-05'  timestamp='2002-01-23'
7    
8  # This file is free software; you can redistribute it and/or modify it  # 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  # under the terms of the GNU General Public License as published by
# Line 24  timestamp='2001-10-05' Line 24  timestamp='2001-10-05'
24  # configuration script generated by Autoconf, you may include it under  # configuration script generated by Autoconf, you may include it under
25  # the same distribution terms that you use for the rest of that program.  # the same distribution terms that you use for the rest of that program.
26    
27  # Originally written by Per Bothner <bothner@cygnus.com>.  # Originally written by Per Bothner <per@bothner.com>.
28  # Please send patches to <config-patches@gnu.org>.  Submit a context  # Please send patches to <config-patches@gnu.org>.  Submit a context
29  # diff and a properly formatted ChangeLog entry.  # diff and a properly formatted ChangeLog entry.
30  #  #
# Line 135  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ Line 135  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
135          # object file format.  This provides both forward          # object file format.  This provides both forward
136          # compatibility and a consistent mechanism for selecting the          # compatibility and a consistent mechanism for selecting the
137          # object file format.          # object file format.
138          # Determine the machine/vendor (is the vendor relevant).          #
139          case "${UNAME_MACHINE}" in          # Note: NetBSD doesn't particularly care about the vendor
140              amiga) machine=m68k-unknown ;;          # portion of the name.  We always set it to "unknown".
141              arm32) machine=arm-unknown ;;          UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
142              atari*) machine=m68k-atari ;;              UNAME_MACHINE_ARCH=unknown
143              sun3*) machine=m68k-sun ;;          case "${UNAME_MACHINE_ARCH}" in
144              mac68k) machine=m68k-apple ;;              arm*) machine=arm-unknown ;;
145              macppc) machine=powerpc-apple ;;              sh3el) machine=shl-unknown ;;
146              hp3[0-9][05]) machine=m68k-hp ;;              sh3eb) machine=sh-unknown ;;
147              ibmrt|romp-ibm) machine=romp-ibm ;;              *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
             sparc*) machine=`uname -p`-unknown ;;  
             *) machine=${UNAME_MACHINE}-unknown ;;  
148          esac          esac
149          # The Operating System including object format, if it has switched          # The Operating System including object format, if it has switched
150          # to ELF recently, or will in the future.          # to ELF recently, or will in the future.
151          case "${UNAME_MACHINE}" in          case "${UNAME_MACHINE_ARCH}" in
152              i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)              arm*|i386|m68k|ns32k|sh3*|sparc|vax)
153                  eval $set_cc_for_build                  eval $set_cc_for_build
154                  if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \                  if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
155                          | grep __ELF__ >/dev/null                          | grep __ELF__ >/dev/null
# Line 291  EOF Line 289  EOF
289      *:[Aa]miga[Oo][Ss]:*:*)      *:[Aa]miga[Oo][Ss]:*:*)
290          echo ${UNAME_MACHINE}-unknown-amigaos          echo ${UNAME_MACHINE}-unknown-amigaos
291          exit 0 ;;          exit 0 ;;
292        *:[Mm]orph[Oo][Ss]:*:*)
293            echo ${UNAME_MACHINE}-unknown-morphos
294            exit 0 ;;
295      *:OS/390:*:*)      *:OS/390:*:*)
296          echo i370-ibm-openedition          echo i370-ibm-openedition
297          exit 0 ;;          exit 0 ;;
# Line 736  EOF Line 737  EOF
737      i*:PW*:*)      i*:PW*:*)
738          echo ${UNAME_MACHINE}-pc-pw32          echo ${UNAME_MACHINE}-pc-pw32
739          exit 0 ;;          exit 0 ;;
740        x86:Interix*:3*)
741            echo i386-pc-interix3
742            exit 0 ;;
743      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
744          # How do we know it's Interix rather than the generic POSIX subsystem?          # How do we know it's Interix rather than the generic POSIX subsystem?
745          # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we          # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# Line 767  EOF Line 771  EOF
771          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-gnu
772          exit 0 ;;          exit 0 ;;
773      mips:Linux:*:*)      mips:Linux:*:*)
774          case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in          eval $set_cc_for_build
775            big)    echo mips-unknown-linux-gnu && exit 0 ;;          sed 's/^        //' << EOF >$dummy.c
776            little) echo mipsel-unknown-linux-gnu && exit 0 ;;          #undef CPU
777          esac          #undef mips
778            #undef mipsel
779            #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
780            CPU=mipsel
781            #else
782            #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
783            CPU=mips
784            #else
785            CPU=
786            #endif
787            #endif
788    EOF
789            eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
790            rm -f $dummy.c
791            test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
792          ;;          ;;
793      ppc:Linux:*:*)      ppc:Linux:*:*)
794          echo powerpc-unknown-linux-gnu          echo powerpc-unknown-linux-gnu
# Line 819  EOF Line 837  EOF
837          # The BFD linker knows what the default object file format is, so          # The BFD linker knows what the default object file format is, so
838          # first see if it will tell us. cd to the root directory to prevent          # first see if it will tell us. cd to the root directory to prevent
839          # problems with other programs or directories called `ld' in the path.          # problems with other programs or directories called `ld' in the path.
840          ld_supported_targets=`cd /; ld --help 2>&1 \          # Export LANG=C to prevent ld from outputting information in other
841            # languages.
842            ld_supported_targets=`LANG=C; export LANG; cd /; ld --help 2>&1 \
843                           | sed -ne '/supported targets:/!d                           | sed -ne '/supported targets:/!d
844                                      s/[         ][      ]*/ /g                                      s/[         ][      ]*/ /g
845                                      s/.*supported targets: *//                                      s/.*supported targets: *//
# Line 843  EOF Line 863  EOF
863          esac          esac
864          # Determine whether the default compiler is a.out or elf          # Determine whether the default compiler is a.out or elf
865          eval $set_cc_for_build          eval $set_cc_for_build
866          cat >$dummy.c <<EOF          sed 's/^        //' << EOF >$dummy.c
867  #include <features.h>          #include <features.h>
868  #ifdef __cplusplus          #ifdef __ELF__
869  #include <stdio.h>  /* for printf() prototype */          # ifdef __GLIBC__
870          int main (int argc, char *argv[]) {          #  if __GLIBC__ >= 2
871  #else          LIBC=gnu
872          int main (argc, argv) int argc; char *argv[]; {          #  else
873  #endif          LIBC=gnulibc1
874  #ifdef __ELF__          #  endif
875  # ifdef __GLIBC__          # else
876  #  if __GLIBC__ >= 2          LIBC=gnulibc1
877      printf ("%s-pc-linux-gnu\n", argv[1]);          # endif
878  #  else          #else
879      printf ("%s-pc-linux-gnulibc1\n", argv[1]);          #ifdef __INTEL_COMPILER
880  #  endif          LIBC=gnu
881  # else          #else
882     printf ("%s-pc-linux-gnulibc1\n", argv[1]);          LIBC=gnuaout
883  # endif          #endif
884  #else          #endif
   printf ("%s-pc-linux-gnuaout\n", argv[1]);  
 #endif  
   return 0;  
 }  
885  EOF  EOF
886          $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0          eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
887          rm -f $dummy.c $dummy          rm -f $dummy.c
888            test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
889          test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0          test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
890          ;;          ;;
891      i*86:DYNIX/ptx:4*:*)      i*86:DYNIX/ptx:4*:*)
# Line 947  EOF Line 964  EOF
964          exit 0 ;;          exit 0 ;;
965      M68*:*:R3V[567]*:*)      M68*:*:R3V[567]*:*)
966          test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;          test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
967      3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)      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 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
968          OS_REL=''          OS_REL=''
969          test -r /etc/.relid \          test -r /etc/.relid \
970          && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`          && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
# Line 1056  EOF Line 1073  EOF
1073      *:QNX:*:4*)      *:QNX:*:4*)
1074          echo i386-pc-qnx          echo i386-pc-qnx
1075          exit 0 ;;          exit 0 ;;
1076      NSR-[KW]:NONSTOP_KERNEL:*:*)      NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
1077          echo nsr-tandem-nsk${UNAME_RELEASE}          echo nsr-tandem-nsk${UNAME_RELEASE}
1078          exit 0 ;;          exit 0 ;;
1079      *:NonStop-UX:*:*)      *:NonStop-UX:*:*)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26