Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/config/config.guess
ViewVC logotype

Diff of /branches/vis15/config/config.guess

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

revision 3339, Wed Oct 21 20:14:48 2015 UTC revision 3340, Wed Oct 21 22:04:01 2015 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,  #   Copyright 1992-2015 Free Software Foundation, Inc.
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,  
 #   2011 Free Software Foundation, Inc.  
4    
5  timestamp='2011-02-02'  timestamp='2015-10-21'
6    
7  # 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
8  # under the terms of the GNU General Public License as published by  # under the terms of the GNU General Public License as published by
9  # the Free Software Foundation; either version 2 of the License, or  # the Free Software Foundation; either version 3 of the License, or
10  # (at your option) any later version.  # (at your option) any later version.
11  #  #
12  # This program is distributed in the hope that it will be useful, but  # This program is distributed in the hope that it will be useful, but
# Line 17  Line 15 
15  # General Public License for more details.  # General Public License for more details.
16  #  #
17  # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License
18  # along with this program; if not, write to the Free Software  # along with this program; if not, see <http://www.gnu.org/licenses/>.
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  
 # 02110-1301, USA.  
19  #  #
20  # As a special exception to the GNU General Public License, if you  # As a special exception to the GNU General Public License, if you
21  # distribute this file as part of a program that contains a  # distribute this file as part of a program that contains a
22  # configuration script generated by Autoconf, you may include it under  # configuration script generated by Autoconf, you may include it under
23  # 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
24    # program.  This Exception is an additional permission under section 7
25    # of the GNU General Public License, version 3 ("GPLv3").
 # Originally written by Per Bothner.  Please send patches (context  
 # diff format) to <config-patches@gnu.org> and include a ChangeLog  
 # entry.  
26  #  #
27  # This script attempts to guess a canonical system name similar to  # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 # config.sub.  If it succeeds, it prints the system name on stdout, and  
 # exits with 0.  Otherwise, it exits with 1.  
28  #  #
29  # You can get the latest version of this script from:  # You can get the latest version of this script from:
30  # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD  # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
31    #
32    # Please send patches to <config-patches@gnu.org>.
33    
34    
35  me=`echo "$0" | sed -e 's,.*/,,'`  me=`echo "$0" | sed -e 's,.*/,,'`
36    
# Line 56  Line 50 
50  GNU config.guess ($timestamp)  GNU config.guess ($timestamp)
51    
52  Originally written by Per Bothner.  Originally written by Per Bothner.
53  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,  Copyright 1992-2015 Free Software Foundation, Inc.
 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free  
 Software Foundation, Inc.  
54    
55  This is free software; see the source for copying conditions.  There is NO  This is free software; see the source for copying conditions.  There is NO
56  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
# Line 140  Line 132 
132  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
133  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
134    
135    case "${UNAME_SYSTEM}" in
136    Linux|GNU|GNU/*)
137            # If the system lacks a compiler, then just pick glibc.
138            # We could probably try harder.
139            LIBC=gnu
140    
141            eval $set_cc_for_build
142            cat <<-EOF > $dummy.c
143            #include <features.h>
144            #if defined(__UCLIBC__)
145            LIBC=uclibc
146            #elif defined(__dietlibc__)
147            LIBC=dietlibc
148            #else
149            LIBC=gnu
150            #endif
151            EOF
152            eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153            ;;
154    esac
155    
156  # Note: order is significant - the case branches are not exclusive.  # Note: order is significant - the case branches are not exclusive.
157    
158  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
159      *:NetBSD:*:*)      *:NetBSD:*:*)
160          # NetBSD (nbsd) targets should (where applicable) match one or          # NetBSD (nbsd) targets should (where applicable) match one or
161          # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,          # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
162          # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently          # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
163          # switched to ELF, *-*-netbsd* would select the old          # switched to ELF, *-*-netbsd* would select the old
164          # object file format.  This provides both forward          # object file format.  This provides both forward
# Line 155  Line 168 
168          # Note: NetBSD doesn't particularly care about the vendor          # Note: NetBSD doesn't particularly care about the vendor
169          # portion of the name.  We always set it to "unknown".          # portion of the name.  We always set it to "unknown".
170          sysctl="sysctl -n hw.machine_arch"          sysctl="sysctl -n hw.machine_arch"
171          UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \          UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
172              /usr/sbin/$sysctl 2>/dev/null || echo unknown)`              /sbin/$sysctl 2>/dev/null || \
173                /usr/sbin/$sysctl 2>/dev/null || \
174                echo unknown)`
175          case "${UNAME_MACHINE_ARCH}" in          case "${UNAME_MACHINE_ARCH}" in
176              armeb) machine=armeb-unknown ;;              armeb) machine=armeb-unknown ;;
177              arm*) machine=arm-unknown ;;              arm*) machine=arm-unknown ;;
178              sh3el) machine=shl-unknown ;;              sh3el) machine=shl-unknown ;;
179              sh3eb) machine=sh-unknown ;;              sh3eb) machine=sh-unknown ;;
180              sh5el) machine=sh5le-unknown ;;              sh5el) machine=sh5le-unknown ;;
181                earmv*)
182                    arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183                    endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
184                    machine=${arch}${endian}-unknown
185                    ;;
186              *) machine=${UNAME_MACHINE_ARCH}-unknown ;;              *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
187          esac          esac
188          # The Operating System including object format, if it has switched          # The Operating System including object format, if it has switched
189          # to ELF recently, or will in the future.          # to ELF recently, or will in the future.
190          case "${UNAME_MACHINE_ARCH}" in          case "${UNAME_MACHINE_ARCH}" in
191              arm*|i386|m68k|ns32k|sh3*|sparc|vax)              arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
192                  eval $set_cc_for_build                  eval $set_cc_for_build
193                  if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \                  if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
194                          | grep -q __ELF__                          | grep -q __ELF__
# Line 184  Line 204 
204                  os=netbsd                  os=netbsd
205                  ;;                  ;;
206          esac          esac
207            # Determine ABI tags.
208            case "${UNAME_MACHINE_ARCH}" in
209                earm*)
210                    expr='s/^earmv[0-9]/-eabi/;s/eb$//'
211                    abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
212                    ;;
213            esac
214          # The OS release          # The OS release
215          # Debian GNU/NetBSD machines have a different userland, and          # Debian GNU/NetBSD machines have a different userland, and
216          # thus, need a distinct triplet. However, they do not need          # thus, need a distinct triplet. However, they do not need
# Line 194  Line 221 
221                  release='-gnu'                  release='-gnu'
222                  ;;                  ;;
223              *)              *)
224                  release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`                  release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
225                  ;;                  ;;
226          esac          esac
227          # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:          # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
228          # contains redundant information, the shorter form:          # contains redundant information, the shorter form:
229          # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.          # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
230          echo "${machine}-${os}${release}"          echo "${machine}-${os}${release}${abi}"
231            exit ;;
232        *:Bitrig:*:*)
233            UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
234            echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
235          exit ;;          exit ;;
236      *:OpenBSD:*:*)      *:OpenBSD:*:*)
237          UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`          UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
# Line 218  Line 249 
249      *:MirBSD:*:*)      *:MirBSD:*:*)
250          echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}          echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
251          exit ;;          exit ;;
252        *:Sortix:*:*)
253            echo ${UNAME_MACHINE}-unknown-sortix
254            exit ;;
255      alpha:OSF1:*:*)      alpha:OSF1:*:*)
256          case $UNAME_RELEASE in          case $UNAME_RELEASE in
257          *4.0)          *4.0)
# Line 304  Line 338 
338      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
339          echo arm-acorn-riscix${UNAME_RELEASE}          echo arm-acorn-riscix${UNAME_RELEASE}
340          exit ;;          exit ;;
341      arm:riscos:*:*|arm:RISCOS:*:*)      arm*:riscos:*:*|arm*:RISCOS:*:*)
342          echo arm-unknown-riscos          echo arm-unknown-riscos
343          exit ;;          exit ;;
344      SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)      SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
# Line 562  Line 596 
596          else          else
597                  IBM_ARCH=powerpc                  IBM_ARCH=powerpc
598          fi          fi
599          if [ -x /usr/bin/oslevel ] ; then          if [ -x /usr/bin/lslpp ] ; then
600                  IBM_REV=`/usr/bin/oslevel`                  IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
601                               awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
602          else          else
603                  IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}                  IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
604          fi          fi
# Line 792  Line 827 
827          echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}          echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
828          exit ;;          exit ;;
829      *:FreeBSD:*:*)      *:FreeBSD:*:*)
830          case ${UNAME_MACHINE} in          UNAME_PROCESSOR=`/usr/bin/uname -p`
831              pc98)          case ${UNAME_PROCESSOR} in
                 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;  
832              amd64)              amd64)
833                  echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;                  echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
834              *)              *)
835                  echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;                  echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
836          esac          esac
837          exit ;;          exit ;;
838      i*:CYGWIN*:*)      i*:CYGWIN*:*)
839          echo ${UNAME_MACHINE}-pc-cygwin          echo ${UNAME_MACHINE}-pc-cygwin
840          exit ;;          exit ;;
841        *:MINGW64*:*)
842            echo ${UNAME_MACHINE}-pc-mingw64
843            exit ;;
844      *:MINGW*:*)      *:MINGW*:*)
845          echo ${UNAME_MACHINE}-pc-mingw32          echo ${UNAME_MACHINE}-pc-mingw32
846          exit ;;          exit ;;
847        *:MSYS*:*)
848            echo ${UNAME_MACHINE}-pc-msys
849            exit ;;
850      i*:windows32*:*)      i*:windows32*:*)
851          # uname -m includes "-pc" on this system.          # uname -m includes "-pc" on this system.
852          echo ${UNAME_MACHINE}-mingw32          echo ${UNAME_MACHINE}-mingw32
# Line 852  Line 892 
892          exit ;;          exit ;;
893      *:GNU:*:*)      *:GNU:*:*)
894          # the GNU system          # the GNU system
895          echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`          echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
896          exit ;;          exit ;;
897      *:GNU/*:*:*)      *:GNU/*:*:*)
898          # other systems with GNU libc and userland          # other systems with GNU libc and userland
899          echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu          echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
900          exit ;;          exit ;;
901      i*86:Minix:*:*)      i*86:Minix:*:*)
902          echo ${UNAME_MACHINE}-pc-minix          echo ${UNAME_MACHINE}-pc-minix
903          exit ;;          exit ;;
904        aarch64:Linux:*:*)
905            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
906            exit ;;
907        aarch64_be:Linux:*:*)
908            UNAME_MACHINE=aarch64_be
909            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
910            exit ;;
911      alpha:Linux:*:*)      alpha:Linux:*:*)
912          case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in          case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
913            EV5)   UNAME_MACHINE=alphaev5 ;;            EV5)   UNAME_MACHINE=alphaev5 ;;
# Line 872  Line 919 
919            EV68*) UNAME_MACHINE=alphaev68 ;;            EV68*) UNAME_MACHINE=alphaev68 ;;
920          esac          esac
921          objdump --private-headers /bin/sh | grep -q ld.so.1          objdump --private-headers /bin/sh | grep -q ld.so.1
922          if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi          if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
923          echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
924            exit ;;
925        arc:Linux:*:* | arceb:Linux:*:*)
926            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
927          exit ;;          exit ;;
928      arm*:Linux:*:*)      arm*:Linux:*:*)
929          eval $set_cc_for_build          eval $set_cc_for_build
930          if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \          if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
931              | grep -q __ARM_EABI__              | grep -q __ARM_EABI__
932          then          then
933              echo ${UNAME_MACHINE}-unknown-linux-gnu              echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
934            else
935                if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
936                    | grep -q __ARM_PCS_VFP
937                then
938                    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
939          else          else
940              echo ${UNAME_MACHINE}-unknown-linux-gnueabi                  echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
941                fi
942          fi          fi
943          exit ;;          exit ;;
944      avr32*:Linux:*:*)      avr32*:Linux:*:*)
945          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
946          exit ;;          exit ;;
947      cris:Linux:*:*)      cris:Linux:*:*)
948          echo cris-axis-linux-gnu          echo ${UNAME_MACHINE}-axis-linux-${LIBC}
949          exit ;;          exit ;;
950      crisv32:Linux:*:*)      crisv32:Linux:*:*)
951          echo crisv32-axis-linux-gnu          echo ${UNAME_MACHINE}-axis-linux-${LIBC}
952            exit ;;
953        e2k:Linux:*:*)
954            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
955          exit ;;          exit ;;
956      frv:Linux:*:*)      frv:Linux:*:*)
957          echo frv-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
958            exit ;;
959        hexagon:Linux:*:*)
960            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
961          exit ;;          exit ;;
962      i*86:Linux:*:*)      i*86:Linux:*:*)
963          LIBC=gnu          echo ${UNAME_MACHINE}-pc-linux-${LIBC}
         eval $set_cc_for_build  
         sed 's/^        //' << EOF >$dummy.c  
         #ifdef __dietlibc__  
         LIBC=dietlibc  
         #endif  
 EOF  
         eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`  
         echo "${UNAME_MACHINE}-pc-linux-${LIBC}"  
964          exit ;;          exit ;;
965      ia64:Linux:*:*)      ia64:Linux:*:*)
966          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
967            exit ;;
968        k1om:Linux:*:*)
969            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
970          exit ;;          exit ;;
971      m32r*:Linux:*:*)      m32r*:Linux:*:*)
972          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973          exit ;;          exit ;;
974      m68*:Linux:*:*)      m68*:Linux:*:*)
975          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976          exit ;;          exit ;;
977      mips:Linux:*:* | mips64:Linux:*:*)      mips:Linux:*:* | mips64:Linux:*:*)
978          eval $set_cc_for_build          eval $set_cc_for_build
# Line 934  Line 991 
991          #endif          #endif
992  EOF  EOF
993          eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`          eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
994          test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }          test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
995          ;;          ;;
996      or32:Linux:*:*)      openrisc*:Linux:*:*)
997          echo or32-unknown-linux-gnu          echo or1k-unknown-linux-${LIBC}
998            exit ;;
999        or32:Linux:*:* | or1k*:Linux:*:*)
1000            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1001          exit ;;          exit ;;
1002      padre:Linux:*:*)      padre:Linux:*:*)
1003          echo sparc-unknown-linux-gnu          echo sparc-unknown-linux-${LIBC}
1004          exit ;;          exit ;;
1005      parisc64:Linux:*:* | hppa64:Linux:*:*)      parisc64:Linux:*:* | hppa64:Linux:*:*)
1006          echo hppa64-unknown-linux-gnu          echo hppa64-unknown-linux-${LIBC}
1007          exit ;;          exit ;;
1008      parisc:Linux:*:* | hppa:Linux:*:*)      parisc:Linux:*:* | hppa:Linux:*:*)
1009          # Look for CPU level          # Look for CPU level
1010          case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in          case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1011            PA7*) echo hppa1.1-unknown-linux-gnu ;;            PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1012            PA8*) echo hppa2.0-unknown-linux-gnu ;;            PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1013            *)    echo hppa-unknown-linux-gnu ;;            *)    echo hppa-unknown-linux-${LIBC} ;;
1014          esac          esac
1015          exit ;;          exit ;;
1016      ppc64:Linux:*:*)      ppc64:Linux:*:*)
1017          echo powerpc64-unknown-linux-gnu          echo powerpc64-unknown-linux-${LIBC}
1018          exit ;;          exit ;;
1019      ppc:Linux:*:*)      ppc:Linux:*:*)
1020          echo powerpc-unknown-linux-gnu          echo powerpc-unknown-linux-${LIBC}
1021            exit ;;
1022        ppc64le:Linux:*:*)
1023            echo powerpc64le-unknown-linux-${LIBC}
1024            exit ;;
1025        ppcle:Linux:*:*)
1026            echo powerpcle-unknown-linux-${LIBC}
1027          exit ;;          exit ;;
1028      s390:Linux:*:* | s390x:Linux:*:*)      s390:Linux:*:* | s390x:Linux:*:*)
1029          echo ${UNAME_MACHINE}-ibm-linux          echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1030          exit ;;          exit ;;
1031      sh64*:Linux:*:*)      sh64*:Linux:*:*)
1032          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1033          exit ;;          exit ;;
1034      sh*:Linux:*:*)      sh*:Linux:*:*)
1035          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1036          exit ;;          exit ;;
1037      sparc:Linux:*:* | sparc64:Linux:*:*)      sparc:Linux:*:* | sparc64:Linux:*:*)
1038          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1039          exit ;;          exit ;;
1040      tile*:Linux:*:*)      tile*:Linux:*:*)
1041          echo ${UNAME_MACHINE}-tilera-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1042          exit ;;          exit ;;
1043      vax:Linux:*:*)      vax:Linux:*:*)
1044          echo ${UNAME_MACHINE}-dec-linux-gnu          echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1045          exit ;;          exit ;;
1046      x86_64:Linux:*:*)      x86_64:Linux:*:*)
1047          echo x86_64-unknown-linux-gnu          echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1048          exit ;;          exit ;;
1049      xtensa*:Linux:*:*)      xtensa*:Linux:*:*)
1050          echo ${UNAME_MACHINE}-unknown-linux-gnu          echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1051          exit ;;          exit ;;
1052      i*86:DYNIX/ptx:4*:*)      i*86:DYNIX/ptx:4*:*)
1053          # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.          # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# Line 1057  Line 1123 
1123          # uname -m prints for DJGPP always 'pc', but it prints nothing about          # uname -m prints for DJGPP always 'pc', but it prints nothing about
1124          # the processor, so we play safe by assuming i586.          # the processor, so we play safe by assuming i586.
1125          # Note: whatever this is, it MUST be the same as what config.sub          # Note: whatever this is, it MUST be the same as what config.sub
1126          # prints for the "djgpp" host, or else GDB configury will decide that          # prints for the "djgpp" host, or else GDB configure will decide that
1127          # this is a cross-build.          # this is a cross-build.
1128          echo i586-pc-msdosdjgpp          echo i586-pc-msdosdjgpp
1129          exit ;;          exit ;;
# Line 1185  Line 1251 
1251      BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.      BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
1252          echo i586-pc-haiku          echo i586-pc-haiku
1253          exit ;;          exit ;;
1254        x86_64:Haiku:*:*)
1255            echo x86_64-unknown-haiku
1256            exit ;;
1257      SX-4:SUPER-UX:*:*)      SX-4:SUPER-UX:*:*)
1258          echo sx4-nec-superux${UNAME_RELEASE}          echo sx4-nec-superux${UNAME_RELEASE}
1259          exit ;;          exit ;;
# Line 1211  Line 1280 
1280          exit ;;          exit ;;
1281      *:Darwin:*:*)      *:Darwin:*:*)
1282          UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown          UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
         case $UNAME_PROCESSOR in  
             i386)  
1283                  eval $set_cc_for_build                  eval $set_cc_for_build
1284            if test "$UNAME_PROCESSOR" = unknown ; then
1285                UNAME_PROCESSOR=powerpc
1286            fi
1287            if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1288                  if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then                  if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1289                    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \                    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1290                        (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \                        (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1291                        grep IS_64BIT_ARCH >/dev/null                        grep IS_64BIT_ARCH >/dev/null
1292                    then                    then
1293                        UNAME_PROCESSOR="x86_64"                      case $UNAME_PROCESSOR in
1294                    fi                          i386) UNAME_PROCESSOR=x86_64 ;;
1295                  fi ;;                          powerpc) UNAME_PROCESSOR=powerpc64 ;;
             unknown) UNAME_PROCESSOR=powerpc ;;  
1296          esac          esac
1297                    fi
1298                fi
1299            elif test "$UNAME_PROCESSOR" = i386 ; then
1300                # Avoid executing cc on OS X 10.9, as it ships with a stub
1301                # that puts up a graphical alert prompting to install
1302                # developer tools.  Any system running Mac OS X 10.7 or
1303                # later (Darwin 11 and later) is required to have a 64-bit
1304                # processor. This is not true of the ARM version of Darwin
1305                # that Apple uses in portable devices.
1306                UNAME_PROCESSOR=x86_64
1307            fi
1308          echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}          echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1309          exit ;;          exit ;;
1310      *:procnto*:*:* | *:QNX:[0123456789]*:*)      *:procnto*:*:* | *:QNX:[0123456789]*:*)
# Line 1240  Line 1321 
1321      NEO-?:NONSTOP_KERNEL:*:*)      NEO-?:NONSTOP_KERNEL:*:*)
1322          echo neo-tandem-nsk${UNAME_RELEASE}          echo neo-tandem-nsk${UNAME_RELEASE}
1323          exit ;;          exit ;;
1324      NSE-?:NONSTOP_KERNEL:*:*)      NSE-*:NONSTOP_KERNEL:*:*)
1325          echo nse-tandem-nsk${UNAME_RELEASE}          echo nse-tandem-nsk${UNAME_RELEASE}
1326          exit ;;          exit ;;
1327      NSR-?:NONSTOP_KERNEL:*:*)      NSR-?:NONSTOP_KERNEL:*:*)
# Line 1309  Line 1390 
1390      i*86:AROS:*:*)      i*86:AROS:*:*)
1391          echo ${UNAME_MACHINE}-pc-aros          echo ${UNAME_MACHINE}-pc-aros
1392          exit ;;          exit ;;
1393  esac      x86_64:VMkernel:*:*)
1394            echo ${UNAME_MACHINE}-unknown-esx
 #echo '(No uname command or uname output not recognized.)' 1>&2  
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2  
   
 eval $set_cc_for_build  
 cat >$dummy.c <<EOF  
 #ifdef _SEQUENT_  
 # include <sys/types.h>  
 # include <sys/utsname.h>  
 #endif  
 main ()  
 {  
 #if defined (sony)  
 #if defined (MIPSEB)  
   /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,  
      I don't know....  */  
   printf ("mips-sony-bsd\n"); exit (0);  
 #else  
 #include <sys/param.h>  
   printf ("m68k-sony-newsos%s\n",  
 #ifdef NEWSOS4  
         "4"  
 #else  
         ""  
 #endif  
         ); exit (0);  
 #endif  
 #endif  
   
 #if defined (__arm) && defined (__acorn) && defined (__unix)  
   printf ("arm-acorn-riscix\n"); exit (0);  
 #endif  
   
 #if defined (hp300) && !defined (hpux)  
   printf ("m68k-hp-bsd\n"); exit (0);  
 #endif  
   
 #if defined (NeXT)  
 #if !defined (__ARCHITECTURE__)  
 #define __ARCHITECTURE__ "m68k"  
 #endif  
   int version;  
   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;  
   if (version < 4)  
     printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);  
   else  
     printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);  
   exit (0);  
 #endif  
   
 #if defined (MULTIMAX) || defined (n16)  
 #if defined (UMAXV)  
   printf ("ns32k-encore-sysv\n"); exit (0);  
 #else  
 #if defined (CMU)  
   printf ("ns32k-encore-mach\n"); exit (0);  
 #else  
   printf ("ns32k-encore-bsd\n"); exit (0);  
 #endif  
 #endif  
 #endif  
   
 #if defined (__386BSD__)  
   printf ("i386-pc-bsd\n"); exit (0);  
 #endif  
   
 #if defined (sequent)  
 #if defined (i386)  
   printf ("i386-sequent-dynix\n"); exit (0);  
 #endif  
 #if defined (ns32000)  
   printf ("ns32k-sequent-dynix\n"); exit (0);  
 #endif  
 #endif  
   
 #if defined (_SEQUENT_)  
     struct utsname un;  
   
     uname(&un);  
   
     if (strncmp(un.version, "V2", 2) == 0) {  
         printf ("i386-sequent-ptx2\n"); exit (0);  
     }  
     if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */  
         printf ("i386-sequent-ptx1\n"); exit (0);  
     }  
     printf ("i386-sequent-ptx\n"); exit (0);  
   
 #endif  
   
 #if defined (vax)  
 # if !defined (ultrix)  
 #  include <sys/param.h>  
 #  if defined (BSD)  
 #   if BSD == 43  
       printf ("vax-dec-bsd4.3\n"); exit (0);  
 #   else  
 #    if BSD == 199006  
       printf ("vax-dec-bsd4.3reno\n"); exit (0);  
 #    else  
       printf ("vax-dec-bsd\n"); exit (0);  
 #    endif  
 #   endif  
 #  else  
     printf ("vax-dec-bsd\n"); exit (0);  
 #  endif  
 # else  
     printf ("vax-dec-ultrix\n"); exit (0);  
 # endif  
 #endif  
   
 #if defined (alliant) && defined (i860)  
   printf ("i860-alliant-bsd\n"); exit (0);  
 #endif  
   
   exit (1);  
 }  
 EOF  
   
 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&  
         { echo "$SYSTEM_NAME"; exit; }  
   
 # Apollos put the system type in the environment.  
   
 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }  
   
 # Convex versions that predate uname can use getsysinfo(1)  
   
 if [ -x /usr/convex/getsysinfo ]  
 then  
     case `getsysinfo -f cpu_type` in  
     c1*)  
         echo c1-convex-bsd  
         exit ;;  
     c2*)  
         if getsysinfo -f scalar_acc  
         then echo c32-convex-bsd  
         else echo c2-convex-bsd  
         fi  
         exit ;;  
     c34*)  
         echo c34-convex-bsd  
         exit ;;  
     c38*)  
         echo c38-convex-bsd  
         exit ;;  
     c4*)  
         echo c4-convex-bsd  
1395          exit ;;          exit ;;
1396      esac      esac
 fi  
1397    
1398  cat >&2 <<EOF  cat >&2 <<EOF
1399  $0: unable to guess system type  $0: unable to guess system type

Legend:
Removed from v.3339  
changed lines
  Added in v.3340

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0