Commit b0c73a714ce1241b119a3a53266ec43bc95c2c38

Authored by Georg Hopp
1 parent feb87430

and add some files formaly added by automake

  1 +#! /bin/sh
  2 +# Attempt to guess a canonical system name.
  3 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  4 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
  5 +# 2011 Free Software Foundation, Inc.
  6 +
  7 +timestamp='2011-06-03'
  8 +
  9 +# This file is free software; you can redistribute it and/or modify it
  10 +# under the terms of the GNU General Public License as published by
  11 +# the Free Software Foundation; either version 2 of the License, or
  12 +# (at your option) any later version.
  13 +#
  14 +# This program is distributed in the hope that it will be useful, but
  15 +# WITHOUT ANY WARRANTY; without even the implied warranty of
  16 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17 +# General Public License for more details.
  18 +#
  19 +# You should have received a copy of the GNU General Public License
  20 +# along with this program; if not, write to the Free Software
  21 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  22 +# 02110-1301, USA.
  23 +#
  24 +# As a special exception to the GNU General Public License, if you
  25 +# distribute this file as part of a program that contains a
  26 +# configuration script generated by Autoconf, you may include it under
  27 +# the same distribution terms that you use for the rest of that program.
  28 +
  29 +
  30 +# Originally written by Per Bothner. Please send patches (context
  31 +# diff format) to <config-patches@gnu.org> and include a ChangeLog
  32 +# entry.
  33 +#
  34 +# This script attempts to guess a canonical system name similar to
  35 +# config.sub. If it succeeds, it prints the system name on stdout, and
  36 +# exits with 0. Otherwise, it exits with 1.
  37 +#
  38 +# You can get the latest version of this script from:
  39 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  40 +
  41 +me=`echo "$0" | sed -e 's,.*/,,'`
  42 +
  43 +usage="\
  44 +Usage: $0 [OPTION]
  45 +
  46 +Output the configuration name of the system \`$me' is run on.
  47 +
  48 +Operation modes:
  49 + -h, --help print this help, then exit
  50 + -t, --time-stamp print date of last modification, then exit
  51 + -v, --version print version number, then exit
  52 +
  53 +Report bugs and patches to <config-patches@gnu.org>."
  54 +
  55 +version="\
  56 +GNU config.guess ($timestamp)
  57 +
  58 +Originally written by Per Bothner.
  59 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
  60 +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
  61 +Software Foundation, Inc.
  62 +
  63 +This is free software; see the source for copying conditions. There is NO
  64 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  65 +
  66 +help="
  67 +Try \`$me --help' for more information."
  68 +
  69 +# Parse command line
  70 +while test $# -gt 0 ; do
  71 + case $1 in
  72 + --time-stamp | --time* | -t )
  73 + echo "$timestamp" ; exit ;;
  74 + --version | -v )
  75 + echo "$version" ; exit ;;
  76 + --help | --h* | -h )
  77 + echo "$usage"; exit ;;
  78 + -- ) # Stop option processing
  79 + shift; break ;;
  80 + - ) # Use stdin as input.
  81 + break ;;
  82 + -* )
  83 + echo "$me: invalid option $1$help" >&2
  84 + exit 1 ;;
  85 + * )
  86 + break ;;
  87 + esac
  88 +done
  89 +
  90 +if test $# != 0; then
  91 + echo "$me: too many arguments$help" >&2
  92 + exit 1
  93 +fi
  94 +
  95 +trap 'exit 1' 1 2 15
  96 +
  97 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
  98 +# compiler to aid in system detection is discouraged as it requires
  99 +# temporary files to be created and, as you can see below, it is a
  100 +# headache to deal with in a portable fashion.
  101 +
  102 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
  103 +# use `HOST_CC' if defined, but it is deprecated.
  104 +
  105 +# Portable tmp directory creation inspired by the Autoconf team.
  106 +
  107 +set_cc_for_build='
  108 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
  109 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
  110 +: ${TMPDIR=/tmp} ;
  111 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  112 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  113 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  114 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
  115 +dummy=$tmp/dummy ;
  116 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
  117 +case $CC_FOR_BUILD,$HOST_CC,$CC in
  118 + ,,) echo "int x;" > $dummy.c ;
  119 + for c in cc gcc c89 c99 ; do
  120 + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
  121 + CC_FOR_BUILD="$c"; break ;
  122 + fi ;
  123 + done ;
  124 + if test x"$CC_FOR_BUILD" = x ; then
  125 + CC_FOR_BUILD=no_compiler_found ;
  126 + fi
  127 + ;;
  128 + ,,*) CC_FOR_BUILD=$CC ;;
  129 + ,*,*) CC_FOR_BUILD=$HOST_CC ;;
  130 +esac ; set_cc_for_build= ;'
  131 +
  132 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  133 +# (ghazi@noc.rutgers.edu 1994-08-24)
  134 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
  135 + PATH=$PATH:/.attbin ; export PATH
  136 +fi
  137 +
  138 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  139 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  140 +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  141 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  142 +
  143 +case "${UNAME_SYSTEM}" in
  144 +Linux|GNU/*)
  145 + eval $set_cc_for_build
  146 + cat <<-EOF > $dummy.c
  147 + #include <features.h>
  148 + #ifdef __UCLIBC__
  149 + # ifdef __UCLIBC_CONFIG_VERSION__
  150 + LIBC=uclibc __UCLIBC_CONFIG_VERSION__
  151 + # else
  152 + LIBC=uclibc
  153 + # endif
  154 + #else
  155 + # ifdef __dietlibc__
  156 + LIBC=dietlibc
  157 + # else
  158 + LIBC=gnu
  159 + # endif
  160 + #endif
  161 + EOF
  162 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
  163 + ;;
  164 +esac
  165 +
  166 +# Note: order is significant - the case branches are not exclusive.
  167 +
  168 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  169 + *:NetBSD:*:*)
  170 + # NetBSD (nbsd) targets should (where applicable) match one or
  171 + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  172 + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
  173 + # switched to ELF, *-*-netbsd* would select the old
  174 + # object file format. This provides both forward
  175 + # compatibility and a consistent mechanism for selecting the
  176 + # object file format.
  177 + #
  178 + # Note: NetBSD doesn't particularly care about the vendor
  179 + # portion of the name. We always set it to "unknown".
  180 + sysctl="sysctl -n hw.machine_arch"
  181 + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
  182 + /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
  183 + case "${UNAME_MACHINE_ARCH}" in
  184 + armeb) machine=armeb-unknown ;;
  185 + arm*) machine=arm-unknown ;;
  186 + sh3el) machine=shl-unknown ;;
  187 + sh3eb) machine=sh-unknown ;;
  188 + sh5el) machine=sh5le-unknown ;;
  189 + *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
  190 + esac
  191 + # The Operating System including object format, if it has switched
  192 + # to ELF recently, or will in the future.
  193 + case "${UNAME_MACHINE_ARCH}" in
  194 + arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  195 + eval $set_cc_for_build
  196 + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  197 + | grep -q __ELF__
  198 + then
  199 + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  200 + # Return netbsd for either. FIX?
  201 + os=netbsd
  202 + else
  203 + os=netbsdelf
  204 + fi
  205 + ;;
  206 + *)
  207 + os=netbsd
  208 + ;;
  209 + esac
  210 + # The OS release
  211 + # Debian GNU/NetBSD machines have a different userland, and
  212 + # thus, need a distinct triplet. However, they do not need
  213 + # kernel version information, so it can be replaced with a
  214 + # suitable tag, in the style of linux-gnu.
  215 + case "${UNAME_VERSION}" in
  216 + Debian*)
  217 + release='-gnu'
  218 + ;;
  219 + *)
  220 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  221 + ;;
  222 + esac
  223 + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
  224 + # contains redundant information, the shorter form:
  225 + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  226 + echo "${machine}-${os}${release}"
  227 + exit ;;
  228 + *:OpenBSD:*:*)
  229 + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  230 + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  231 + exit ;;
  232 + *:ekkoBSD:*:*)
  233 + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
  234 + exit ;;
  235 + *:SolidBSD:*:*)
  236 + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
  237 + exit ;;
  238 + macppc:MirBSD:*:*)
  239 + echo powerpc-unknown-mirbsd${UNAME_RELEASE}
  240 + exit ;;
  241 + *:MirBSD:*:*)
  242 + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
  243 + exit ;;
  244 + alpha:OSF1:*:*)
  245 + case $UNAME_RELEASE in
  246 + *4.0)
  247 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  248 + ;;
  249 + *5.*)
  250 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  251 + ;;
  252 + esac
  253 + # According to Compaq, /usr/sbin/psrinfo has been available on
  254 + # OSF/1 and Tru64 systems produced since 1995. I hope that
  255 + # covers most systems running today. This code pipes the CPU
  256 + # types through head -n 1, so we only detect the type of CPU 0.
  257 + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
  258 + case "$ALPHA_CPU_TYPE" in
  259 + "EV4 (21064)")
  260 + UNAME_MACHINE="alpha" ;;
  261 + "EV4.5 (21064)")
  262 + UNAME_MACHINE="alpha" ;;
  263 + "LCA4 (21066/21068)")
  264 + UNAME_MACHINE="alpha" ;;
  265 + "EV5 (21164)")
  266 + UNAME_MACHINE="alphaev5" ;;
  267 + "EV5.6 (21164A)")
  268 + UNAME_MACHINE="alphaev56" ;;
  269 + "EV5.6 (21164PC)")
  270 + UNAME_MACHINE="alphapca56" ;;
  271 + "EV5.7 (21164PC)")
  272 + UNAME_MACHINE="alphapca57" ;;
  273 + "EV6 (21264)")
  274 + UNAME_MACHINE="alphaev6" ;;
  275 + "EV6.7 (21264A)")
  276 + UNAME_MACHINE="alphaev67" ;;
  277 + "EV6.8CB (21264C)")
  278 + UNAME_MACHINE="alphaev68" ;;
  279 + "EV6.8AL (21264B)")
  280 + UNAME_MACHINE="alphaev68" ;;
  281 + "EV6.8CX (21264D)")
  282 + UNAME_MACHINE="alphaev68" ;;
  283 + "EV6.9A (21264/EV69A)")
  284 + UNAME_MACHINE="alphaev69" ;;
  285 + "EV7 (21364)")
  286 + UNAME_MACHINE="alphaev7" ;;
  287 + "EV7.9 (21364A)")
  288 + UNAME_MACHINE="alphaev79" ;;
  289 + esac
  290 + # A Pn.n version is a patched version.
  291 + # A Vn.n version is a released version.
  292 + # A Tn.n version is a released field test version.
  293 + # A Xn.n version is an unreleased experimental baselevel.
  294 + # 1.2 uses "1.2" for uname -r.
  295 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  296 + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
  297 + exitcode=$?
  298 + trap '' 0
  299 + exit $exitcode ;;
  300 + Alpha\ *:Windows_NT*:*)
  301 + # How do we know it's Interix rather than the generic POSIX subsystem?
  302 + # Should we change UNAME_MACHINE based on the output of uname instead
  303 + # of the specific Alpha model?
  304 + echo alpha-pc-interix
  305 + exit ;;
  306 + 21064:Windows_NT:50:3)
  307 + echo alpha-dec-winnt3.5
  308 + exit ;;
  309 + Amiga*:UNIX_System_V:4.0:*)
  310 + echo m68k-unknown-sysv4
  311 + exit ;;
  312 + *:[Aa]miga[Oo][Ss]:*:*)
  313 + echo ${UNAME_MACHINE}-unknown-amigaos
  314 + exit ;;
  315 + *:[Mm]orph[Oo][Ss]:*:*)
  316 + echo ${UNAME_MACHINE}-unknown-morphos
  317 + exit ;;
  318 + *:OS/390:*:*)
  319 + echo i370-ibm-openedition
  320 + exit ;;
  321 + *:z/VM:*:*)
  322 + echo s390-ibm-zvmoe
  323 + exit ;;
  324 + *:OS400:*:*)
  325 + echo powerpc-ibm-os400
  326 + exit ;;
  327 + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  328 + echo arm-acorn-riscix${UNAME_RELEASE}
  329 + exit ;;
  330 + arm:riscos:*:*|arm:RISCOS:*:*)
  331 + echo arm-unknown-riscos
  332 + exit ;;
  333 + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  334 + echo hppa1.1-hitachi-hiuxmpp
  335 + exit ;;
  336 + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  337 + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
  338 + if test "`(/bin/universe) 2>/dev/null`" = att ; then
  339 + echo pyramid-pyramid-sysv3
  340 + else
  341 + echo pyramid-pyramid-bsd
  342 + fi
  343 + exit ;;
  344 + NILE*:*:*:dcosx)
  345 + echo pyramid-pyramid-svr4
  346 + exit ;;
  347 + DRS?6000:unix:4.0:6*)
  348 + echo sparc-icl-nx6
  349 + exit ;;
  350 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
  351 + case `/usr/bin/uname -p` in
  352 + sparc) echo sparc-icl-nx7; exit ;;
  353 + esac ;;
  354 + s390x:SunOS:*:*)
  355 + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  356 + exit ;;
  357 + sun4H:SunOS:5.*:*)
  358 + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  359 + exit ;;
  360 + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  361 + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  362 + exit ;;
  363 + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  364 + echo i386-pc-auroraux${UNAME_RELEASE}
  365 + exit ;;
  366 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
  367 + eval $set_cc_for_build
  368 + SUN_ARCH="i386"
  369 + # If there is a compiler, see if it is configured for 64-bit objects.
  370 + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
  371 + # This test works for both compilers.
  372 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  373 + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
  374 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  375 + grep IS_64BIT_ARCH >/dev/null
  376 + then
  377 + SUN_ARCH="x86_64"
  378 + fi
  379 + fi
  380 + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  381 + exit ;;
  382 + sun4*:SunOS:6*:*)
  383 + # According to config.sub, this is the proper way to canonicalize
  384 + # SunOS6. Hard to guess exactly what SunOS6 will be like, but
  385 + # it's likely to be more like Solaris than SunOS4.
  386 + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  387 + exit ;;
  388 + sun4*:SunOS:*:*)
  389 + case "`/usr/bin/arch -k`" in
  390 + Series*|S4*)
  391 + UNAME_RELEASE=`uname -v`
  392 + ;;
  393 + esac
  394 + # Japanese Language versions have a version number like `4.1.3-JL'.
  395 + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  396 + exit ;;
  397 + sun3*:SunOS:*:*)
  398 + echo m68k-sun-sunos${UNAME_RELEASE}
  399 + exit ;;
  400 + sun*:*:4.2BSD:*)
  401 + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  402 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  403 + case "`/bin/arch`" in
  404 + sun3)
  405 + echo m68k-sun-sunos${UNAME_RELEASE}
  406 + ;;
  407 + sun4)
  408 + echo sparc-sun-sunos${UNAME_RELEASE}
  409 + ;;
  410 + esac
  411 + exit ;;
  412 + aushp:SunOS:*:*)
  413 + echo sparc-auspex-sunos${UNAME_RELEASE}
  414 + exit ;;
  415 + # The situation for MiNT is a little confusing. The machine name
  416 + # can be virtually everything (everything which is not
  417 + # "atarist" or "atariste" at least should have a processor
  418 + # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
  419 + # to the lowercase version "mint" (or "freemint"). Finally
  420 + # the system name "TOS" denotes a system which is actually not
  421 + # MiNT. But MiNT is downward compatible to TOS, so this should
  422 + # be no problem.
  423 + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  424 + echo m68k-atari-mint${UNAME_RELEASE}
  425 + exit ;;
  426 + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  427 + echo m68k-atari-mint${UNAME_RELEASE}
  428 + exit ;;
  429 + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  430 + echo m68k-atari-mint${UNAME_RELEASE}
  431 + exit ;;
  432 + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  433 + echo m68k-milan-mint${UNAME_RELEASE}
  434 + exit ;;
  435 + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  436 + echo m68k-hades-mint${UNAME_RELEASE}
  437 + exit ;;
  438 + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  439 + echo m68k-unknown-mint${UNAME_RELEASE}
  440 + exit ;;
  441 + m68k:machten:*:*)
  442 + echo m68k-apple-machten${UNAME_RELEASE}
  443 + exit ;;
  444 + powerpc:machten:*:*)
  445 + echo powerpc-apple-machten${UNAME_RELEASE}
  446 + exit ;;
  447 + RISC*:Mach:*:*)
  448 + echo mips-dec-mach_bsd4.3
  449 + exit ;;
  450 + RISC*:ULTRIX:*:*)
  451 + echo mips-dec-ultrix${UNAME_RELEASE}
  452 + exit ;;
  453 + VAX*:ULTRIX*:*:*)
  454 + echo vax-dec-ultrix${UNAME_RELEASE}
  455 + exit ;;
  456 + 2020:CLIX:*:* | 2430:CLIX:*:*)
  457 + echo clipper-intergraph-clix${UNAME_RELEASE}
  458 + exit ;;
  459 + mips:*:*:UMIPS | mips:*:*:RISCos)
  460 + eval $set_cc_for_build
  461 + sed 's/^ //' << EOF >$dummy.c
  462 +#ifdef __cplusplus
  463 +#include <stdio.h> /* for printf() prototype */
  464 + int main (int argc, char *argv[]) {
  465 +#else
  466 + int main (argc, argv) int argc; char *argv[]; {
  467 +#endif
  468 + #if defined (host_mips) && defined (MIPSEB)
  469 + #if defined (SYSTYPE_SYSV)
  470 + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
  471 + #endif
  472 + #if defined (SYSTYPE_SVR4)
  473 + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
  474 + #endif
  475 + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
  476 + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
  477 + #endif
  478 + #endif
  479 + exit (-1);
  480 + }
  481 +EOF
  482 + $CC_FOR_BUILD -o $dummy $dummy.c &&
  483 + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
  484 + SYSTEM_NAME=`$dummy $dummyarg` &&
  485 + { echo "$SYSTEM_NAME"; exit; }
  486 + echo mips-mips-riscos${UNAME_RELEASE}
  487 + exit ;;
  488 + Motorola:PowerMAX_OS:*:*)
  489 + echo powerpc-motorola-powermax
  490 + exit ;;
  491 + Motorola:*:4.3:PL8-*)
  492 + echo powerpc-harris-powermax
  493 + exit ;;
  494 + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
  495 + echo powerpc-harris-powermax
  496 + exit ;;
  497 + Night_Hawk:Power_UNIX:*:*)
  498 + echo powerpc-harris-powerunix
  499 + exit ;;
  500 + m88k:CX/UX:7*:*)
  501 + echo m88k-harris-cxux7
  502 + exit ;;
  503 + m88k:*:4*:R4*)
  504 + echo m88k-motorola-sysv4
  505 + exit ;;
  506 + m88k:*:3*:R3*)
  507 + echo m88k-motorola-sysv3
  508 + exit ;;
  509 + AViiON:dgux:*:*)
  510 + # DG/UX returns AViiON for all architectures
  511 + UNAME_PROCESSOR=`/usr/bin/uname -p`
  512 + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  513 + then
  514 + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  515 + [ ${TARGET_BINARY_INTERFACE}x = x ]
  516 + then
  517 + echo m88k-dg-dgux${UNAME_RELEASE}
  518 + else
  519 + echo m88k-dg-dguxbcs${UNAME_RELEASE}
  520 + fi
  521 + else
  522 + echo i586-dg-dgux${UNAME_RELEASE}
  523 + fi
  524 + exit ;;
  525 + M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  526 + echo m88k-dolphin-sysv3
  527 + exit ;;
  528 + M88*:*:R3*:*)
  529 + # Delta 88k system running SVR3
  530 + echo m88k-motorola-sysv3
  531 + exit ;;
  532 + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  533 + echo m88k-tektronix-sysv3
  534 + exit ;;
  535 + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  536 + echo m68k-tektronix-bsd
  537 + exit ;;
  538 + *:IRIX*:*:*)
  539 + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
  540 + exit ;;
  541 + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  542 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
  543 + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
  544 + i*86:AIX:*:*)
  545 + echo i386-ibm-aix
  546 + exit ;;
  547 + ia64:AIX:*:*)
  548 + if [ -x /usr/bin/oslevel ] ; then
  549 + IBM_REV=`/usr/bin/oslevel`
  550 + else
  551 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  552 + fi
  553 + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
  554 + exit ;;
  555 + *:AIX:2:3)
  556 + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  557 + eval $set_cc_for_build
  558 + sed 's/^ //' << EOF >$dummy.c
  559 + #include <sys/systemcfg.h>
  560 +
  561 + main()
  562 + {
  563 + if (!__power_pc())
  564 + exit(1);
  565 + puts("powerpc-ibm-aix3.2.5");
  566 + exit(0);
  567 + }
  568 +EOF
  569 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
  570 + then
  571 + echo "$SYSTEM_NAME"
  572 + else
  573 + echo rs6000-ibm-aix3.2.5
  574 + fi
  575 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  576 + echo rs6000-ibm-aix3.2.4
  577 + else
  578 + echo rs6000-ibm-aix3.2
  579 + fi
  580 + exit ;;
  581 + *:AIX:*:[4567])
  582 + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  583 + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  584 + IBM_ARCH=rs6000
  585 + else
  586 + IBM_ARCH=powerpc
  587 + fi
  588 + if [ -x /usr/bin/oslevel ] ; then
  589 + IBM_REV=`/usr/bin/oslevel`
  590 + else
  591 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  592 + fi
  593 + echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  594 + exit ;;
  595 + *:AIX:*:*)
  596 + echo rs6000-ibm-aix
  597 + exit ;;
  598 + ibmrt:4.4BSD:*|romp-ibm:BSD:*)
  599 + echo romp-ibm-bsd4.4
  600 + exit ;;
  601 + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
  602 + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
  603 + exit ;; # report: romp-ibm BSD 4.3
  604 + *:BOSX:*:*)
  605 + echo rs6000-bull-bosx
  606 + exit ;;
  607 + DPX/2?00:B.O.S.:*:*)
  608 + echo m68k-bull-sysv3
  609 + exit ;;
  610 + 9000/[34]??:4.3bsd:1.*:*)
  611 + echo m68k-hp-bsd
  612 + exit ;;
  613 + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  614 + echo m68k-hp-bsd4.4
  615 + exit ;;
  616 + 9000/[34678]??:HP-UX:*:*)
  617 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  618 + case "${UNAME_MACHINE}" in
  619 + 9000/31? ) HP_ARCH=m68000 ;;
  620 + 9000/[34]?? ) HP_ARCH=m68k ;;
  621 + 9000/[678][0-9][0-9])
  622 + if [ -x /usr/bin/getconf ]; then
  623 + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  624 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  625 + case "${sc_cpu_version}" in
  626 + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  627 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  628 + 532) # CPU_PA_RISC2_0
  629 + case "${sc_kernel_bits}" in
  630 + 32) HP_ARCH="hppa2.0n" ;;
  631 + 64) HP_ARCH="hppa2.0w" ;;
  632 + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
  633 + esac ;;
  634 + esac
  635 + fi
  636 + if [ "${HP_ARCH}" = "" ]; then
  637 + eval $set_cc_for_build
  638 + sed 's/^ //' << EOF >$dummy.c
  639 +
  640 + #define _HPUX_SOURCE
  641 + #include <stdlib.h>
  642 + #include <unistd.h>
  643 +
  644 + int main ()
  645 + {
  646 + #if defined(_SC_KERNEL_BITS)
  647 + long bits = sysconf(_SC_KERNEL_BITS);
  648 + #endif
  649 + long cpu = sysconf (_SC_CPU_VERSION);
  650 +
  651 + switch (cpu)
  652 + {
  653 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  654 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  655 + case CPU_PA_RISC2_0:
  656 + #if defined(_SC_KERNEL_BITS)
  657 + switch (bits)
  658 + {
  659 + case 64: puts ("hppa2.0w"); break;
  660 + case 32: puts ("hppa2.0n"); break;
  661 + default: puts ("hppa2.0"); break;
  662 + } break;
  663 + #else /* !defined(_SC_KERNEL_BITS) */
  664 + puts ("hppa2.0"); break;
  665 + #endif
  666 + default: puts ("hppa1.0"); break;
  667 + }
  668 + exit (0);
  669 + }
  670 +EOF
  671 + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  672 + test -z "$HP_ARCH" && HP_ARCH=hppa
  673 + fi ;;
  674 + esac
  675 + if [ ${HP_ARCH} = "hppa2.0w" ]
  676 + then
  677 + eval $set_cc_for_build
  678 +
  679 + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
  680 + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
  681 + # generating 64-bit code. GNU and HP use different nomenclature:
  682 + #
  683 + # $ CC_FOR_BUILD=cc ./config.guess
  684 + # => hppa2.0w-hp-hpux11.23
  685 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
  686 + # => hppa64-hp-hpux11.23
  687 +
  688 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
  689 + grep -q __LP64__
  690 + then
  691 + HP_ARCH="hppa2.0w"
  692 + else
  693 + HP_ARCH="hppa64"
  694 + fi
  695 + fi
  696 + echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  697 + exit ;;
  698 + ia64:HP-UX:*:*)
  699 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  700 + echo ia64-hp-hpux${HPUX_REV}
  701 + exit ;;
  702 + 3050*:HI-UX:*:*)
  703 + eval $set_cc_for_build
  704 + sed 's/^ //' << EOF >$dummy.c
  705 + #include <unistd.h>
  706 + int
  707 + main ()
  708 + {
  709 + long cpu = sysconf (_SC_CPU_VERSION);
  710 + /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  711 + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
  712 + results, however. */
  713 + if (CPU_IS_PA_RISC (cpu))
  714 + {
  715 + switch (cpu)
  716 + {
  717 + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  718 + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  719 + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  720 + default: puts ("hppa-hitachi-hiuxwe2"); break;
  721 + }
  722 + }
  723 + else if (CPU_IS_HP_MC68K (cpu))
  724 + puts ("m68k-hitachi-hiuxwe2");
  725 + else puts ("unknown-hitachi-hiuxwe2");
  726 + exit (0);
  727 + }
  728 +EOF
  729 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
  730 + { echo "$SYSTEM_NAME"; exit; }
  731 + echo unknown-hitachi-hiuxwe2
  732 + exit ;;
  733 + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
  734 + echo hppa1.1-hp-bsd
  735 + exit ;;
  736 + 9000/8??:4.3bsd:*:*)
  737 + echo hppa1.0-hp-bsd
  738 + exit ;;
  739 + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
  740 + echo hppa1.0-hp-mpeix
  741 + exit ;;
  742 + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
  743 + echo hppa1.1-hp-osf
  744 + exit ;;
  745 + hp8??:OSF1:*:*)
  746 + echo hppa1.0-hp-osf
  747 + exit ;;
  748 + i*86:OSF1:*:*)
  749 + if [ -x /usr/sbin/sysversion ] ; then
  750 + echo ${UNAME_MACHINE}-unknown-osf1mk
  751 + else
  752 + echo ${UNAME_MACHINE}-unknown-osf1
  753 + fi
  754 + exit ;;
  755 + parisc*:Lites*:*:*)
  756 + echo hppa1.1-hp-lites
  757 + exit ;;
  758 + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  759 + echo c1-convex-bsd
  760 + exit ;;
  761 + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  762 + if getsysinfo -f scalar_acc
  763 + then echo c32-convex-bsd
  764 + else echo c2-convex-bsd
  765 + fi
  766 + exit ;;
  767 + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  768 + echo c34-convex-bsd
  769 + exit ;;
  770 + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  771 + echo c38-convex-bsd
  772 + exit ;;
  773 + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  774 + echo c4-convex-bsd
  775 + exit ;;
  776 + CRAY*Y-MP:*:*:*)
  777 + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  778 + exit ;;
  779 + CRAY*[A-Z]90:*:*:*)
  780 + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
  781 + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  782 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
  783 + -e 's/\.[^.]*$/.X/'
  784 + exit ;;
  785 + CRAY*TS:*:*:*)
  786 + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  787 + exit ;;
  788 + CRAY*T3E:*:*:*)
  789 + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  790 + exit ;;
  791 + CRAY*SV1:*:*:*)
  792 + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  793 + exit ;;
  794 + *:UNICOS/mp:*:*)
  795 + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  796 + exit ;;
  797 + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  798 + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  799 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  800 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  801 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  802 + exit ;;
  803 + 5000:UNIX_System_V:4.*:*)
  804 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  805 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  806 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  807 + exit ;;
  808 + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  809 + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  810 + exit ;;
  811 + sparc*:BSD/OS:*:*)
  812 + echo sparc-unknown-bsdi${UNAME_RELEASE}
  813 + exit ;;
  814 + *:BSD/OS:*:*)
  815 + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  816 + exit ;;
  817 + *:FreeBSD:*:*)
  818 + case ${UNAME_MACHINE} in
  819 + pc98)
  820 + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  821 + amd64)
  822 + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  823 + *)
  824 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  825 + esac
  826 + exit ;;
  827 + i*:CYGWIN*:*)
  828 + echo ${UNAME_MACHINE}-pc-cygwin
  829 + exit ;;
  830 + *:MINGW*:*)
  831 + echo ${UNAME_MACHINE}-pc-mingw32
  832 + exit ;;
  833 + i*:windows32*:*)
  834 + # uname -m includes "-pc" on this system.
  835 + echo ${UNAME_MACHINE}-mingw32
  836 + exit ;;
  837 + i*:PW*:*)
  838 + echo ${UNAME_MACHINE}-pc-pw32
  839 + exit ;;
  840 + *:Interix*:*)
  841 + case ${UNAME_MACHINE} in
  842 + x86)
  843 + echo i586-pc-interix${UNAME_RELEASE}
  844 + exit ;;
  845 + authenticamd | genuineintel | EM64T)
  846 + echo x86_64-unknown-interix${UNAME_RELEASE}
  847 + exit ;;
  848 + IA64)
  849 + echo ia64-unknown-interix${UNAME_RELEASE}
  850 + exit ;;
  851 + esac ;;
  852 + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  853 + echo i${UNAME_MACHINE}-pc-mks
  854 + exit ;;
  855 + 8664:Windows_NT:*)
  856 + echo x86_64-pc-mks
  857 + exit ;;
  858 + i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  859 + # How do we know it's Interix rather than the generic POSIX subsystem?
  860 + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  861 + # UNAME_MACHINE based on the output of uname instead of i386?
  862 + echo i586-pc-interix
  863 + exit ;;
  864 + i*:UWIN*:*)
  865 + echo ${UNAME_MACHINE}-pc-uwin
  866 + exit ;;
  867 + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
  868 + echo x86_64-unknown-cygwin
  869 + exit ;;
  870 + p*:CYGWIN*:*)
  871 + echo powerpcle-unknown-cygwin
  872 + exit ;;
  873 + prep*:SunOS:5.*:*)
  874 + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  875 + exit ;;
  876 + *:GNU:*:*)
  877 + # the GNU system
  878 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  879 + exit ;;
  880 + *:GNU/*:*:*)
  881 + # other systems with GNU libc and userland
  882 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
  883 + exit ;;
  884 + i*86:Minix:*:*)
  885 + echo ${UNAME_MACHINE}-pc-minix
  886 + exit ;;
  887 + alpha:Linux:*:*)
  888 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  889 + EV5) UNAME_MACHINE=alphaev5 ;;
  890 + EV56) UNAME_MACHINE=alphaev56 ;;
  891 + PCA56) UNAME_MACHINE=alphapca56 ;;
  892 + PCA57) UNAME_MACHINE=alphapca56 ;;
  893 + EV6) UNAME_MACHINE=alphaev6 ;;
  894 + EV67) UNAME_MACHINE=alphaev67 ;;
  895 + EV68*) UNAME_MACHINE=alphaev68 ;;
  896 + esac
  897 + objdump --private-headers /bin/sh | grep -q ld.so.1
  898 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
  899 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  900 + exit ;;
  901 + arm*:Linux:*:*)
  902 + eval $set_cc_for_build
  903 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  904 + | grep -q __ARM_EABI__
  905 + then
  906 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  907 + else
  908 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  909 + | grep -q __ARM_PCS_VFP
  910 + then
  911 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
  912 + else
  913 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
  914 + fi
  915 + fi
  916 + exit ;;
  917 + avr32*:Linux:*:*)
  918 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  919 + exit ;;
  920 + cris:Linux:*:*)
  921 + echo cris-axis-linux-${LIBC}
  922 + exit ;;
  923 + crisv32:Linux:*:*)
  924 + echo crisv32-axis-linux-${LIBC}
  925 + exit ;;
  926 + frv:Linux:*:*)
  927 + echo frv-unknown-linux-${LIBC}
  928 + exit ;;
  929 + i*86:Linux:*:*)
  930 + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
  931 + exit ;;
  932 + ia64:Linux:*:*)
  933 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  934 + exit ;;
  935 + m32r*:Linux:*:*)
  936 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  937 + exit ;;
  938 + m68*:Linux:*:*)
  939 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  940 + exit ;;
  941 + mips:Linux:*:* | mips64:Linux:*:*)
  942 + eval $set_cc_for_build
  943 + sed 's/^ //' << EOF >$dummy.c
  944 + #undef CPU
  945 + #undef ${UNAME_MACHINE}
  946 + #undef ${UNAME_MACHINE}el
  947 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  948 + CPU=${UNAME_MACHINE}el
  949 + #else
  950 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  951 + CPU=${UNAME_MACHINE}
  952 + #else
  953 + CPU=
  954 + #endif
  955 + #endif
  956 +EOF
  957 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  958 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  959 + ;;
  960 + or32:Linux:*:*)
  961 + echo or32-unknown-linux-${LIBC}
  962 + exit ;;
  963 + padre:Linux:*:*)
  964 + echo sparc-unknown-linux-${LIBC}
  965 + exit ;;
  966 + parisc64:Linux:*:* | hppa64:Linux:*:*)
  967 + echo hppa64-unknown-linux-${LIBC}
  968 + exit ;;
  969 + parisc:Linux:*:* | hppa:Linux:*:*)
  970 + # Look for CPU level
  971 + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  972 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
  973 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
  974 + *) echo hppa-unknown-linux-${LIBC} ;;
  975 + esac
  976 + exit ;;
  977 + ppc64:Linux:*:*)
  978 + echo powerpc64-unknown-linux-${LIBC}
  979 + exit ;;
  980 + ppc:Linux:*:*)
  981 + echo powerpc-unknown-linux-${LIBC}
  982 + exit ;;
  983 + s390:Linux:*:* | s390x:Linux:*:*)
  984 + echo ${UNAME_MACHINE}-ibm-linux
  985 + exit ;;
  986 + sh64*:Linux:*:*)
  987 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  988 + exit ;;
  989 + sh*:Linux:*:*)
  990 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  991 + exit ;;
  992 + sparc:Linux:*:* | sparc64:Linux:*:*)
  993 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  994 + exit ;;
  995 + tile*:Linux:*:*)
  996 + echo ${UNAME_MACHINE}-unknown-linux-gnu
  997 + exit ;;
  998 + vax:Linux:*:*)
  999 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
  1000 + exit ;;
  1001 + x86_64:Linux:*:*)
  1002 + echo x86_64-unknown-linux-${LIBC}
  1003 + exit ;;
  1004 + xtensa*:Linux:*:*)
  1005 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  1006 + exit ;;
  1007 + i*86:DYNIX/ptx:4*:*)
  1008 + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  1009 + # earlier versions are messed up and put the nodename in both
  1010 + # sysname and nodename.
  1011 + echo i386-sequent-sysv4
  1012 + exit ;;
  1013 + i*86:UNIX_SV:4.2MP:2.*)
  1014 + # Unixware is an offshoot of SVR4, but it has its own version
  1015 + # number series starting with 2...
  1016 + # I am not positive that other SVR4 systems won't match this,
  1017 + # I just have to hope. -- rms.
  1018 + # Use sysv4.2uw... so that sysv4* matches it.
  1019 + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  1020 + exit ;;
  1021 + i*86:OS/2:*:*)
  1022 + # If we were able to find `uname', then EMX Unix compatibility
  1023 + # is probably installed.
  1024 + echo ${UNAME_MACHINE}-pc-os2-emx
  1025 + exit ;;
  1026 + i*86:XTS-300:*:STOP)
  1027 + echo ${UNAME_MACHINE}-unknown-stop
  1028 + exit ;;
  1029 + i*86:atheos:*:*)
  1030 + echo ${UNAME_MACHINE}-unknown-atheos
  1031 + exit ;;
  1032 + i*86:syllable:*:*)
  1033 + echo ${UNAME_MACHINE}-pc-syllable
  1034 + exit ;;
  1035 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
  1036 + echo i386-unknown-lynxos${UNAME_RELEASE}
  1037 + exit ;;
  1038 + i*86:*DOS:*:*)
  1039 + echo ${UNAME_MACHINE}-pc-msdosdjgpp
  1040 + exit ;;
  1041 + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
  1042 + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
  1043 + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  1044 + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
  1045 + else
  1046 + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  1047 + fi
  1048 + exit ;;
  1049 + i*86:*:5:[678]*)
  1050 + # UnixWare 7.x, OpenUNIX and OpenServer 6.
  1051 + case `/bin/uname -X | grep "^Machine"` in
  1052 + *486*) UNAME_MACHINE=i486 ;;
  1053 + *Pentium) UNAME_MACHINE=i586 ;;
  1054 + *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1055 + esac
  1056 + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
  1057 + exit ;;
  1058 + i*86:*:3.2:*)
  1059 + if test -f /usr/options/cb.name; then
  1060 + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  1061 + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
  1062 + elif /bin/uname -X 2>/dev/null >/dev/null ; then
  1063 + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
  1064 + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
  1065 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
  1066 + && UNAME_MACHINE=i586
  1067 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
  1068 + && UNAME_MACHINE=i686
  1069 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
  1070 + && UNAME_MACHINE=i686
  1071 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  1072 + else
  1073 + echo ${UNAME_MACHINE}-pc-sysv32
  1074 + fi
  1075 + exit ;;
  1076 + pc:*:*:*)
  1077 + # Left here for compatibility:
  1078 + # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1079 + # the processor, so we play safe by assuming i586.
  1080 + # Note: whatever this is, it MUST be the same as what config.sub
  1081 + # prints for the "djgpp" host, or else GDB configury will decide that
  1082 + # this is a cross-build.
  1083 + echo i586-pc-msdosdjgpp
  1084 + exit ;;
  1085 + Intel:Mach:3*:*)
  1086 + echo i386-pc-mach3
  1087 + exit ;;
  1088 + paragon:*:*:*)
  1089 + echo i860-intel-osf1
  1090 + exit ;;
  1091 + i860:*:4.*:*) # i860-SVR4
  1092 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  1093 + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  1094 + else # Add other i860-SVR4 vendors below as they are discovered.
  1095 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
  1096 + fi
  1097 + exit ;;
  1098 + mini*:CTIX:SYS*5:*)
  1099 + # "miniframe"
  1100 + echo m68010-convergent-sysv
  1101 + exit ;;
  1102 + mc68k:UNIX:SYSTEM5:3.51m)
  1103 + echo m68k-convergent-sysv
  1104 + exit ;;
  1105 + M680?0:D-NIX:5.3:*)
  1106 + echo m68k-diab-dnix
  1107 + exit ;;
  1108 + M68*:*:R3V[5678]*:*)
  1109 + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
  1110 + 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)
  1111 + OS_REL=''
  1112 + test -r /etc/.relid \
  1113 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1114 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1115 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1116 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1117 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1118 + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1119 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1120 + && { echo i486-ncr-sysv4; exit; } ;;
  1121 + NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  1122 + OS_REL='.3'
  1123 + test -r /etc/.relid \
  1124 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1125 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1126 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1127 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1128 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
  1129 + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
  1130 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1131 + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  1132 + echo m68k-unknown-lynxos${UNAME_RELEASE}
  1133 + exit ;;
  1134 + mc68030:UNIX_System_V:4.*:*)
  1135 + echo m68k-atari-sysv4
  1136 + exit ;;
  1137 + TSUNAMI:LynxOS:2.*:*)
  1138 + echo sparc-unknown-lynxos${UNAME_RELEASE}
  1139 + exit ;;
  1140 + rs6000:LynxOS:2.*:*)
  1141 + echo rs6000-unknown-lynxos${UNAME_RELEASE}
  1142 + exit ;;
  1143 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
  1144 + echo powerpc-unknown-lynxos${UNAME_RELEASE}
  1145 + exit ;;
  1146 + SM[BE]S:UNIX_SV:*:*)
  1147 + echo mips-dde-sysv${UNAME_RELEASE}
  1148 + exit ;;
  1149 + RM*:ReliantUNIX-*:*:*)
  1150 + echo mips-sni-sysv4
  1151 + exit ;;
  1152 + RM*:SINIX-*:*:*)
  1153 + echo mips-sni-sysv4
  1154 + exit ;;
  1155 + *:SINIX-*:*:*)
  1156 + if uname -p 2>/dev/null >/dev/null ; then
  1157 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1158 + echo ${UNAME_MACHINE}-sni-sysv4
  1159 + else
  1160 + echo ns32k-sni-sysv
  1161 + fi
  1162 + exit ;;
  1163 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1164 + # says <Richard.M.Bartel@ccMail.Census.GOV>
  1165 + echo i586-unisys-sysv4
  1166 + exit ;;
  1167 + *:UNIX_System_V:4*:FTX*)
  1168 + # From Gerald Hewes <hewes@openmarket.com>.
  1169 + # How about differentiating between stratus architectures? -djm
  1170 + echo hppa1.1-stratus-sysv4
  1171 + exit ;;
  1172 + *:*:*:FTX*)
  1173 + # From seanf@swdc.stratus.com.
  1174 + echo i860-stratus-sysv4
  1175 + exit ;;
  1176 + i*86:VOS:*:*)
  1177 + # From Paul.Green@stratus.com.
  1178 + echo ${UNAME_MACHINE}-stratus-vos
  1179 + exit ;;
  1180 + *:VOS:*:*)
  1181 + # From Paul.Green@stratus.com.
  1182 + echo hppa1.1-stratus-vos
  1183 + exit ;;
  1184 + mc68*:A/UX:*:*)
  1185 + echo m68k-apple-aux${UNAME_RELEASE}
  1186 + exit ;;
  1187 + news*:NEWS-OS:6*:*)
  1188 + echo mips-sony-newsos6
  1189 + exit ;;
  1190 + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1191 + if [ -d /usr/nec ]; then
  1192 + echo mips-nec-sysv${UNAME_RELEASE}
  1193 + else
  1194 + echo mips-unknown-sysv${UNAME_RELEASE}
  1195 + fi
  1196 + exit ;;
  1197 + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  1198 + echo powerpc-be-beos
  1199 + exit ;;
  1200 + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
  1201 + echo powerpc-apple-beos
  1202 + exit ;;
  1203 + BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  1204 + echo i586-pc-beos
  1205 + exit ;;
  1206 + BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  1207 + echo i586-pc-haiku
  1208 + exit ;;
  1209 + SX-4:SUPER-UX:*:*)
  1210 + echo sx4-nec-superux${UNAME_RELEASE}
  1211 + exit ;;
  1212 + SX-5:SUPER-UX:*:*)
  1213 + echo sx5-nec-superux${UNAME_RELEASE}
  1214 + exit ;;
  1215 + SX-6:SUPER-UX:*:*)
  1216 + echo sx6-nec-superux${UNAME_RELEASE}
  1217 + exit ;;
  1218 + SX-7:SUPER-UX:*:*)
  1219 + echo sx7-nec-superux${UNAME_RELEASE}
  1220 + exit ;;
  1221 + SX-8:SUPER-UX:*:*)
  1222 + echo sx8-nec-superux${UNAME_RELEASE}
  1223 + exit ;;
  1224 + SX-8R:SUPER-UX:*:*)
  1225 + echo sx8r-nec-superux${UNAME_RELEASE}
  1226 + exit ;;
  1227 + Power*:Rhapsody:*:*)
  1228 + echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1229 + exit ;;
  1230 + *:Rhapsody:*:*)
  1231 + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1232 + exit ;;
  1233 + *:Darwin:*:*)
  1234 + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  1235 + case $UNAME_PROCESSOR in
  1236 + i386)
  1237 + eval $set_cc_for_build
  1238 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  1239 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  1240 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  1241 + grep IS_64BIT_ARCH >/dev/null
  1242 + then
  1243 + UNAME_PROCESSOR="x86_64"
  1244 + fi
  1245 + fi ;;
  1246 + unknown) UNAME_PROCESSOR=powerpc ;;
  1247 + esac
  1248 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  1249 + exit ;;
  1250 + *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1251 + UNAME_PROCESSOR=`uname -p`
  1252 + if test "$UNAME_PROCESSOR" = "x86"; then
  1253 + UNAME_PROCESSOR=i386
  1254 + UNAME_MACHINE=pc
  1255 + fi
  1256 + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1257 + exit ;;
  1258 + *:QNX:*:4*)
  1259 + echo i386-pc-qnx
  1260 + exit ;;
  1261 + NEO-?:NONSTOP_KERNEL:*:*)
  1262 + echo neo-tandem-nsk${UNAME_RELEASE}
  1263 + exit ;;
  1264 + NSE-?:NONSTOP_KERNEL:*:*)
  1265 + echo nse-tandem-nsk${UNAME_RELEASE}
  1266 + exit ;;
  1267 + NSR-?:NONSTOP_KERNEL:*:*)
  1268 + echo nsr-tandem-nsk${UNAME_RELEASE}
  1269 + exit ;;
  1270 + *:NonStop-UX:*:*)
  1271 + echo mips-compaq-nonstopux
  1272 + exit ;;
  1273 + BS2000:POSIX*:*:*)
  1274 + echo bs2000-siemens-sysv
  1275 + exit ;;
  1276 + DS/*:UNIX_System_V:*:*)
  1277 + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
  1278 + exit ;;
  1279 + *:Plan9:*:*)
  1280 + # "uname -m" is not consistent, so use $cputype instead. 386
  1281 + # is converted to i386 for consistency with other x86
  1282 + # operating systems.
  1283 + if test "$cputype" = "386"; then
  1284 + UNAME_MACHINE=i386
  1285 + else
  1286 + UNAME_MACHINE="$cputype"
  1287 + fi
  1288 + echo ${UNAME_MACHINE}-unknown-plan9
  1289 + exit ;;
  1290 + *:TOPS-10:*:*)
  1291 + echo pdp10-unknown-tops10
  1292 + exit ;;
  1293 + *:TENEX:*:*)
  1294 + echo pdp10-unknown-tenex
  1295 + exit ;;
  1296 + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
  1297 + echo pdp10-dec-tops20
  1298 + exit ;;
  1299 + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
  1300 + echo pdp10-xkl-tops20
  1301 + exit ;;
  1302 + *:TOPS-20:*:*)
  1303 + echo pdp10-unknown-tops20
  1304 + exit ;;
  1305 + *:ITS:*:*)
  1306 + echo pdp10-unknown-its
  1307 + exit ;;
  1308 + SEI:*:*:SEIUX)
  1309 + echo mips-sei-seiux${UNAME_RELEASE}
  1310 + exit ;;
  1311 + *:DragonFly:*:*)
  1312 + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1313 + exit ;;
  1314 + *:*VMS:*:*)
  1315 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1316 + case "${UNAME_MACHINE}" in
  1317 + A*) echo alpha-dec-vms ; exit ;;
  1318 + I*) echo ia64-dec-vms ; exit ;;
  1319 + V*) echo vax-dec-vms ; exit ;;
  1320 + esac ;;
  1321 + *:XENIX:*:SysV)
  1322 + echo i386-pc-xenix
  1323 + exit ;;
  1324 + i*86:skyos:*:*)
  1325 + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
  1326 + exit ;;
  1327 + i*86:rdos:*:*)
  1328 + echo ${UNAME_MACHINE}-pc-rdos
  1329 + exit ;;
  1330 + i*86:AROS:*:*)
  1331 + echo ${UNAME_MACHINE}-pc-aros
  1332 + exit ;;
  1333 +esac
  1334 +
  1335 +#echo '(No uname command or uname output not recognized.)' 1>&2
  1336 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1337 +
  1338 +eval $set_cc_for_build
  1339 +cat >$dummy.c <<EOF
  1340 +#ifdef _SEQUENT_
  1341 +# include <sys/types.h>
  1342 +# include <sys/utsname.h>
  1343 +#endif
  1344 +main ()
  1345 +{
  1346 +#if defined (sony)
  1347 +#if defined (MIPSEB)
  1348 + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  1349 + I don't know.... */
  1350 + printf ("mips-sony-bsd\n"); exit (0);
  1351 +#else
  1352 +#include <sys/param.h>
  1353 + printf ("m68k-sony-newsos%s\n",
  1354 +#ifdef NEWSOS4
  1355 + "4"
  1356 +#else
  1357 + ""
  1358 +#endif
  1359 + ); exit (0);
  1360 +#endif
  1361 +#endif
  1362 +
  1363 +#if defined (__arm) && defined (__acorn) && defined (__unix)
  1364 + printf ("arm-acorn-riscix\n"); exit (0);
  1365 +#endif
  1366 +
  1367 +#if defined (hp300) && !defined (hpux)
  1368 + printf ("m68k-hp-bsd\n"); exit (0);
  1369 +#endif
  1370 +
  1371 +#if defined (NeXT)
  1372 +#if !defined (__ARCHITECTURE__)
  1373 +#define __ARCHITECTURE__ "m68k"
  1374 +#endif
  1375 + int version;
  1376 + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  1377 + if (version < 4)
  1378 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  1379 + else
  1380 + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1381 + exit (0);
  1382 +#endif
  1383 +
  1384 +#if defined (MULTIMAX) || defined (n16)
  1385 +#if defined (UMAXV)
  1386 + printf ("ns32k-encore-sysv\n"); exit (0);
  1387 +#else
  1388 +#if defined (CMU)
  1389 + printf ("ns32k-encore-mach\n"); exit (0);
  1390 +#else
  1391 + printf ("ns32k-encore-bsd\n"); exit (0);
  1392 +#endif
  1393 +#endif
  1394 +#endif
  1395 +
  1396 +#if defined (__386BSD__)
  1397 + printf ("i386-pc-bsd\n"); exit (0);
  1398 +#endif
  1399 +
  1400 +#if defined (sequent)
  1401 +#if defined (i386)
  1402 + printf ("i386-sequent-dynix\n"); exit (0);
  1403 +#endif
  1404 +#if defined (ns32000)
  1405 + printf ("ns32k-sequent-dynix\n"); exit (0);
  1406 +#endif
  1407 +#endif
  1408 +
  1409 +#if defined (_SEQUENT_)
  1410 + struct utsname un;
  1411 +
  1412 + uname(&un);
  1413 +
  1414 + if (strncmp(un.version, "V2", 2) == 0) {
  1415 + printf ("i386-sequent-ptx2\n"); exit (0);
  1416 + }
  1417 + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1418 + printf ("i386-sequent-ptx1\n"); exit (0);
  1419 + }
  1420 + printf ("i386-sequent-ptx\n"); exit (0);
  1421 +
  1422 +#endif
  1423 +
  1424 +#if defined (vax)
  1425 +# if !defined (ultrix)
  1426 +# include <sys/param.h>
  1427 +# if defined (BSD)
  1428 +# if BSD == 43
  1429 + printf ("vax-dec-bsd4.3\n"); exit (0);
  1430 +# else
  1431 +# if BSD == 199006
  1432 + printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1433 +# else
  1434 + printf ("vax-dec-bsd\n"); exit (0);
  1435 +# endif
  1436 +# endif
  1437 +# else
  1438 + printf ("vax-dec-bsd\n"); exit (0);
  1439 +# endif
  1440 +# else
  1441 + printf ("vax-dec-ultrix\n"); exit (0);
  1442 +# endif
  1443 +#endif
  1444 +
  1445 +#if defined (alliant) && defined (i860)
  1446 + printf ("i860-alliant-bsd\n"); exit (0);
  1447 +#endif
  1448 +
  1449 + exit (1);
  1450 +}
  1451 +EOF
  1452 +
  1453 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1454 + { echo "$SYSTEM_NAME"; exit; }
  1455 +
  1456 +# Apollos put the system type in the environment.
  1457 +
  1458 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1459 +
  1460 +# Convex versions that predate uname can use getsysinfo(1)
  1461 +
  1462 +if [ -x /usr/convex/getsysinfo ]
  1463 +then
  1464 + case `getsysinfo -f cpu_type` in
  1465 + c1*)
  1466 + echo c1-convex-bsd
  1467 + exit ;;
  1468 + c2*)
  1469 + if getsysinfo -f scalar_acc
  1470 + then echo c32-convex-bsd
  1471 + else echo c2-convex-bsd
  1472 + fi
  1473 + exit ;;
  1474 + c34*)
  1475 + echo c34-convex-bsd
  1476 + exit ;;
  1477 + c38*)
  1478 + echo c38-convex-bsd
  1479 + exit ;;
  1480 + c4*)
  1481 + echo c4-convex-bsd
  1482 + exit ;;
  1483 + esac
  1484 +fi
  1485 +
  1486 +cat >&2 <<EOF
  1487 +$0: unable to guess system type
  1488 +
  1489 +This script, last modified $timestamp, has failed to recognize
  1490 +the operating system you are using. It is advised that you
  1491 +download the most up to date version of the config scripts from
  1492 +
  1493 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  1494 +and
  1495 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
  1496 +
  1497 +If the version you run ($0) is already up to date, please
  1498 +send the following data and any information you think might be
  1499 +pertinent to <config-patches@gnu.org> in order to provide the needed
  1500 +information to handle your system.
  1501 +
  1502 +config.guess timestamp = $timestamp
  1503 +
  1504 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
  1505 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
  1506 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
  1507 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
  1508 +
  1509 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  1510 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
  1511 +
  1512 +hostinfo = `(hostinfo) 2>/dev/null`
  1513 +/bin/universe = `(/bin/universe) 2>/dev/null`
  1514 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
  1515 +/bin/arch = `(/bin/arch) 2>/dev/null`
  1516 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
  1517 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  1518 +
  1519 +UNAME_MACHINE = ${UNAME_MACHINE}
  1520 +UNAME_RELEASE = ${UNAME_RELEASE}
  1521 +UNAME_SYSTEM = ${UNAME_SYSTEM}
  1522 +UNAME_VERSION = ${UNAME_VERSION}
  1523 +EOF
  1524 +
  1525 +exit 1
  1526 +
  1527 +# Local variables:
  1528 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  1529 +# time-stamp-start: "timestamp='"
  1530 +# time-stamp-format: "%:y-%02m-%02d"
  1531 +# time-stamp-end: "'"
  1532 +# End:
  1 +#! /bin/sh
  2 +# Configuration validation subroutine script.
  3 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  4 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
  5 +# 2011 Free Software Foundation, Inc.
  6 +
  7 +timestamp='2011-06-03'
  8 +
  9 +# This file is (in principle) common to ALL GNU software.
  10 +# The presence of a machine in this file suggests that SOME GNU software
  11 +# can handle that machine. It does not imply ALL GNU software can.
  12 +#
  13 +# This file is free software; you can redistribute it and/or modify
  14 +# it under the terms of the GNU General Public License as published by
  15 +# the Free Software Foundation; either version 2 of the License, or
  16 +# (at your option) any later version.
  17 +#
  18 +# This program is distributed in the hope that it will be useful,
  19 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  20 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21 +# GNU General Public License for more details.
  22 +#
  23 +# You should have received a copy of the GNU General Public License
  24 +# along with this program; if not, write to the Free Software
  25 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  26 +# 02110-1301, USA.
  27 +#
  28 +# As a special exception to the GNU General Public License, if you
  29 +# distribute this file as part of a program that contains a
  30 +# configuration script generated by Autoconf, you may include it under
  31 +# the same distribution terms that you use for the rest of that program.
  32 +
  33 +
  34 +# Please send patches to <config-patches@gnu.org>. Submit a context
  35 +# diff and a properly formatted GNU ChangeLog entry.
  36 +#
  37 +# Configuration subroutine to validate and canonicalize a configuration type.
  38 +# Supply the specified configuration type as an argument.
  39 +# If it is invalid, we print an error message on stderr and exit with code 1.
  40 +# Otherwise, we print the canonical config type on stdout and succeed.
  41 +
  42 +# You can get the latest version of this script from:
  43 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
  44 +
  45 +# This file is supposed to be the same for all GNU packages
  46 +# and recognize all the CPU types, system types and aliases
  47 +# that are meaningful with *any* GNU software.
  48 +# Each package is responsible for reporting which valid configurations
  49 +# it does not support. The user should be able to distinguish
  50 +# a failure to support a valid configuration from a meaningless
  51 +# configuration.
  52 +
  53 +# The goal of this file is to map all the various variations of a given
  54 +# machine specification into a single specification in the form:
  55 +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  56 +# or in some cases, the newer four-part form:
  57 +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  58 +# It is wrong to echo any other type of specification.
  59 +
  60 +me=`echo "$0" | sed -e 's,.*/,,'`
  61 +
  62 +usage="\
  63 +Usage: $0 [OPTION] CPU-MFR-OPSYS
  64 + $0 [OPTION] ALIAS
  65 +
  66 +Canonicalize a configuration name.
  67 +
  68 +Operation modes:
  69 + -h, --help print this help, then exit
  70 + -t, --time-stamp print date of last modification, then exit
  71 + -v, --version print version number, then exit
  72 +
  73 +Report bugs and patches to <config-patches@gnu.org>."
  74 +
  75 +version="\
  76 +GNU config.sub ($timestamp)
  77 +
  78 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
  79 +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
  80 +Software Foundation, Inc.
  81 +
  82 +This is free software; see the source for copying conditions. There is NO
  83 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  84 +
  85 +help="
  86 +Try \`$me --help' for more information."
  87 +
  88 +# Parse command line
  89 +while test $# -gt 0 ; do
  90 + case $1 in
  91 + --time-stamp | --time* | -t )
  92 + echo "$timestamp" ; exit ;;
  93 + --version | -v )
  94 + echo "$version" ; exit ;;
  95 + --help | --h* | -h )
  96 + echo "$usage"; exit ;;
  97 + -- ) # Stop option processing
  98 + shift; break ;;
  99 + - ) # Use stdin as input.
  100 + break ;;
  101 + -* )
  102 + echo "$me: invalid option $1$help"
  103 + exit 1 ;;
  104 +
  105 + *local*)
  106 + # First pass through any local machine types.
  107 + echo $1
  108 + exit ;;
  109 +
  110 + * )
  111 + break ;;
  112 + esac
  113 +done
  114 +
  115 +case $# in
  116 + 0) echo "$me: missing argument$help" >&2
  117 + exit 1;;
  118 + 1) ;;
  119 + *) echo "$me: too many arguments$help" >&2
  120 + exit 1;;
  121 +esac
  122 +
  123 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  124 +# Here we must recognize all the valid KERNEL-OS combinations.
  125 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  126 +case $maybe_os in
  127 + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
  128 + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
  129 + knetbsd*-gnu* | netbsd*-gnu* | \
  130 + kopensolaris*-gnu* | \
  131 + storm-chaos* | os2-emx* | rtmk-nova*)
  132 + os=-$maybe_os
  133 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  134 + ;;
  135 + *)
  136 + basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  137 + if [ $basic_machine != $1 ]
  138 + then os=`echo $1 | sed 's/.*-/-/'`
  139 + else os=; fi
  140 + ;;
  141 +esac
  142 +
  143 +### Let's recognize common machines as not being operating systems so
  144 +### that things like config.sub decstation-3100 work. We also
  145 +### recognize some manufacturers as not being operating systems, so we
  146 +### can provide default operating systems below.
  147 +case $os in
  148 + -sun*os*)
  149 + # Prevent following clause from handling this invalid input.
  150 + ;;
  151 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  152 + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  153 + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  154 + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  155 + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  156 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  157 + -apple | -axis | -knuth | -cray | -microblaze)
  158 + os=
  159 + basic_machine=$1
  160 + ;;
  161 + -bluegene*)
  162 + os=-cnk
  163 + ;;
  164 + -sim | -cisco | -oki | -wec | -winbond)
  165 + os=
  166 + basic_machine=$1
  167 + ;;
  168 + -scout)
  169 + ;;
  170 + -wrs)
  171 + os=-vxworks
  172 + basic_machine=$1
  173 + ;;
  174 + -chorusos*)
  175 + os=-chorusos
  176 + basic_machine=$1
  177 + ;;
  178 + -chorusrdb)
  179 + os=-chorusrdb
  180 + basic_machine=$1
  181 + ;;
  182 + -hiux*)
  183 + os=-hiuxwe2
  184 + ;;
  185 + -sco6)
  186 + os=-sco5v6
  187 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  188 + ;;
  189 + -sco5)
  190 + os=-sco3.2v5
  191 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  192 + ;;
  193 + -sco4)
  194 + os=-sco3.2v4
  195 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  196 + ;;
  197 + -sco3.2.[4-9]*)
  198 + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  199 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  200 + ;;
  201 + -sco3.2v[4-9]*)
  202 + # Don't forget version if it is 3.2v4 or newer.
  203 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  204 + ;;
  205 + -sco5v6*)
  206 + # Don't forget version if it is 3.2v4 or newer.
  207 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  208 + ;;
  209 + -sco*)
  210 + os=-sco3.2v2
  211 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  212 + ;;
  213 + -udk*)
  214 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  215 + ;;
  216 + -isc)
  217 + os=-isc2.2
  218 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  219 + ;;
  220 + -clix*)
  221 + basic_machine=clipper-intergraph
  222 + ;;
  223 + -isc*)
  224 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  225 + ;;
  226 + -lynx*)
  227 + os=-lynxos
  228 + ;;
  229 + -ptx*)
  230 + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  231 + ;;
  232 + -windowsnt*)
  233 + os=`echo $os | sed -e 's/windowsnt/winnt/'`
  234 + ;;
  235 + -psos*)
  236 + os=-psos
  237 + ;;
  238 + -mint | -mint[0-9]*)
  239 + basic_machine=m68k-atari
  240 + os=-mint
  241 + ;;
  242 +esac
  243 +
  244 +# Decode aliases for certain CPU-COMPANY combinations.
  245 +case $basic_machine in
  246 + # Recognize the basic CPU types without company name.
  247 + # Some are omitted here because they have special meanings below.
  248 + 1750a | 580 \
  249 + | a29k \
  250 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
  251 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
  252 + | am33_2.0 \
  253 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
  254 + | bfin \
  255 + | c4x | clipper \
  256 + | d10v | d30v | dlx | dsp16xx | dvp \
  257 + | fido | fr30 | frv \
  258 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  259 + | i370 | i860 | i960 | ia64 \
  260 + | ip2k | iq2000 \
  261 + | lm32 \
  262 + | m32c | m32r | m32rle | m68000 | m68k | m88k \
  263 + | maxq | mb | microblaze | mcore | mep | metag \
  264 + | mips | mipsbe | mipseb | mipsel | mipsle \
  265 + | mips16 \
  266 + | mips64 | mips64el \
  267 + | mips64octeon | mips64octeonel \
  268 + | mips64orion | mips64orionel \
  269 + | mips64r5900 | mips64r5900el \
  270 + | mips64vr | mips64vrel \
  271 + | mips64vr4100 | mips64vr4100el \
  272 + | mips64vr4300 | mips64vr4300el \
  273 + | mips64vr5000 | mips64vr5000el \
  274 + | mips64vr5900 | mips64vr5900el \
  275 + | mipsisa32 | mipsisa32el \
  276 + | mipsisa32r2 | mipsisa32r2el \
  277 + | mipsisa64 | mipsisa64el \
  278 + | mipsisa64r2 | mipsisa64r2el \
  279 + | mipsisa64sb1 | mipsisa64sb1el \
  280 + | mipsisa64sr71k | mipsisa64sr71kel \
  281 + | mipstx39 | mipstx39el \
  282 + | mn10200 | mn10300 \
  283 + | moxie \
  284 + | mt \
  285 + | msp430 \
  286 + | nds32 | nds32le | nds32be \
  287 + | nios | nios2 \
  288 + | ns16k | ns32k \
  289 + | open8 \
  290 + | or32 \
  291 + | pdp10 | pdp11 | pj | pjl \
  292 + | powerpc | powerpc64 | powerpc64le | powerpcle \
  293 + | pyramid \
  294 + | rx \
  295 + | score \
  296 + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
  297 + | sh64 | sh64le \
  298 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
  299 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
  300 + | spu \
  301 + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
  302 + | ubicom32 \
  303 + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
  304 + | we32k \
  305 + | x86 | xc16x | xstormy16 | xtensa \
  306 + | z8k | z80)
  307 + basic_machine=$basic_machine-unknown
  308 + ;;
  309 + c54x)
  310 + basic_machine=tic54x-unknown
  311 + ;;
  312 + c55x)
  313 + basic_machine=tic55x-unknown
  314 + ;;
  315 + c6x)
  316 + basic_machine=tic6x-unknown
  317 + ;;
  318 + m6811 | m68hc11 | m6812 | m68hc12 | picochip)
  319 + # Motorola 68HC11/12.
  320 + basic_machine=$basic_machine-unknown
  321 + os=-none
  322 + ;;
  323 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
  324 + ;;
  325 + ms1)
  326 + basic_machine=mt-unknown
  327 + ;;
  328 +
  329 + strongarm | thumb | xscale)
  330 + basic_machine=arm-unknown
  331 + ;;
  332 +
  333 + xscaleeb)
  334 + basic_machine=armeb-unknown
  335 + ;;
  336 +
  337 + xscaleel)
  338 + basic_machine=armel-unknown
  339 + ;;
  340 +
  341 + # We use `pc' rather than `unknown'
  342 + # because (1) that's what they normally are, and
  343 + # (2) the word "unknown" tends to confuse beginning users.
  344 + i*86 | x86_64)
  345 + basic_machine=$basic_machine-pc
  346 + ;;
  347 + # Object if more than one company name word.
  348 + *-*-*)
  349 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  350 + exit 1
  351 + ;;
  352 + # Recognize the basic CPU types with company name.
  353 + 580-* \
  354 + | a29k-* \
  355 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
  356 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
  357 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
  358 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
  359 + | avr-* | avr32-* \
  360 + | bfin-* | bs2000-* \
  361 + | c[123]* | c30-* | [cjt]90-* | c4x-* \
  362 + | clipper-* | craynv-* | cydra-* \
  363 + | d10v-* | d30v-* | dlx-* \
  364 + | elxsi-* \
  365 + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
  366 + | h8300-* | h8500-* \
  367 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
  368 + | i*86-* | i860-* | i960-* | ia64-* \
  369 + | ip2k-* | iq2000-* \
  370 + | lm32-* \
  371 + | m32c-* | m32r-* | m32rle-* \
  372 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
  373 + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
  374 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
  375 + | mips16-* \
  376 + | mips64-* | mips64el-* \
  377 + | mips64octeon-* | mips64octeonel-* \
  378 + | mips64orion-* | mips64orionel-* \
  379 + | mips64r5900-* | mips64r5900el-* \
  380 + | mips64vr-* | mips64vrel-* \
  381 + | mips64vr4100-* | mips64vr4100el-* \
  382 + | mips64vr4300-* | mips64vr4300el-* \
  383 + | mips64vr5000-* | mips64vr5000el-* \
  384 + | mips64vr5900-* | mips64vr5900el-* \
  385 + | mipsisa32-* | mipsisa32el-* \
  386 + | mipsisa32r2-* | mipsisa32r2el-* \
  387 + | mipsisa64-* | mipsisa64el-* \
  388 + | mipsisa64r2-* | mipsisa64r2el-* \
  389 + | mipsisa64sb1-* | mipsisa64sb1el-* \
  390 + | mipsisa64sr71k-* | mipsisa64sr71kel-* \
  391 + | mipstx39-* | mipstx39el-* \
  392 + | mmix-* \
  393 + | mt-* \
  394 + | msp430-* \
  395 + | nds32-* | nds32le-* | nds32be-* \
  396 + | nios-* | nios2-* \
  397 + | none-* | np1-* | ns16k-* | ns32k-* \
  398 + | open8-* \
  399 + | orion-* \
  400 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
  401 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
  402 + | pyramid-* \
  403 + | romp-* | rs6000-* | rx-* \
  404 + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
  405 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
  406 + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
  407 + | sparclite-* \
  408 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
  409 + | tahoe-* \
  410 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
  411 + | tile*-* \
  412 + | tron-* \
  413 + | ubicom32-* \
  414 + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
  415 + | vax-* \
  416 + | we32k-* \
  417 + | x86-* | x86_64-* | xc16x-* | xps100-* \
  418 + | xstormy16-* | xtensa*-* \
  419 + | ymp-* \
  420 + | z8k-* | z80-*)
  421 + ;;
  422 + # Recognize the basic CPU types without company name, with glob match.
  423 + xtensa*)
  424 + basic_machine=$basic_machine-unknown
  425 + ;;
  426 + # Recognize the various machine names and aliases which stand
  427 + # for a CPU type and a company and sometimes even an OS.
  428 + 386bsd)
  429 + basic_machine=i386-unknown
  430 + os=-bsd
  431 + ;;
  432 + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  433 + basic_machine=m68000-att
  434 + ;;
  435 + 3b*)
  436 + basic_machine=we32k-att
  437 + ;;
  438 + a29khif)
  439 + basic_machine=a29k-amd
  440 + os=-udi
  441 + ;;
  442 + abacus)
  443 + basic_machine=abacus-unknown
  444 + ;;
  445 + adobe68k)
  446 + basic_machine=m68010-adobe
  447 + os=-scout
  448 + ;;
  449 + alliant | fx80)
  450 + basic_machine=fx80-alliant
  451 + ;;
  452 + altos | altos3068)
  453 + basic_machine=m68k-altos
  454 + ;;
  455 + am29k)
  456 + basic_machine=a29k-none
  457 + os=-bsd
  458 + ;;
  459 + amd64)
  460 + basic_machine=x86_64-pc
  461 + ;;
  462 + amd64-*)
  463 + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
  464 + ;;
  465 + amdahl)
  466 + basic_machine=580-amdahl
  467 + os=-sysv
  468 + ;;
  469 + amiga | amiga-*)
  470 + basic_machine=m68k-unknown
  471 + ;;
  472 + amigaos | amigados)
  473 + basic_machine=m68k-unknown
  474 + os=-amigaos
  475 + ;;
  476 + amigaunix | amix)
  477 + basic_machine=m68k-unknown
  478 + os=-sysv4
  479 + ;;
  480 + apollo68)
  481 + basic_machine=m68k-apollo
  482 + os=-sysv
  483 + ;;
  484 + apollo68bsd)
  485 + basic_machine=m68k-apollo
  486 + os=-bsd
  487 + ;;
  488 + aros)
  489 + basic_machine=i386-pc
  490 + os=-aros
  491 + ;;
  492 + aux)
  493 + basic_machine=m68k-apple
  494 + os=-aux
  495 + ;;
  496 + balance)
  497 + basic_machine=ns32k-sequent
  498 + os=-dynix
  499 + ;;
  500 + blackfin)
  501 + basic_machine=bfin-unknown
  502 + os=-linux
  503 + ;;
  504 + blackfin-*)
  505 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
  506 + os=-linux
  507 + ;;
  508 + bluegene*)
  509 + basic_machine=powerpc-ibm
  510 + os=-cnk
  511 + ;;
  512 + c54x-*)
  513 + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
  514 + ;;
  515 + c55x-*)
  516 + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
  517 + ;;
  518 + c6x-*)
  519 + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
  520 + ;;
  521 + c90)
  522 + basic_machine=c90-cray
  523 + os=-unicos
  524 + ;;
  525 + cegcc)
  526 + basic_machine=arm-unknown
  527 + os=-cegcc
  528 + ;;
  529 + convex-c1)
  530 + basic_machine=c1-convex
  531 + os=-bsd
  532 + ;;
  533 + convex-c2)
  534 + basic_machine=c2-convex
  535 + os=-bsd
  536 + ;;
  537 + convex-c32)
  538 + basic_machine=c32-convex
  539 + os=-bsd
  540 + ;;
  541 + convex-c34)
  542 + basic_machine=c34-convex
  543 + os=-bsd
  544 + ;;
  545 + convex-c38)
  546 + basic_machine=c38-convex
  547 + os=-bsd
  548 + ;;
  549 + cray | j90)
  550 + basic_machine=j90-cray
  551 + os=-unicos
  552 + ;;
  553 + craynv)
  554 + basic_machine=craynv-cray
  555 + os=-unicosmp
  556 + ;;
  557 + cr16 | cr16-*)
  558 + basic_machine=cr16-unknown
  559 + os=-elf
  560 + ;;
  561 + crds | unos)
  562 + basic_machine=m68k-crds
  563 + ;;
  564 + crisv32 | crisv32-* | etraxfs*)
  565 + basic_machine=crisv32-axis
  566 + ;;
  567 + cris | cris-* | etrax*)
  568 + basic_machine=cris-axis
  569 + ;;
  570 + crx)
  571 + basic_machine=crx-unknown
  572 + os=-elf
  573 + ;;
  574 + da30 | da30-*)
  575 + basic_machine=m68k-da30
  576 + ;;
  577 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  578 + basic_machine=mips-dec
  579 + ;;
  580 + decsystem10* | dec10*)
  581 + basic_machine=pdp10-dec
  582 + os=-tops10
  583 + ;;
  584 + decsystem20* | dec20*)
  585 + basic_machine=pdp10-dec
  586 + os=-tops20
  587 + ;;
  588 + delta | 3300 | motorola-3300 | motorola-delta \
  589 + | 3300-motorola | delta-motorola)
  590 + basic_machine=m68k-motorola
  591 + ;;
  592 + delta88)
  593 + basic_machine=m88k-motorola
  594 + os=-sysv3
  595 + ;;
  596 + dicos)
  597 + basic_machine=i686-pc
  598 + os=-dicos
  599 + ;;
  600 + djgpp)
  601 + basic_machine=i586-pc
  602 + os=-msdosdjgpp
  603 + ;;
  604 + dpx20 | dpx20-*)
  605 + basic_machine=rs6000-bull
  606 + os=-bosx
  607 + ;;
  608 + dpx2* | dpx2*-bull)
  609 + basic_machine=m68k-bull
  610 + os=-sysv3
  611 + ;;
  612 + ebmon29k)
  613 + basic_machine=a29k-amd
  614 + os=-ebmon
  615 + ;;
  616 + elxsi)
  617 + basic_machine=elxsi-elxsi
  618 + os=-bsd
  619 + ;;
  620 + encore | umax | mmax)
  621 + basic_machine=ns32k-encore
  622 + ;;
  623 + es1800 | OSE68k | ose68k | ose | OSE)
  624 + basic_machine=m68k-ericsson
  625 + os=-ose
  626 + ;;
  627 + fx2800)
  628 + basic_machine=i860-alliant
  629 + ;;
  630 + genix)
  631 + basic_machine=ns32k-ns
  632 + ;;
  633 + gmicro)
  634 + basic_machine=tron-gmicro
  635 + os=-sysv
  636 + ;;
  637 + go32)
  638 + basic_machine=i386-pc
  639 + os=-go32
  640 + ;;
  641 + h3050r* | hiux*)
  642 + basic_machine=hppa1.1-hitachi
  643 + os=-hiuxwe2
  644 + ;;
  645 + h8300hms)
  646 + basic_machine=h8300-hitachi
  647 + os=-hms
  648 + ;;
  649 + h8300xray)
  650 + basic_machine=h8300-hitachi
  651 + os=-xray
  652 + ;;
  653 + h8500hms)
  654 + basic_machine=h8500-hitachi
  655 + os=-hms
  656 + ;;
  657 + harris)
  658 + basic_machine=m88k-harris
  659 + os=-sysv3
  660 + ;;
  661 + hp300-*)
  662 + basic_machine=m68k-hp
  663 + ;;
  664 + hp300bsd)
  665 + basic_machine=m68k-hp
  666 + os=-bsd
  667 + ;;
  668 + hp300hpux)
  669 + basic_machine=m68k-hp
  670 + os=-hpux
  671 + ;;
  672 + hp3k9[0-9][0-9] | hp9[0-9][0-9])
  673 + basic_machine=hppa1.0-hp
  674 + ;;
  675 + hp9k2[0-9][0-9] | hp9k31[0-9])
  676 + basic_machine=m68000-hp
  677 + ;;
  678 + hp9k3[2-9][0-9])
  679 + basic_machine=m68k-hp
  680 + ;;
  681 + hp9k6[0-9][0-9] | hp6[0-9][0-9])
  682 + basic_machine=hppa1.0-hp
  683 + ;;
  684 + hp9k7[0-79][0-9] | hp7[0-79][0-9])
  685 + basic_machine=hppa1.1-hp
  686 + ;;
  687 + hp9k78[0-9] | hp78[0-9])
  688 + # FIXME: really hppa2.0-hp
  689 + basic_machine=hppa1.1-hp
  690 + ;;
  691 + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  692 + # FIXME: really hppa2.0-hp
  693 + basic_machine=hppa1.1-hp
  694 + ;;
  695 + hp9k8[0-9][13679] | hp8[0-9][13679])
  696 + basic_machine=hppa1.1-hp
  697 + ;;
  698 + hp9k8[0-9][0-9] | hp8[0-9][0-9])
  699 + basic_machine=hppa1.0-hp
  700 + ;;
  701 + hppa-next)
  702 + os=-nextstep3
  703 + ;;
  704 + hppaosf)
  705 + basic_machine=hppa1.1-hp
  706 + os=-osf
  707 + ;;
  708 + hppro)
  709 + basic_machine=hppa1.1-hp
  710 + os=-proelf
  711 + ;;
  712 + i370-ibm* | ibm*)
  713 + basic_machine=i370-ibm
  714 + ;;
  715 +# I'm not sure what "Sysv32" means. Should this be sysv3.2?
  716 + i*86v32)
  717 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  718 + os=-sysv32
  719 + ;;
  720 + i*86v4*)
  721 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  722 + os=-sysv4
  723 + ;;
  724 + i*86v)
  725 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  726 + os=-sysv
  727 + ;;
  728 + i*86sol2)
  729 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  730 + os=-solaris2
  731 + ;;
  732 + i386mach)
  733 + basic_machine=i386-mach
  734 + os=-mach
  735 + ;;
  736 + i386-vsta | vsta)
  737 + basic_machine=i386-unknown
  738 + os=-vsta
  739 + ;;
  740 + iris | iris4d)
  741 + basic_machine=mips-sgi
  742 + case $os in
  743 + -irix*)
  744 + ;;
  745 + *)
  746 + os=-irix4
  747 + ;;
  748 + esac
  749 + ;;
  750 + isi68 | isi)
  751 + basic_machine=m68k-isi
  752 + os=-sysv
  753 + ;;
  754 + m68knommu)
  755 + basic_machine=m68k-unknown
  756 + os=-linux
  757 + ;;
  758 + m68knommu-*)
  759 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
  760 + os=-linux
  761 + ;;
  762 + m88k-omron*)
  763 + basic_machine=m88k-omron
  764 + ;;
  765 + magnum | m3230)
  766 + basic_machine=mips-mips
  767 + os=-sysv
  768 + ;;
  769 + merlin)
  770 + basic_machine=ns32k-utek
  771 + os=-sysv
  772 + ;;
  773 + microblaze)
  774 + basic_machine=microblaze-xilinx
  775 + ;;
  776 + mingw32)
  777 + basic_machine=i386-pc
  778 + os=-mingw32
  779 + ;;
  780 + mingw32ce)
  781 + basic_machine=arm-unknown
  782 + os=-mingw32ce
  783 + ;;
  784 + miniframe)
  785 + basic_machine=m68000-convergent
  786 + ;;
  787 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  788 + basic_machine=m68k-atari
  789 + os=-mint
  790 + ;;
  791 + mipsEE* | ee | ps2)
  792 + basic_machine=mips64r5900el-scei
  793 + case $os in
  794 + -linux*)
  795 + ;;
  796 + *)
  797 + os=-elf
  798 + ;;
  799 + esac
  800 + ;;
  801 + iop)
  802 + basic_machine=mipsel-scei
  803 + os=-irx
  804 + ;;
  805 + dvp)
  806 + basic_machine=dvp-scei
  807 + os=-elf
  808 + ;;
  809 + mips3*-*)
  810 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  811 + ;;
  812 + mips3*)
  813 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  814 + ;;
  815 + monitor)
  816 + basic_machine=m68k-rom68k
  817 + os=-coff
  818 + ;;
  819 + morphos)
  820 + basic_machine=powerpc-unknown
  821 + os=-morphos
  822 + ;;
  823 + msdos)
  824 + basic_machine=i386-pc
  825 + os=-msdos
  826 + ;;
  827 + ms1-*)
  828 + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  829 + ;;
  830 + mvs)
  831 + basic_machine=i370-ibm
  832 + os=-mvs
  833 + ;;
  834 + ncr3000)
  835 + basic_machine=i486-ncr
  836 + os=-sysv4
  837 + ;;
  838 + netbsd386)
  839 + basic_machine=i386-unknown
  840 + os=-netbsd
  841 + ;;
  842 + netwinder)
  843 + basic_machine=armv4l-rebel
  844 + os=-linux
  845 + ;;
  846 + news | news700 | news800 | news900)
  847 + basic_machine=m68k-sony
  848 + os=-newsos
  849 + ;;
  850 + news1000)
  851 + basic_machine=m68030-sony
  852 + os=-newsos
  853 + ;;
  854 + news-3600 | risc-news)
  855 + basic_machine=mips-sony
  856 + os=-newsos
  857 + ;;
  858 + necv70)
  859 + basic_machine=v70-nec
  860 + os=-sysv
  861 + ;;
  862 + next | m*-next )
  863 + basic_machine=m68k-next
  864 + case $os in
  865 + -nextstep* )
  866 + ;;
  867 + -ns2*)
  868 + os=-nextstep2
  869 + ;;
  870 + *)
  871 + os=-nextstep3
  872 + ;;
  873 + esac
  874 + ;;
  875 + nh3000)
  876 + basic_machine=m68k-harris
  877 + os=-cxux
  878 + ;;
  879 + nh[45]000)
  880 + basic_machine=m88k-harris
  881 + os=-cxux
  882 + ;;
  883 + nindy960)
  884 + basic_machine=i960-intel
  885 + os=-nindy
  886 + ;;
  887 + mon960)
  888 + basic_machine=i960-intel
  889 + os=-mon960
  890 + ;;
  891 + nonstopux)
  892 + basic_machine=mips-compaq
  893 + os=-nonstopux
  894 + ;;
  895 + np1)
  896 + basic_machine=np1-gould
  897 + ;;
  898 + neo-tandem)
  899 + basic_machine=neo-tandem
  900 + ;;
  901 + nse-tandem)
  902 + basic_machine=nse-tandem
  903 + ;;
  904 + nsr-tandem)
  905 + basic_machine=nsr-tandem
  906 + ;;
  907 + op50n-* | op60c-*)
  908 + basic_machine=hppa1.1-oki
  909 + os=-proelf
  910 + ;;
  911 + openrisc | openrisc-*)
  912 + basic_machine=or32-unknown
  913 + ;;
  914 + os400)
  915 + basic_machine=powerpc-ibm
  916 + os=-os400
  917 + ;;
  918 + OSE68000 | ose68000)
  919 + basic_machine=m68000-ericsson
  920 + os=-ose
  921 + ;;
  922 + os68k)
  923 + basic_machine=m68k-none
  924 + os=-os68k
  925 + ;;
  926 + pa-hitachi)
  927 + basic_machine=hppa1.1-hitachi
  928 + os=-hiuxwe2
  929 + ;;
  930 + paragon)
  931 + basic_machine=i860-intel
  932 + os=-osf
  933 + ;;
  934 + parisc)
  935 + basic_machine=hppa-unknown
  936 + os=-linux
  937 + ;;
  938 + parisc-*)
  939 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
  940 + os=-linux
  941 + ;;
  942 + pbd)
  943 + basic_machine=sparc-tti
  944 + ;;
  945 + pbb)
  946 + basic_machine=m68k-tti
  947 + ;;
  948 + pc532 | pc532-*)
  949 + basic_machine=ns32k-pc532
  950 + ;;
  951 + pc98)
  952 + basic_machine=i386-pc
  953 + ;;
  954 + pc98-*)
  955 + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  956 + ;;
  957 + pentium | p5 | k5 | k6 | nexgen | viac3)
  958 + basic_machine=i586-pc
  959 + ;;
  960 + pentiumpro | p6 | 6x86 | athlon | athlon_*)
  961 + basic_machine=i686-pc
  962 + ;;
  963 + pentiumii | pentium2 | pentiumiii | pentium3)
  964 + basic_machine=i686-pc
  965 + ;;
  966 + pentium4)
  967 + basic_machine=i786-pc
  968 + ;;
  969 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  970 + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  971 + ;;
  972 + pentiumpro-* | p6-* | 6x86-* | athlon-*)
  973 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  974 + ;;
  975 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  976 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  977 + ;;
  978 + pentium4-*)
  979 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  980 + ;;
  981 + pn)
  982 + basic_machine=pn-gould
  983 + ;;
  984 + power) basic_machine=power-ibm
  985 + ;;
  986 + ppc | ppcbe) basic_machine=powerpc-unknown
  987 + ;;
  988 + ppc-* | ppcbe-*)
  989 + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  990 + ;;
  991 + ppcle | powerpclittle | ppc-le | powerpc-little)
  992 + basic_machine=powerpcle-unknown
  993 + ;;
  994 + ppcle-* | powerpclittle-*)
  995 + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  996 + ;;
  997 + ppc64) basic_machine=powerpc64-unknown
  998 + ;;
  999 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  1000 + ;;
  1001 + ppc64le | powerpc64little | ppc64-le | powerpc64-little)
  1002 + basic_machine=powerpc64le-unknown
  1003 + ;;
  1004 + ppc64le-* | powerpc64little-*)
  1005 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  1006 + ;;
  1007 + ps2)
  1008 + basic_machine=i386-ibm
  1009 + ;;
  1010 + pw32)
  1011 + basic_machine=i586-unknown
  1012 + os=-pw32
  1013 + ;;
  1014 + rdos)
  1015 + basic_machine=i386-pc
  1016 + os=-rdos
  1017 + ;;
  1018 + rom68k)
  1019 + basic_machine=m68k-rom68k
  1020 + os=-coff
  1021 + ;;
  1022 + rm[46]00)
  1023 + basic_machine=mips-siemens
  1024 + ;;
  1025 + rtpc | rtpc-*)
  1026 + basic_machine=romp-ibm
  1027 + ;;
  1028 + s390 | s390-*)
  1029 + basic_machine=s390-ibm
  1030 + ;;
  1031 + s390x | s390x-*)
  1032 + basic_machine=s390x-ibm
  1033 + ;;
  1034 + sa29200)
  1035 + basic_machine=a29k-amd
  1036 + os=-udi
  1037 + ;;
  1038 + sb1)
  1039 + basic_machine=mipsisa64sb1-unknown
  1040 + ;;
  1041 + sb1el)
  1042 + basic_machine=mipsisa64sb1el-unknown
  1043 + ;;
  1044 + sde)
  1045 + basic_machine=mipsisa32-sde
  1046 + os=-elf
  1047 + ;;
  1048 + sei)
  1049 + basic_machine=mips-sei
  1050 + os=-seiux
  1051 + ;;
  1052 + sequent)
  1053 + basic_machine=i386-sequent
  1054 + ;;
  1055 + sh)
  1056 + basic_machine=sh-hitachi
  1057 + os=-hms
  1058 + ;;
  1059 + sh5el)
  1060 + basic_machine=sh5le-unknown
  1061 + ;;
  1062 + sh64)
  1063 + basic_machine=sh64-unknown
  1064 + ;;
  1065 + sparclite-wrs | simso-wrs)
  1066 + basic_machine=sparclite-wrs
  1067 + os=-vxworks
  1068 + ;;
  1069 + sps7)
  1070 + basic_machine=m68k-bull
  1071 + os=-sysv2
  1072 + ;;
  1073 + spur)
  1074 + basic_machine=spur-unknown
  1075 + ;;
  1076 + st2000)
  1077 + basic_machine=m68k-tandem
  1078 + ;;
  1079 + stratus)
  1080 + basic_machine=i860-stratus
  1081 + os=-sysv4
  1082 + ;;
  1083 + strongarm-* | thumb-*)
  1084 + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
  1085 + ;;
  1086 + sun2)
  1087 + basic_machine=m68000-sun
  1088 + ;;
  1089 + sun2os3)
  1090 + basic_machine=m68000-sun
  1091 + os=-sunos3
  1092 + ;;
  1093 + sun2os4)
  1094 + basic_machine=m68000-sun
  1095 + os=-sunos4
  1096 + ;;
  1097 + sun3os3)
  1098 + basic_machine=m68k-sun
  1099 + os=-sunos3
  1100 + ;;
  1101 + sun3os4)
  1102 + basic_machine=m68k-sun
  1103 + os=-sunos4
  1104 + ;;
  1105 + sun4os3)
  1106 + basic_machine=sparc-sun
  1107 + os=-sunos3
  1108 + ;;
  1109 + sun4os4)
  1110 + basic_machine=sparc-sun
  1111 + os=-sunos4
  1112 + ;;
  1113 + sun4sol2)
  1114 + basic_machine=sparc-sun
  1115 + os=-solaris2
  1116 + ;;
  1117 + sun3 | sun3-*)
  1118 + basic_machine=m68k-sun
  1119 + ;;
  1120 + sun4)
  1121 + basic_machine=sparc-sun
  1122 + ;;
  1123 + sun386 | sun386i | roadrunner)
  1124 + basic_machine=i386-sun
  1125 + ;;
  1126 + sv1)
  1127 + basic_machine=sv1-cray
  1128 + os=-unicos
  1129 + ;;
  1130 + symmetry)
  1131 + basic_machine=i386-sequent
  1132 + os=-dynix
  1133 + ;;
  1134 + t3e)
  1135 + basic_machine=alphaev5-cray
  1136 + os=-unicos
  1137 + ;;
  1138 + t90)
  1139 + basic_machine=t90-cray
  1140 + os=-unicos
  1141 + ;;
  1142 + tile*)
  1143 + basic_machine=$basic_machine-unknown
  1144 + os=-linux-gnu
  1145 + ;;
  1146 + tx39)
  1147 + basic_machine=mipstx39-unknown
  1148 + ;;
  1149 + tx39el)
  1150 + basic_machine=mipstx39el-unknown
  1151 + ;;
  1152 + toad1)
  1153 + basic_machine=pdp10-xkl
  1154 + os=-tops20
  1155 + ;;
  1156 + tower | tower-32)
  1157 + basic_machine=m68k-ncr
  1158 + ;;
  1159 + tpf)
  1160 + basic_machine=s390x-ibm
  1161 + os=-tpf
  1162 + ;;
  1163 + udi29k)
  1164 + basic_machine=a29k-amd
  1165 + os=-udi
  1166 + ;;
  1167 + ultra3)
  1168 + basic_machine=a29k-nyu
  1169 + os=-sym1
  1170 + ;;
  1171 + v810 | necv810)
  1172 + basic_machine=v810-nec
  1173 + os=-none
  1174 + ;;
  1175 + vaxv)
  1176 + basic_machine=vax-dec
  1177 + os=-sysv
  1178 + ;;
  1179 + vms)
  1180 + basic_machine=vax-dec
  1181 + os=-vms
  1182 + ;;
  1183 + vpp*|vx|vx-*)
  1184 + basic_machine=f301-fujitsu
  1185 + ;;
  1186 + vxworks960)
  1187 + basic_machine=i960-wrs
  1188 + os=-vxworks
  1189 + ;;
  1190 + vxworks68)
  1191 + basic_machine=m68k-wrs
  1192 + os=-vxworks
  1193 + ;;
  1194 + vxworks29k)
  1195 + basic_machine=a29k-wrs
  1196 + os=-vxworks
  1197 + ;;
  1198 + w65*)
  1199 + basic_machine=w65-wdc
  1200 + os=-none
  1201 + ;;
  1202 + w89k-*)
  1203 + basic_machine=hppa1.1-winbond
  1204 + os=-proelf
  1205 + ;;
  1206 + xbox)
  1207 + basic_machine=i686-pc
  1208 + os=-mingw32
  1209 + ;;
  1210 + xps | xps100)
  1211 + basic_machine=xps100-honeywell
  1212 + ;;
  1213 + xscale-* | xscalee[bl]-*)
  1214 + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
  1215 + ;;
  1216 + ymp)
  1217 + basic_machine=ymp-cray
  1218 + os=-unicos
  1219 + ;;
  1220 + z8k-*-coff)
  1221 + basic_machine=z8k-unknown
  1222 + os=-sim
  1223 + ;;
  1224 + z80-*-coff)
  1225 + basic_machine=z80-unknown
  1226 + os=-sim
  1227 + ;;
  1228 + none)
  1229 + basic_machine=none-none
  1230 + os=-none
  1231 + ;;
  1232 +
  1233 +# Here we handle the default manufacturer of certain CPU types. It is in
  1234 +# some cases the only manufacturer, in others, it is the most popular.
  1235 + w89k)
  1236 + basic_machine=hppa1.1-winbond
  1237 + ;;
  1238 + op50n)
  1239 + basic_machine=hppa1.1-oki
  1240 + ;;
  1241 + op60c)
  1242 + basic_machine=hppa1.1-oki
  1243 + ;;
  1244 + romp)
  1245 + basic_machine=romp-ibm
  1246 + ;;
  1247 + mmix)
  1248 + basic_machine=mmix-knuth
  1249 + ;;
  1250 + rs6000)
  1251 + basic_machine=rs6000-ibm
  1252 + ;;
  1253 + vax)
  1254 + basic_machine=vax-dec
  1255 + ;;
  1256 + pdp10)
  1257 + # there are many clones, so DEC is not a safe bet
  1258 + basic_machine=pdp10-unknown
  1259 + ;;
  1260 + pdp11)
  1261 + basic_machine=pdp11-dec
  1262 + ;;
  1263 + we32k)
  1264 + basic_machine=we32k-att
  1265 + ;;
  1266 + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
  1267 + basic_machine=sh-unknown
  1268 + ;;
  1269 + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
  1270 + basic_machine=sparc-sun
  1271 + ;;
  1272 + cydra)
  1273 + basic_machine=cydra-cydrome
  1274 + ;;
  1275 + orion)
  1276 + basic_machine=orion-highlevel
  1277 + ;;
  1278 + orion105)
  1279 + basic_machine=clipper-highlevel
  1280 + ;;
  1281 + mac | mpw | mac-mpw)
  1282 + basic_machine=m68k-apple
  1283 + ;;
  1284 + pmac | pmac-mpw)
  1285 + basic_machine=powerpc-apple
  1286 + ;;
  1287 + *-unknown)
  1288 + # Make sure to match an already-canonicalized machine name.
  1289 + ;;
  1290 + *)
  1291 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  1292 + exit 1
  1293 + ;;
  1294 +esac
  1295 +
  1296 +# Here we canonicalize certain aliases for manufacturers.
  1297 +case $basic_machine in
  1298 + *-digital*)
  1299 + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  1300 + ;;
  1301 + *-commodore*)
  1302 + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  1303 + ;;
  1304 + *)
  1305 + ;;
  1306 +esac
  1307 +
  1308 +# Decode manufacturer-specific aliases for certain operating systems.
  1309 +
  1310 +if [ x"$os" != x"" ]
  1311 +then
  1312 +case $os in
  1313 + # First match some system type aliases
  1314 + # that might get confused with valid system types.
  1315 + # -solaris* is a basic system type, with this one exception.
  1316 + -auroraux)
  1317 + os=-auroraux
  1318 + ;;
  1319 + -solaris1 | -solaris1.*)
  1320 + os=`echo $os | sed -e 's|solaris1|sunos4|'`
  1321 + ;;
  1322 + -solaris)
  1323 + os=-solaris2
  1324 + ;;
  1325 + -svr4*)
  1326 + os=-sysv4
  1327 + ;;
  1328 + -unixware*)
  1329 + os=-sysv4.2uw
  1330 + ;;
  1331 + -gnu/linux*)
  1332 + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  1333 + ;;
  1334 + # First accept the basic system types.
  1335 + # The portable systems comes first.
  1336 + # Each alternative MUST END IN A *, to match a version number.
  1337 + # -sysv* is not here because it comes later, after sysvr4.
  1338 + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1339 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
  1340 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
  1341 + | -sym* | -kopensolaris* \
  1342 + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1343 + | -aos* | -aros* \
  1344 + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1345 + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1346 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1347 + | -openbsd* | -solidbsd* \
  1348 + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1349 + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1350 + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1351 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1352 + | -chorusos* | -chorusrdb* | -cegcc* \
  1353 + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1354 + | -mingw32* | -linux-gnu* | -linux-android* \
  1355 + | -linux-newlib* | -linux-uclibc* \
  1356 + | -uxpv* | -beos* | -mpeix* | -udk* \
  1357 + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1358 + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1359 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \
  1360 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1361 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1362 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1363 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
  1364 + # Remember, each alternative MUST END IN *, to match a version number.
  1365 + ;;
  1366 + -qnx*)
  1367 + case $basic_machine in
  1368 + x86-* | i*86-*)
  1369 + ;;
  1370 + *)
  1371 + os=-nto$os
  1372 + ;;
  1373 + esac
  1374 + ;;
  1375 + -nto-qnx*)
  1376 + ;;
  1377 + -nto*)
  1378 + os=`echo $os | sed -e 's|nto|nto-qnx|'`
  1379 + ;;
  1380 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1381 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
  1382 + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1383 + ;;
  1384 + -mac*)
  1385 + os=`echo $os | sed -e 's|mac|macos|'`
  1386 + ;;
  1387 + -linux-dietlibc)
  1388 + os=-linux-dietlibc
  1389 + ;;
  1390 + -linux*)
  1391 + os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1392 + ;;
  1393 + -sunos5*)
  1394 + os=`echo $os | sed -e 's|sunos5|solaris2|'`
  1395 + ;;
  1396 + -sunos6*)
  1397 + os=`echo $os | sed -e 's|sunos6|solaris3|'`
  1398 + ;;
  1399 + -opened*)
  1400 + os=-openedition
  1401 + ;;
  1402 + -os400*)
  1403 + os=-os400
  1404 + ;;
  1405 + -wince*)
  1406 + os=-wince
  1407 + ;;
  1408 + -osfrose*)
  1409 + os=-osfrose
  1410 + ;;
  1411 + -osf*)
  1412 + os=-osf
  1413 + ;;
  1414 + -utek*)
  1415 + os=-bsd
  1416 + ;;
  1417 + -dynix*)
  1418 + os=-bsd
  1419 + ;;
  1420 + -acis*)
  1421 + os=-aos
  1422 + ;;
  1423 + -atheos*)
  1424 + os=-atheos
  1425 + ;;
  1426 + -syllable*)
  1427 + os=-syllable
  1428 + ;;
  1429 + -386bsd)
  1430 + os=-bsd
  1431 + ;;
  1432 + -ctix* | -uts*)
  1433 + os=-sysv
  1434 + ;;
  1435 + -nova*)
  1436 + os=-rtmk-nova
  1437 + ;;
  1438 + -ns2 )
  1439 + os=-nextstep2
  1440 + ;;
  1441 + -nsk*)
  1442 + os=-nsk
  1443 + ;;
  1444 + # Preserve the version number of sinix5.
  1445 + -sinix5.*)
  1446 + os=`echo $os | sed -e 's|sinix|sysv|'`
  1447 + ;;
  1448 + -sinix*)
  1449 + os=-sysv4
  1450 + ;;
  1451 + -tpf*)
  1452 + os=-tpf
  1453 + ;;
  1454 + -triton*)
  1455 + os=-sysv3
  1456 + ;;
  1457 + -oss*)
  1458 + os=-sysv3
  1459 + ;;
  1460 + -svr4)
  1461 + os=-sysv4
  1462 + ;;
  1463 + -svr3)
  1464 + os=-sysv3
  1465 + ;;
  1466 + -sysvr4)
  1467 + os=-sysv4
  1468 + ;;
  1469 + # This must come after -sysvr4.
  1470 + -sysv*)
  1471 + ;;
  1472 + -ose*)
  1473 + os=-ose
  1474 + ;;
  1475 + -es1800*)
  1476 + os=-ose
  1477 + ;;
  1478 + -xenix)
  1479 + os=-xenix
  1480 + ;;
  1481 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1482 + os=-mint
  1483 + ;;
  1484 + -aros*)
  1485 + os=-aros
  1486 + ;;
  1487 + -kaos*)
  1488 + os=-kaos
  1489 + ;;
  1490 + -zvmoe)
  1491 + os=-zvmoe
  1492 + ;;
  1493 + -dicos*)
  1494 + os=-dicos
  1495 + ;;
  1496 + -nacl*)
  1497 + ;;
  1498 + -none)
  1499 + ;;
  1500 + *)
  1501 + # Get rid of the `-' at the beginning of $os.
  1502 + os=`echo $os | sed 's/[^-]*-//'`
  1503 + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1504 + exit 1
  1505 + ;;
  1506 +esac
  1507 +else
  1508 +
  1509 +# Here we handle the default operating systems that come with various machines.
  1510 +# The value should be what the vendor currently ships out the door with their
  1511 +# machine or put another way, the most popular os provided with the machine.
  1512 +
  1513 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
  1514 +# "-sun"), then you have to tell the case statement up towards the top
  1515 +# that MANUFACTURER isn't an operating system. Otherwise, code above
  1516 +# will signal an error saying that MANUFACTURER isn't an operating
  1517 +# system, and we'll never get to this point.
  1518 +
  1519 +case $basic_machine in
  1520 + score-*)
  1521 + os=-elf
  1522 + ;;
  1523 + spu-*)
  1524 + os=-elf
  1525 + ;;
  1526 + *-acorn)
  1527 + os=-riscix1.2
  1528 + ;;
  1529 + arm*-rebel)
  1530 + os=-linux
  1531 + ;;
  1532 + arm*-semi)
  1533 + os=-aout
  1534 + ;;
  1535 + c4x-* | tic4x-*)
  1536 + os=-coff
  1537 + ;;
  1538 + tic54x-*)
  1539 + os=-coff
  1540 + ;;
  1541 + tic55x-*)
  1542 + os=-coff
  1543 + ;;
  1544 + tic6x-*)
  1545 + os=-coff
  1546 + ;;
  1547 + # This must come before the *-dec entry.
  1548 + pdp10-*)
  1549 + os=-tops20
  1550 + ;;
  1551 + pdp11-*)
  1552 + os=-none
  1553 + ;;
  1554 + *-dec | vax-*)
  1555 + os=-ultrix4.2
  1556 + ;;
  1557 + m68*-apollo)
  1558 + os=-domain
  1559 + ;;
  1560 + i386-sun)
  1561 + os=-sunos4.0.2
  1562 + ;;
  1563 + m68000-sun)
  1564 + os=-sunos3
  1565 + # This also exists in the configure program, but was not the
  1566 + # default.
  1567 + # os=-sunos4
  1568 + ;;
  1569 + m68*-cisco)
  1570 + os=-aout
  1571 + ;;
  1572 + mep-*)
  1573 + os=-elf
  1574 + ;;
  1575 + mips*-cisco)
  1576 + os=-elf
  1577 + ;;
  1578 + mips*-*)
  1579 + os=-elf
  1580 + ;;
  1581 + or32-*)
  1582 + os=-coff
  1583 + ;;
  1584 + *-tti) # must be before sparc entry or we get the wrong os.
  1585 + os=-sysv3
  1586 + ;;
  1587 + sparc-* | *-sun)
  1588 + os=-sunos4.1.1
  1589 + ;;
  1590 + *-be)
  1591 + os=-beos
  1592 + ;;
  1593 + *-haiku)
  1594 + os=-haiku
  1595 + ;;
  1596 + *-ibm)
  1597 + os=-aix
  1598 + ;;
  1599 + *-knuth)
  1600 + os=-mmixware
  1601 + ;;
  1602 + *-wec)
  1603 + os=-proelf
  1604 + ;;
  1605 + *-winbond)
  1606 + os=-proelf
  1607 + ;;
  1608 + *-oki)
  1609 + os=-proelf
  1610 + ;;
  1611 + *-hp)
  1612 + os=-hpux
  1613 + ;;
  1614 + *-hitachi)
  1615 + os=-hiux
  1616 + ;;
  1617 + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1618 + os=-sysv
  1619 + ;;
  1620 + *-cbm)
  1621 + os=-amigaos
  1622 + ;;
  1623 + *-dg)
  1624 + os=-dgux
  1625 + ;;
  1626 + *-dolphin)
  1627 + os=-sysv3
  1628 + ;;
  1629 + m68k-ccur)
  1630 + os=-rtu
  1631 + ;;
  1632 + m88k-omron*)
  1633 + os=-luna
  1634 + ;;
  1635 + *-next )
  1636 + os=-nextstep
  1637 + ;;
  1638 + *-sequent)
  1639 + os=-ptx
  1640 + ;;
  1641 + *-crds)
  1642 + os=-unos
  1643 + ;;
  1644 + *-ns)
  1645 + os=-genix
  1646 + ;;
  1647 + i370-*)
  1648 + os=-mvs
  1649 + ;;
  1650 + *-next)
  1651 + os=-nextstep3
  1652 + ;;
  1653 + *-gould)
  1654 + os=-sysv
  1655 + ;;
  1656 + *-highlevel)
  1657 + os=-bsd
  1658 + ;;
  1659 + *-encore)
  1660 + os=-bsd
  1661 + ;;
  1662 + *-sgi)
  1663 + os=-irix
  1664 + ;;
  1665 + *-siemens)
  1666 + os=-sysv4
  1667 + ;;
  1668 + *-masscomp)
  1669 + os=-rtu
  1670 + ;;
  1671 + f30[01]-fujitsu | f700-fujitsu)
  1672 + os=-uxpv
  1673 + ;;
  1674 + *-rom68k)
  1675 + os=-coff
  1676 + ;;
  1677 + *-*bug)
  1678 + os=-coff
  1679 + ;;
  1680 + *-apple)
  1681 + os=-macos
  1682 + ;;
  1683 + *-atari*)
  1684 + os=-mint
  1685 + ;;
  1686 + *)
  1687 + os=-none
  1688 + ;;
  1689 +esac
  1690 +fi
  1691 +
  1692 +# Here we handle the case where we know the os, and the CPU type, but not the
  1693 +# manufacturer. We pick the logical manufacturer.
  1694 +vendor=unknown
  1695 +case $basic_machine in
  1696 + *-unknown)
  1697 + case $os in
  1698 + -riscix*)
  1699 + vendor=acorn
  1700 + ;;
  1701 + -sunos*)
  1702 + vendor=sun
  1703 + ;;
  1704 + -cnk*|-aix*)
  1705 + vendor=ibm
  1706 + ;;
  1707 + -beos*)
  1708 + vendor=be
  1709 + ;;
  1710 + -hpux*)
  1711 + vendor=hp
  1712 + ;;
  1713 + -mpeix*)
  1714 + vendor=hp
  1715 + ;;
  1716 + -hiux*)
  1717 + vendor=hitachi
  1718 + ;;
  1719 + -unos*)
  1720 + vendor=crds
  1721 + ;;
  1722 + -dgux*)
  1723 + vendor=dg
  1724 + ;;
  1725 + -luna*)
  1726 + vendor=omron
  1727 + ;;
  1728 + -genix*)
  1729 + vendor=ns
  1730 + ;;
  1731 + -mvs* | -opened*)
  1732 + vendor=ibm
  1733 + ;;
  1734 + -os400*)
  1735 + vendor=ibm
  1736 + ;;
  1737 + -ptx*)
  1738 + vendor=sequent
  1739 + ;;
  1740 + -tpf*)
  1741 + vendor=ibm
  1742 + ;;
  1743 + -vxsim* | -vxworks* | -windiss*)
  1744 + vendor=wrs
  1745 + ;;
  1746 + -aux*)
  1747 + vendor=apple
  1748 + ;;
  1749 + -hms*)
  1750 + vendor=hitachi
  1751 + ;;
  1752 + -mpw* | -macos*)
  1753 + vendor=apple
  1754 + ;;
  1755 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1756 + vendor=atari
  1757 + ;;
  1758 + -vos*)
  1759 + vendor=stratus
  1760 + ;;
  1761 + esac
  1762 + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1763 + ;;
  1764 +esac
  1765 +
  1766 +echo $basic_machine$os
  1767 +exit
  1768 +
  1769 +# Local variables:
  1770 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  1771 +# time-stamp-start: "timestamp='"
  1772 +# time-stamp-format: "%:y-%02m-%02d"
  1773 +# time-stamp-end: "'"
  1774 +# End:
  1 +#!/bin/sh
  2 +# install - install a program, script, or datafile
  3 +
  4 +scriptversion=2009-04-28.21; # UTC
  5 +
  6 +# This originates from X11R5 (mit/util/scripts/install.sh), which was
  7 +# later released in X11R6 (xc/config/util/install.sh) with the
  8 +# following copyright and license.
  9 +#
  10 +# Copyright (C) 1994 X Consortium
  11 +#
  12 +# Permission is hereby granted, free of charge, to any person obtaining a copy
  13 +# of this software and associated documentation files (the "Software"), to
  14 +# deal in the Software without restriction, including without limitation the
  15 +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  16 +# sell copies of the Software, and to permit persons to whom the Software is
  17 +# furnished to do so, subject to the following conditions:
  18 +#
  19 +# The above copyright notice and this permission notice shall be included in
  20 +# all copies or substantial portions of the Software.
  21 +#
  22 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  23 +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  24 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  25 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  26 +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
  27 +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  28 +#
  29 +# Except as contained in this notice, the name of the X Consortium shall not
  30 +# be used in advertising or otherwise to promote the sale, use or other deal-
  31 +# ings in this Software without prior written authorization from the X Consor-
  32 +# tium.
  33 +#
  34 +#
  35 +# FSF changes to this file are in the public domain.
  36 +#
  37 +# Calling this script install-sh is preferred over install.sh, to prevent
  38 +# `make' implicit rules from creating a file called install from it
  39 +# when there is no Makefile.
  40 +#
  41 +# This script is compatible with the BSD install script, but was written
  42 +# from scratch.
  43 +
  44 +nl='
  45 +'
  46 +IFS=" "" $nl"
  47 +
  48 +# set DOITPROG to echo to test this script
  49 +
  50 +# Don't use :- since 4.3BSD and earlier shells don't like it.
  51 +doit=${DOITPROG-}
  52 +if test -z "$doit"; then
  53 + doit_exec=exec
  54 +else
  55 + doit_exec=$doit
  56 +fi
  57 +
  58 +# Put in absolute file names if you don't have them in your path;
  59 +# or use environment vars.
  60 +
  61 +chgrpprog=${CHGRPPROG-chgrp}
  62 +chmodprog=${CHMODPROG-chmod}
  63 +chownprog=${CHOWNPROG-chown}
  64 +cmpprog=${CMPPROG-cmp}
  65 +cpprog=${CPPROG-cp}
  66 +mkdirprog=${MKDIRPROG-mkdir}
  67 +mvprog=${MVPROG-mv}
  68 +rmprog=${RMPROG-rm}
  69 +stripprog=${STRIPPROG-strip}
  70 +
  71 +posix_glob='?'
  72 +initialize_posix_glob='
  73 + test "$posix_glob" != "?" || {
  74 + if (set -f) 2>/dev/null; then
  75 + posix_glob=
  76 + else
  77 + posix_glob=:
  78 + fi
  79 + }
  80 +'
  81 +
  82 +posix_mkdir=
  83 +
  84 +# Desired mode of installed file.
  85 +mode=0755
  86 +
  87 +chgrpcmd=
  88 +chmodcmd=$chmodprog
  89 +chowncmd=
  90 +mvcmd=$mvprog
  91 +rmcmd="$rmprog -f"
  92 +stripcmd=
  93 +
  94 +src=
  95 +dst=
  96 +dir_arg=
  97 +dst_arg=
  98 +
  99 +copy_on_change=false
  100 +no_target_directory=
  101 +
  102 +usage="\
  103 +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
  104 + or: $0 [OPTION]... SRCFILES... DIRECTORY
  105 + or: $0 [OPTION]... -t DIRECTORY SRCFILES...
  106 + or: $0 [OPTION]... -d DIRECTORIES...
  107 +
  108 +In the 1st form, copy SRCFILE to DSTFILE.
  109 +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
  110 +In the 4th, create DIRECTORIES.
  111 +
  112 +Options:
  113 + --help display this help and exit.
  114 + --version display version info and exit.
  115 +
  116 + -c (ignored)
  117 + -C install only if different (preserve the last data modification time)
  118 + -d create directories instead of installing files.
  119 + -g GROUP $chgrpprog installed files to GROUP.
  120 + -m MODE $chmodprog installed files to MODE.
  121 + -o USER $chownprog installed files to USER.
  122 + -s $stripprog installed files.
  123 + -t DIRECTORY install into DIRECTORY.
  124 + -T report an error if DSTFILE is a directory.
  125 +
  126 +Environment variables override the default commands:
  127 + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
  128 + RMPROG STRIPPROG
  129 +"
  130 +
  131 +while test $# -ne 0; do
  132 + case $1 in
  133 + -c) ;;
  134 +
  135 + -C) copy_on_change=true;;
  136 +
  137 + -d) dir_arg=true;;
  138 +
  139 + -g) chgrpcmd="$chgrpprog $2"
  140 + shift;;
  141 +
  142 + --help) echo "$usage"; exit $?;;
  143 +
  144 + -m) mode=$2
  145 + case $mode in
  146 + *' '* | *' '* | *'
  147 +'* | *'*'* | *'?'* | *'['*)
  148 + echo "$0: invalid mode: $mode" >&2
  149 + exit 1;;
  150 + esac
  151 + shift;;
  152 +
  153 + -o) chowncmd="$chownprog $2"
  154 + shift;;
  155 +
  156 + -s) stripcmd=$stripprog;;
  157 +
  158 + -t) dst_arg=$2
  159 + shift;;
  160 +
  161 + -T) no_target_directory=true;;
  162 +
  163 + --version) echo "$0 $scriptversion"; exit $?;;
  164 +
  165 + --) shift
  166 + break;;
  167 +
  168 + -*) echo "$0: invalid option: $1" >&2
  169 + exit 1;;
  170 +
  171 + *) break;;
  172 + esac
  173 + shift
  174 +done
  175 +
  176 +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
  177 + # When -d is used, all remaining arguments are directories to create.
  178 + # When -t is used, the destination is already specified.
  179 + # Otherwise, the last argument is the destination. Remove it from $@.
  180 + for arg
  181 + do
  182 + if test -n "$dst_arg"; then
  183 + # $@ is not empty: it contains at least $arg.
  184 + set fnord "$@" "$dst_arg"
  185 + shift # fnord
  186 + fi
  187 + shift # arg
  188 + dst_arg=$arg
  189 + done
  190 +fi
  191 +
  192 +if test $# -eq 0; then
  193 + if test -z "$dir_arg"; then
  194 + echo "$0: no input file specified." >&2
  195 + exit 1
  196 + fi
  197 + # It's OK to call `install-sh -d' without argument.
  198 + # This can happen when creating conditional directories.
  199 + exit 0
  200 +fi
  201 +
  202 +if test -z "$dir_arg"; then
  203 + trap '(exit $?); exit' 1 2 13 15
  204 +
  205 + # Set umask so as not to create temps with too-generous modes.
  206 + # However, 'strip' requires both read and write access to temps.
  207 + case $mode in
  208 + # Optimize common cases.
  209 + *644) cp_umask=133;;
  210 + *755) cp_umask=22;;
  211 +
  212 + *[0-7])
  213 + if test -z "$stripcmd"; then
  214 + u_plus_rw=
  215 + else
  216 + u_plus_rw='% 200'
  217 + fi
  218 + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
  219 + *)
  220 + if test -z "$stripcmd"; then
  221 + u_plus_rw=
  222 + else
  223 + u_plus_rw=,u+rw
  224 + fi
  225 + cp_umask=$mode$u_plus_rw;;
  226 + esac
  227 +fi
  228 +
  229 +for src
  230 +do
  231 + # Protect names starting with `-'.
  232 + case $src in
  233 + -*) src=./$src;;
  234 + esac
  235 +
  236 + if test -n "$dir_arg"; then
  237 + dst=$src
  238 + dstdir=$dst
  239 + test -d "$dstdir"
  240 + dstdir_status=$?
  241 + else
  242 +
  243 + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
  244 + # might cause directories to be created, which would be especially bad
  245 + # if $src (and thus $dsttmp) contains '*'.
  246 + if test ! -f "$src" && test ! -d "$src"; then
  247 + echo "$0: $src does not exist." >&2
  248 + exit 1
  249 + fi
  250 +
  251 + if test -z "$dst_arg"; then
  252 + echo "$0: no destination specified." >&2
  253 + exit 1
  254 + fi
  255 +
  256 + dst=$dst_arg
  257 + # Protect names starting with `-'.
  258 + case $dst in
  259 + -*) dst=./$dst;;
  260 + esac
  261 +
  262 + # If destination is a directory, append the input filename; won't work
  263 + # if double slashes aren't ignored.
  264 + if test -d "$dst"; then
  265 + if test -n "$no_target_directory"; then
  266 + echo "$0: $dst_arg: Is a directory" >&2
  267 + exit 1
  268 + fi
  269 + dstdir=$dst
  270 + dst=$dstdir/`basename "$src"`
  271 + dstdir_status=0
  272 + else
  273 + # Prefer dirname, but fall back on a substitute if dirname fails.
  274 + dstdir=`
  275 + (dirname "$dst") 2>/dev/null ||
  276 + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
  277 + X"$dst" : 'X\(//\)[^/]' \| \
  278 + X"$dst" : 'X\(//\)$' \| \
  279 + X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
  280 + echo X"$dst" |
  281 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
  282 + s//\1/
  283 + q
  284 + }
  285 + /^X\(\/\/\)[^/].*/{
  286 + s//\1/
  287 + q
  288 + }
  289 + /^X\(\/\/\)$/{
  290 + s//\1/
  291 + q
  292 + }
  293 + /^X\(\/\).*/{
  294 + s//\1/
  295 + q
  296 + }
  297 + s/.*/./; q'
  298 + `
  299 +
  300 + test -d "$dstdir"
  301 + dstdir_status=$?
  302 + fi
  303 + fi
  304 +
  305 + obsolete_mkdir_used=false
  306 +
  307 + if test $dstdir_status != 0; then
  308 + case $posix_mkdir in
  309 + '')
  310 + # Create intermediate dirs using mode 755 as modified by the umask.
  311 + # This is like FreeBSD 'install' as of 1997-10-28.
  312 + umask=`umask`
  313 + case $stripcmd.$umask in
  314 + # Optimize common cases.
  315 + *[2367][2367]) mkdir_umask=$umask;;
  316 + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
  317 +
  318 + *[0-7])
  319 + mkdir_umask=`expr $umask + 22 \
  320 + - $umask % 100 % 40 + $umask % 20 \
  321 + - $umask % 10 % 4 + $umask % 2
  322 + `;;
  323 + *) mkdir_umask=$umask,go-w;;
  324 + esac
  325 +
  326 + # With -d, create the new directory with the user-specified mode.
  327 + # Otherwise, rely on $mkdir_umask.
  328 + if test -n "$dir_arg"; then
  329 + mkdir_mode=-m$mode
  330 + else
  331 + mkdir_mode=
  332 + fi
  333 +
  334 + posix_mkdir=false
  335 + case $umask in
  336 + *[123567][0-7][0-7])
  337 + # POSIX mkdir -p sets u+wx bits regardless of umask, which
  338 + # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
  339 + ;;
  340 + *)
  341 + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
  342 + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
  343 +
  344 + if (umask $mkdir_umask &&
  345 + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
  346 + then
  347 + if test -z "$dir_arg" || {
  348 + # Check for POSIX incompatibilities with -m.
  349 + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
  350 + # other-writeable bit of parent directory when it shouldn't.
  351 + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
  352 + ls_ld_tmpdir=`ls -ld "$tmpdir"`
  353 + case $ls_ld_tmpdir in
  354 + d????-?r-*) different_mode=700;;
  355 + d????-?--*) different_mode=755;;
  356 + *) false;;
  357 + esac &&
  358 + $mkdirprog -m$different_mode -p -- "$tmpdir" && {
  359 + ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
  360 + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
  361 + }
  362 + }
  363 + then posix_mkdir=:
  364 + fi
  365 + rmdir "$tmpdir/d" "$tmpdir"
  366 + else
  367 + # Remove any dirs left behind by ancient mkdir implementations.
  368 + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
  369 + fi
  370 + trap '' 0;;
  371 + esac;;
  372 + esac
  373 +
  374 + if
  375 + $posix_mkdir && (
  376 + umask $mkdir_umask &&
  377 + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
  378 + )
  379 + then :
  380 + else
  381 +
  382 + # The umask is ridiculous, or mkdir does not conform to POSIX,
  383 + # or it failed possibly due to a race condition. Create the
  384 + # directory the slow way, step by step, checking for races as we go.
  385 +
  386 + case $dstdir in
  387 + /*) prefix='/';;
  388 + -*) prefix='./';;
  389 + *) prefix='';;
  390 + esac
  391 +
  392 + eval "$initialize_posix_glob"
  393 +
  394 + oIFS=$IFS
  395 + IFS=/
  396 + $posix_glob set -f
  397 + set fnord $dstdir
  398 + shift
  399 + $posix_glob set +f
  400 + IFS=$oIFS
  401 +
  402 + prefixes=
  403 +
  404 + for d
  405 + do
  406 + test -z "$d" && continue
  407 +
  408 + prefix=$prefix$d
  409 + if test -d "$prefix"; then
  410 + prefixes=
  411 + else
  412 + if $posix_mkdir; then
  413 + (umask=$mkdir_umask &&
  414 + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
  415 + # Don't fail if two instances are running concurrently.
  416 + test -d "$prefix" || exit 1
  417 + else
  418 + case $prefix in
  419 + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
  420 + *) qprefix=$prefix;;
  421 + esac
  422 + prefixes="$prefixes '$qprefix'"
  423 + fi
  424 + fi
  425 + prefix=$prefix/
  426 + done
  427 +
  428 + if test -n "$prefixes"; then
  429 + # Don't fail if two instances are running concurrently.
  430 + (umask $mkdir_umask &&
  431 + eval "\$doit_exec \$mkdirprog $prefixes") ||
  432 + test -d "$dstdir" || exit 1
  433 + obsolete_mkdir_used=true
  434 + fi
  435 + fi
  436 + fi
  437 +
  438 + if test -n "$dir_arg"; then
  439 + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
  440 + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
  441 + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
  442 + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
  443 + else
  444 +
  445 + # Make a couple of temp file names in the proper directory.
  446 + dsttmp=$dstdir/_inst.$$_
  447 + rmtmp=$dstdir/_rm.$$_
  448 +
  449 + # Trap to clean up those temp files at exit.
  450 + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
  451 +
  452 + # Copy the file name to the temp name.
  453 + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
  454 +
  455 + # and set any options; do chmod last to preserve setuid bits.
  456 + #
  457 + # If any of these fail, we abort the whole thing. If we want to
  458 + # ignore errors from any of these, just make sure not to ignore
  459 + # errors from the above "$doit $cpprog $src $dsttmp" command.
  460 + #
  461 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
  462 + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
  463 + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
  464 + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
  465 +
  466 + # If -C, don't bother to copy if it wouldn't change the file.
  467 + if $copy_on_change &&
  468 + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
  469 + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
  470 +
  471 + eval "$initialize_posix_glob" &&
  472 + $posix_glob set -f &&
  473 + set X $old && old=:$2:$4:$5:$6 &&
  474 + set X $new && new=:$2:$4:$5:$6 &&
  475 + $posix_glob set +f &&
  476 +
  477 + test "$old" = "$new" &&
  478 + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
  479 + then
  480 + rm -f "$dsttmp"
  481 + else
  482 + # Rename the file to the real destination.
  483 + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
  484 +
  485 + # The rename failed, perhaps because mv can't rename something else
  486 + # to itself, or perhaps because mv is so ancient that it does not
  487 + # support -f.
  488 + {
  489 + # Now remove or move aside any old file at destination location.
  490 + # We try this two ways since rm can't unlink itself on some
  491 + # systems and the destination file might be busy for other
  492 + # reasons. In this case, the final cleanup might fail but the new
  493 + # file should still install successfully.
  494 + {
  495 + test ! -f "$dst" ||
  496 + $doit $rmcmd -f "$dst" 2>/dev/null ||
  497 + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
  498 + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
  499 + } ||
  500 + { echo "$0: cannot unlink or rename $dst" >&2
  501 + (exit 1); exit 1
  502 + }
  503 + } &&
  504 +
  505 + # Now rename the file to the real destination.
  506 + $doit $mvcmd "$dsttmp" "$dst"
  507 + }
  508 + fi || exit 1
  509 +
  510 + trap '' 0
  511 + fi
  512 +done
  513 +
  514 +# Local variables:
  515 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  516 +# time-stamp-start: "scriptversion="
  517 +# time-stamp-format: "%:y-%02m-%02d.%02H"
  518 +# time-stamp-time-zone: "UTC"
  519 +# time-stamp-end: "; # UTC"
  520 +# End:
  1 +#! /bin/sh
  2 +# Common stub for a few missing GNU programs while installing.
  3 +
  4 +scriptversion=2009-04-28.21; # UTC
  5 +
  6 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
  7 +# 2008, 2009 Free Software Foundation, Inc.
  8 +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
  9 +
  10 +# This program is free software; you can redistribute it and/or modify
  11 +# it under the terms of the GNU General Public License as published by
  12 +# the Free Software Foundation; either version 2, or (at your option)
  13 +# any later version.
  14 +
  15 +# This program is distributed in the hope that it will be useful,
  16 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  17 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18 +# GNU General Public License for more details.
  19 +
  20 +# You should have received a copy of the GNU General Public License
  21 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
  22 +
  23 +# As a special exception to the GNU General Public License, if you
  24 +# distribute this file as part of a program that contains a
  25 +# configuration script generated by Autoconf, you may include it under
  26 +# the same distribution terms that you use for the rest of that program.
  27 +
  28 +if test $# -eq 0; then
  29 + echo 1>&2 "Try \`$0 --help' for more information"
  30 + exit 1
  31 +fi
  32 +
  33 +run=:
  34 +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
  35 +sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
  36 +
  37 +# In the cases where this matters, `missing' is being run in the
  38 +# srcdir already.
  39 +if test -f configure.ac; then
  40 + configure_ac=configure.ac
  41 +else
  42 + configure_ac=configure.in
  43 +fi
  44 +
  45 +msg="missing on your system"
  46 +
  47 +case $1 in
  48 +--run)
  49 + # Try to run requested program, and just exit if it succeeds.
  50 + run=
  51 + shift
  52 + "$@" && exit 0
  53 + # Exit code 63 means version mismatch. This often happens
  54 + # when the user try to use an ancient version of a tool on
  55 + # a file that requires a minimum version. In this case we
  56 + # we should proceed has if the program had been absent, or
  57 + # if --run hadn't been passed.
  58 + if test $? = 63; then
  59 + run=:
  60 + msg="probably too old"
  61 + fi
  62 + ;;
  63 +
  64 + -h|--h|--he|--hel|--help)
  65 + echo "\
  66 +$0 [OPTION]... PROGRAM [ARGUMENT]...
  67 +
  68 +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
  69 +error status if there is no known handling for PROGRAM.
  70 +
  71 +Options:
  72 + -h, --help display this help and exit
  73 + -v, --version output version information and exit
  74 + --run try to run the given command, and emulate it if it fails
  75 +
  76 +Supported PROGRAM values:
  77 + aclocal touch file \`aclocal.m4'
  78 + autoconf touch file \`configure'
  79 + autoheader touch file \`config.h.in'
  80 + autom4te touch the output file, or create a stub one
  81 + automake touch all \`Makefile.in' files
  82 + bison create \`y.tab.[ch]', if possible, from existing .[ch]
  83 + flex create \`lex.yy.c', if possible, from existing .c
  84 + help2man touch the output file
  85 + lex create \`lex.yy.c', if possible, from existing .c
  86 + makeinfo touch the output file
  87 + tar try tar, gnutar, gtar, then tar without non-portable flags
  88 + yacc create \`y.tab.[ch]', if possible, from existing .[ch]
  89 +
  90 +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
  91 +\`g' are ignored when checking the name.
  92 +
  93 +Send bug reports to <bug-automake@gnu.org>."
  94 + exit $?
  95 + ;;
  96 +
  97 + -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
  98 + echo "missing $scriptversion (GNU Automake)"
  99 + exit $?
  100 + ;;
  101 +
  102 + -*)
  103 + echo 1>&2 "$0: Unknown \`$1' option"
  104 + echo 1>&2 "Try \`$0 --help' for more information"
  105 + exit 1
  106 + ;;
  107 +
  108 +esac
  109 +
  110 +# normalize program name to check for.
  111 +program=`echo "$1" | sed '
  112 + s/^gnu-//; t
  113 + s/^gnu//; t
  114 + s/^g//; t'`
  115 +
  116 +# Now exit if we have it, but it failed. Also exit now if we
  117 +# don't have it and --version was passed (most likely to detect
  118 +# the program). This is about non-GNU programs, so use $1 not
  119 +# $program.
  120 +case $1 in
  121 + lex*|yacc*)
  122 + # Not GNU programs, they don't have --version.
  123 + ;;
  124 +
  125 + tar*)
  126 + if test -n "$run"; then
  127 + echo 1>&2 "ERROR: \`tar' requires --run"
  128 + exit 1
  129 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
  130 + exit 1
  131 + fi
  132 + ;;
  133 +
  134 + *)
  135 + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
  136 + # We have it, but it failed.
  137 + exit 1
  138 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
  139 + # Could not run --version or --help. This is probably someone
  140 + # running `$TOOL --version' or `$TOOL --help' to check whether
  141 + # $TOOL exists and not knowing $TOOL uses missing.
  142 + exit 1
  143 + fi
  144 + ;;
  145 +esac
  146 +
  147 +# If it does not exist, or fails to run (possibly an outdated version),
  148 +# try to emulate it.
  149 +case $program in
  150 + aclocal*)
  151 + echo 1>&2 "\
  152 +WARNING: \`$1' is $msg. You should only need it if
  153 + you modified \`acinclude.m4' or \`${configure_ac}'. You might want
  154 + to install the \`Automake' and \`Perl' packages. Grab them from
  155 + any GNU archive site."
  156 + touch aclocal.m4
  157 + ;;
  158 +
  159 + autoconf*)
  160 + echo 1>&2 "\
  161 +WARNING: \`$1' is $msg. You should only need it if
  162 + you modified \`${configure_ac}'. You might want to install the
  163 + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
  164 + archive site."
  165 + touch configure
  166 + ;;
  167 +
  168 + autoheader*)
  169 + echo 1>&2 "\
  170 +WARNING: \`$1' is $msg. You should only need it if
  171 + you modified \`acconfig.h' or \`${configure_ac}'. You might want
  172 + to install the \`Autoconf' and \`GNU m4' packages. Grab them
  173 + from any GNU archive site."
  174 + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
  175 + test -z "$files" && files="config.h"
  176 + touch_files=
  177 + for f in $files; do
  178 + case $f in
  179 + *:*) touch_files="$touch_files "`echo "$f" |
  180 + sed -e 's/^[^:]*://' -e 's/:.*//'`;;
  181 + *) touch_files="$touch_files $f.in";;
  182 + esac
  183 + done
  184 + touch $touch_files
  185 + ;;
  186 +
  187 + automake*)
  188 + echo 1>&2 "\
  189 +WARNING: \`$1' is $msg. You should only need it if
  190 + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
  191 + You might want to install the \`Automake' and \`Perl' packages.
  192 + Grab them from any GNU archive site."
  193 + find . -type f -name Makefile.am -print |
  194 + sed 's/\.am$/.in/' |
  195 + while read f; do touch "$f"; done
  196 + ;;
  197 +
  198 + autom4te*)
  199 + echo 1>&2 "\
  200 +WARNING: \`$1' is needed, but is $msg.
  201 + You might have modified some files without having the
  202 + proper tools for further handling them.
  203 + You can get \`$1' as part of \`Autoconf' from any GNU
  204 + archive site."
  205 +
  206 + file=`echo "$*" | sed -n "$sed_output"`
  207 + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  208 + if test -f "$file"; then
  209 + touch $file
  210 + else
  211 + test -z "$file" || exec >$file
  212 + echo "#! /bin/sh"
  213 + echo "# Created by GNU Automake missing as a replacement of"
  214 + echo "# $ $@"
  215 + echo "exit 0"
  216 + chmod +x $file
  217 + exit 1
  218 + fi
  219 + ;;
  220 +
  221 + bison*|yacc*)
  222 + echo 1>&2 "\
  223 +WARNING: \`$1' $msg. You should only need it if
  224 + you modified a \`.y' file. You may need the \`Bison' package
  225 + in order for those modifications to take effect. You can get
  226 + \`Bison' from any GNU archive site."
  227 + rm -f y.tab.c y.tab.h
  228 + if test $# -ne 1; then
  229 + eval LASTARG="\${$#}"
  230 + case $LASTARG in
  231 + *.y)
  232 + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
  233 + if test -f "$SRCFILE"; then
  234 + cp "$SRCFILE" y.tab.c
  235 + fi
  236 + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
  237 + if test -f "$SRCFILE"; then
  238 + cp "$SRCFILE" y.tab.h
  239 + fi
  240 + ;;
  241 + esac
  242 + fi
  243 + if test ! -f y.tab.h; then
  244 + echo >y.tab.h
  245 + fi
  246 + if test ! -f y.tab.c; then
  247 + echo 'main() { return 0; }' >y.tab.c
  248 + fi
  249 + ;;
  250 +
  251 + lex*|flex*)
  252 + echo 1>&2 "\
  253 +WARNING: \`$1' is $msg. You should only need it if
  254 + you modified a \`.l' file. You may need the \`Flex' package
  255 + in order for those modifications to take effect. You can get
  256 + \`Flex' from any GNU archive site."
  257 + rm -f lex.yy.c
  258 + if test $# -ne 1; then
  259 + eval LASTARG="\${$#}"
  260 + case $LASTARG in
  261 + *.l)
  262 + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
  263 + if test -f "$SRCFILE"; then
  264 + cp "$SRCFILE" lex.yy.c
  265 + fi
  266 + ;;
  267 + esac
  268 + fi
  269 + if test ! -f lex.yy.c; then
  270 + echo 'main() { return 0; }' >lex.yy.c
  271 + fi
  272 + ;;
  273 +
  274 + help2man*)
  275 + echo 1>&2 "\
  276 +WARNING: \`$1' is $msg. You should only need it if
  277 + you modified a dependency of a manual page. You may need the
  278 + \`Help2man' package in order for those modifications to take
  279 + effect. You can get \`Help2man' from any GNU archive site."
  280 +
  281 + file=`echo "$*" | sed -n "$sed_output"`
  282 + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  283 + if test -f "$file"; then
  284 + touch $file
  285 + else
  286 + test -z "$file" || exec >$file
  287 + echo ".ab help2man is required to generate this page"
  288 + exit $?
  289 + fi
  290 + ;;
  291 +
  292 + makeinfo*)
  293 + echo 1>&2 "\
  294 +WARNING: \`$1' is $msg. You should only need it if
  295 + you modified a \`.texi' or \`.texinfo' file, or any other file
  296 + indirectly affecting the aspect of the manual. The spurious
  297 + call might also be the consequence of using a buggy \`make' (AIX,
  298 + DU, IRIX). You might want to install the \`Texinfo' package or
  299 + the \`GNU make' package. Grab either from any GNU archive site."
  300 + # The file to touch is that specified with -o ...
  301 + file=`echo "$*" | sed -n "$sed_output"`
  302 + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
  303 + if test -z "$file"; then
  304 + # ... or it is the one specified with @setfilename ...
  305 + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
  306 + file=`sed -n '
  307 + /^@setfilename/{
  308 + s/.* \([^ ]*\) *$/\1/
  309 + p
  310 + q
  311 + }' $infile`
  312 + # ... or it is derived from the source name (dir/f.texi becomes f.info)
  313 + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
  314 + fi
  315 + # If the file does not exist, the user really needs makeinfo;
  316 + # let's fail without touching anything.
  317 + test -f $file || exit 1
  318 + touch $file
  319 + ;;
  320 +
  321 + tar*)
  322 + shift
  323 +
  324 + # We have already tried tar in the generic part.
  325 + # Look for gnutar/gtar before invocation to avoid ugly error
  326 + # messages.
  327 + if (gnutar --version > /dev/null 2>&1); then
  328 + gnutar "$@" && exit 0
  329 + fi
  330 + if (gtar --version > /dev/null 2>&1); then
  331 + gtar "$@" && exit 0
  332 + fi
  333 + firstarg="$1"
  334 + if shift; then
  335 + case $firstarg in
  336 + *o*)
  337 + firstarg=`echo "$firstarg" | sed s/o//`
  338 + tar "$firstarg" "$@" && exit 0
  339 + ;;
  340 + esac
  341 + case $firstarg in
  342 + *h*)
  343 + firstarg=`echo "$firstarg" | sed s/h//`
  344 + tar "$firstarg" "$@" && exit 0
  345 + ;;
  346 + esac
  347 + fi
  348 +
  349 + echo 1>&2 "\
  350 +WARNING: I can't seem to be able to run \`tar' with the given arguments.
  351 + You may want to install GNU tar or Free paxutils, or check the
  352 + command line arguments."
  353 + exit 1
  354 + ;;
  355 +
  356 + *)
  357 + echo 1>&2 "\
  358 +WARNING: \`$1' is needed, and is $msg.
  359 + You might have modified some files without having the
  360 + proper tools for further handling them. Check the \`README' file,
  361 + it often tells you about the needed prerequisites for installing
  362 + this package. You may also peek at any GNU archive site, in case
  363 + some other package would contain this missing \`$1' program."
  364 + exit 1
  365 + ;;
  366 +esac
  367 +
  368 +exit 0
  369 +
  370 +# Local variables:
  371 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  372 +# time-stamp-start: "scriptversion="
  373 +# time-stamp-format: "%:y-%02m-%02d.%02H"
  374 +# time-stamp-time-zone: "UTC"
  375 +# time-stamp-end: "; # UTC"
  376 +# End:
Please register or login to post a comment