/[svn]/ircd-hybrid/trunk/config.guess
ViewVC logotype

Diff of /ircd-hybrid/trunk/config.guess

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

revision 9964 by michael, Mon Nov 30 11:33:28 2020 UTC revision 9965 by michael, Fri Jun 4 13:25:46 2021 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 1992-2020 Free Software Foundation, Inc.  #   Copyright 1992-2021 Free Software Foundation, Inc.
4    
5  timestamp='2020-11-19'  timestamp='2021-05-24'
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
# Line 50  version="\ Line 50  version="\
50  GNU config.guess ($timestamp)  GNU config.guess ($timestamp)
51    
52  Originally written by Per Bothner.  Originally written by Per Bothner.
53  Copyright 1992-2020 Free Software Foundation, Inc.  Copyright 1992-2021 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 136  UNAME_RELEASE=$( (uname -r) 2>/dev/null) Line 136  UNAME_RELEASE=$( (uname -r) 2>/dev/null)
136  UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown  UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown
137  UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown  UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown
138    
139  case "$UNAME_SYSTEM" in  case $UNAME_SYSTEM in
140  Linux|GNU|GNU/*)  Linux|GNU|GNU/*)
141          LIBC=unknown          LIBC=unknown
142    
# Line 176  esac Line 176  esac
176    
177  # Note: order is significant - the case branches are not exclusive.  # Note: order is significant - the case branches are not exclusive.
178    
179  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in  case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
180      *:NetBSD:*:*)      *:NetBSD:*:*)
181          # NetBSD (nbsd) targets should (where applicable) match one or          # NetBSD (nbsd) targets should (where applicable) match one or
182          # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,          # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# Line 188  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 188  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
188          #          #
189          # Note: NetBSD doesn't particularly care about the vendor          # Note: NetBSD doesn't particularly care about the vendor
190          # portion of the name.  We always set it to "unknown".          # portion of the name.  We always set it to "unknown".
         sysctl="sysctl -n hw.machine_arch"  
191          UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \          UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \
192              "/sbin/$sysctl" 2>/dev/null || \              /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
193              "/usr/sbin/$sysctl" 2>/dev/null || \              /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
194              echo unknown))              echo unknown))
195          case "$UNAME_MACHINE_ARCH" in          case $UNAME_MACHINE_ARCH in
196              aarch64eb) machine=aarch64_be-unknown ;;              aarch64eb) machine=aarch64_be-unknown ;;
197              armeb) machine=armeb-unknown ;;              armeb) machine=armeb-unknown ;;
198              arm*) machine=arm-unknown ;;              arm*) machine=arm-unknown ;;
# Line 209  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 208  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
208          esac          esac
209          # The Operating System including object format, if it has switched          # The Operating System including object format, if it has switched
210          # to ELF recently (or will in the future) and ABI.          # to ELF recently (or will in the future) and ABI.
211          case "$UNAME_MACHINE_ARCH" in          case $UNAME_MACHINE_ARCH in
212              earm*)              earm*)
213                  os=netbsdelf                  os=netbsdelf
214                  ;;                  ;;
# Line 230  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 229  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
229                  ;;                  ;;
230          esac          esac
231          # Determine ABI tags.          # Determine ABI tags.
232          case "$UNAME_MACHINE_ARCH" in          case $UNAME_MACHINE_ARCH in
233              earm*)              earm*)
234                  expr='s/^earmv[0-9]/-eabi/;s/eb$//'                  expr='s/^earmv[0-9]/-eabi/;s/eb$//'
235                  abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr")                  abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr")
# Line 241  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 240  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
240          # thus, need a distinct triplet. However, they do not need          # thus, need a distinct triplet. However, they do not need
241          # kernel version information, so it can be replaced with a          # kernel version information, so it can be replaced with a
242          # suitable tag, in the style of linux-gnu.          # suitable tag, in the style of linux-gnu.
243          case "$UNAME_VERSION" in          case $UNAME_VERSION in
244              Debian*)              Debian*)
245                  release='-gnu'                  release='-gnu'
246                  ;;                  ;;
# Line 262  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 261  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
261          UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')          UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
262          echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"          echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
263          exit ;;          exit ;;
264        *:SecBSD:*:*)
265            UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//')
266            echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE"
267            exit ;;
268      *:LibertyBSD:*:*)      *:LibertyBSD:*:*)
269          UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')          UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
270          echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"          echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
# Line 297  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 300  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
300          echo mips-dec-osf1          echo mips-dec-osf1
301          exit ;;          exit ;;
302      alpha:OSF1:*:*)      alpha:OSF1:*:*)
303            # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
304            trap '' 0
305          case $UNAME_RELEASE in          case $UNAME_RELEASE in
306          *4.0)          *4.0)
307                  UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}')                  UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}')
# Line 310  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 315  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
315          # covers most systems running today.  This code pipes the CPU          # covers most systems running today.  This code pipes the CPU
316          # types through head -n 1, so we only detect the type of CPU 0.          # types through head -n 1, so we only detect the type of CPU 0.
317          ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1)          ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1)
318          case "$ALPHA_CPU_TYPE" in          case $ALPHA_CPU_TYPE in
319              "EV4 (21064)")              "EV4 (21064)")
320                  UNAME_MACHINE=alpha ;;                  UNAME_MACHINE=alpha ;;
321              "EV4.5 (21064)")              "EV4.5 (21064)")
# Line 348  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 353  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
353          # A Xn.n version is an unreleased experimental baselevel.          # A Xn.n version is an unreleased experimental baselevel.
354          # 1.2 uses "1.2" for uname -r.          # 1.2 uses "1.2" for uname -r.
355          echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"          echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"
356          # Reset EXIT trap before exiting to avoid spurious non-zero exit code.          exit ;;
         exitcode=$?  
         trap '' 0  
         exit $exitcode ;;  
357      Amiga*:UNIX_System_V:4.0:*)      Amiga*:UNIX_System_V:4.0:*)
358          echo m68k-unknown-sysv4          echo m68k-unknown-sysv4
359          exit ;;          exit ;;
# Line 432  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 434  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
434          echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"          echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
435          exit ;;          exit ;;
436      sun4*:SunOS:*:*)      sun4*:SunOS:*:*)
437          case "$(/usr/bin/arch -k)" in          case $(/usr/bin/arch -k) in
438              Series*|S4*)              Series*|S4*)
439                  UNAME_RELEASE=$(uname -v)                  UNAME_RELEASE=$(uname -v)
440                  ;;                  ;;
# Line 446  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM Line 448  case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
448      sun*:*:4.2BSD:*)      sun*:*:4.2BSD:*)
449          UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null)          UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null)
450          test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3          test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
451          case "$(/bin/arch)" in          case $(/bin/arch) in
452              sun3)              sun3)
453                  echo m68k-sun-sunos"$UNAME_RELEASE"                  echo m68k-sun-sunos"$UNAME_RELEASE"
454                  ;;                  ;;
# Line 662  EOF Line 664  EOF
664          exit ;;          exit ;;
665      9000/[34678]??:HP-UX:*:*)      9000/[34678]??:HP-UX:*:*)
666          HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')          HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
667          case "$UNAME_MACHINE" in          case $UNAME_MACHINE in
668              9000/31?)            HP_ARCH=m68000 ;;              9000/31?)            HP_ARCH=m68000 ;;
669              9000/[34]??)         HP_ARCH=m68k ;;              9000/[34]??)         HP_ARCH=m68k ;;
670              9000/[678][0-9][0-9])              9000/[678][0-9][0-9])
671                  if test -x /usr/bin/getconf; then                  if test -x /usr/bin/getconf; then
672                      sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null)                      sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null)
673                      sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null)                      sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null)
674                      case "$sc_cpu_version" in                      case $sc_cpu_version in
675                        523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0                        523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
676                        528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1                        528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
677                        532)                      # CPU_PA_RISC2_0                        532)                      # CPU_PA_RISC2_0
678                          case "$sc_kernel_bits" in                          case $sc_kernel_bits in
679                            32) HP_ARCH=hppa2.0n ;;                            32) HP_ARCH=hppa2.0n ;;
680                            64) HP_ARCH=hppa2.0w ;;                            64) HP_ARCH=hppa2.0w ;;
681                            '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20                            '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
# Line 874  EOF Line 876  EOF
876          exit ;;          exit ;;
877      *:FreeBSD:*:*)      *:FreeBSD:*:*)
878          UNAME_PROCESSOR=$(/usr/bin/uname -p)          UNAME_PROCESSOR=$(/usr/bin/uname -p)
879          case "$UNAME_PROCESSOR" in          case $UNAME_PROCESSOR in
880              amd64)              amd64)
881                  UNAME_PROCESSOR=x86_64 ;;                  UNAME_PROCESSOR=x86_64 ;;
882              i386)              i386)
# Line 898  EOF Line 900  EOF
900          echo "$UNAME_MACHINE"-pc-pw32          echo "$UNAME_MACHINE"-pc-pw32
901          exit ;;          exit ;;
902      *:Interix*:*)      *:Interix*:*)
903          case "$UNAME_MACHINE" in          case $UNAME_MACHINE in
904              x86)              x86)
905                  echo i586-pc-interix"$UNAME_RELEASE"                  echo i586-pc-interix"$UNAME_RELEASE"
906                  exit ;;                  exit ;;
# Line 950  EOF Line 952  EOF
952          if test "$?" = 0 ; then LIBC=gnulibc1 ; fi          if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
953          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
954          exit ;;          exit ;;
955      arc:Linux:*:* | arceb:Linux:*:*)      arc:Linux:*:* | arceb:Linux:*:* | arc64:Linux:*:*)
956          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
957          exit ;;          exit ;;
958      arm*:Linux:*:*)      arm*:Linux:*:*)
# Line 996  EOF Line 998  EOF
998      k1om:Linux:*:*)      k1om:Linux:*:*)
999          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1000          exit ;;          exit ;;
1001        loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1002            echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1003            exit ;;
1004      m32r*:Linux:*:*)      m32r*:Linux:*:*)
1005          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1006          exit ;;          exit ;;
# Line 1084  EOF Line 1089  EOF
1089      ppcle:Linux:*:*)      ppcle:Linux:*:*)
1090          echo powerpcle-unknown-linux-"$LIBC"          echo powerpcle-unknown-linux-"$LIBC"
1091          exit ;;          exit ;;
1092      riscv32:Linux:*:* | riscv64:Linux:*:*)      riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
1093          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"          echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1094          exit ;;          exit ;;
1095      s390:Linux:*:* | s390x:Linux:*:*)      s390:Linux:*:* | s390x:Linux:*:*)
# Line 1432  EOF Line 1437  EOF
1437          # "uname -m" is not consistent, so use $cputype instead. 386          # "uname -m" is not consistent, so use $cputype instead. 386
1438          # is converted to i386 for consistency with other x86          # is converted to i386 for consistency with other x86
1439          # operating systems.          # operating systems.
1440          # shellcheck disable=SC2154          if test "${cputype-}" = 386; then
         if test "$cputype" = 386; then  
1441              UNAME_MACHINE=i386              UNAME_MACHINE=i386
1442          else          elif test "x${cputype-}" != x; then
1443              UNAME_MACHINE="$cputype"              UNAME_MACHINE="$cputype"
1444          fi          fi
1445          echo "$UNAME_MACHINE"-unknown-plan9          echo "$UNAME_MACHINE"-unknown-plan9
# Line 1466  EOF Line 1470  EOF
1470          exit ;;          exit ;;
1471      *:*VMS:*:*)      *:*VMS:*:*)
1472          UNAME_MACHINE=$( (uname -p) 2>/dev/null)          UNAME_MACHINE=$( (uname -p) 2>/dev/null)
1473          case "$UNAME_MACHINE" in          case $UNAME_MACHINE in
1474              A*) echo alpha-dec-vms ; exit ;;              A*) echo alpha-dec-vms ; exit ;;
1475              I*) echo ia64-dec-vms ; exit ;;              I*) echo ia64-dec-vms ; exit ;;
1476              V*) echo vax-dec-vms ; exit ;;              V*) echo vax-dec-vms ; exit ;;
# Line 1480  EOF Line 1484  EOF
1484      i*86:rdos:*:*)      i*86:rdos:*:*)
1485          echo "$UNAME_MACHINE"-pc-rdos          echo "$UNAME_MACHINE"-pc-rdos
1486          exit ;;          exit ;;
1487      i*86:AROS:*:*)      *:AROS:*:*)
1488          echo "$UNAME_MACHINE"-pc-aros          echo "$UNAME_MACHINE"-unknown-aros
1489          exit ;;          exit ;;
1490      x86_64:VMkernel:*:*)      x86_64:VMkernel:*:*)
1491          echo "$UNAME_MACHINE"-unknown-esx          echo "$UNAME_MACHINE"-unknown-esx
# Line 1633  test -d /usr/apollo && { echo "$ISP-apol Line 1637  test -d /usr/apollo && { echo "$ISP-apol
1637    
1638  echo "$0: unable to guess system type" >&2  echo "$0: unable to guess system type" >&2
1639    
1640  case "$UNAME_MACHINE:$UNAME_SYSTEM" in  case $UNAME_MACHINE:$UNAME_SYSTEM in
1641      mips:Linux | mips64:Linux)      mips:Linux | mips64:Linux)
1642          # If we got here on MIPS GNU/Linux, output extra information.          # If we got here on MIPS GNU/Linux, output extra information.
1643          cat >&2 <<EOF          cat >&2 <<EOF

Legend:
Removed from v.9964  
changed lines
  Added in v.9965

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28