~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2005-06-26 16:46:25 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050626164625-jjcde8hyztx7xq7o
Tags: 1.10-2
* wget-fix_error--save-headers patch from upstream
  (closes: Bug#314728)
* don't pattern-match server redirects patch from upstream
  (closes: Bug#163243)
* correct de.po typos
  (closes: Bug#313883)
* wget-E_html_behind_file_counting fix problem with adding the
  numbers after the html extension
* updated Standards-Version: to 3.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Attempt to guess a canonical system name.
3
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
 
#   2000, 2001, 2002 Free Software Foundation, Inc.
 
4
#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5
5
 
6
 
timestamp='2002-11-30'
 
6
timestamp='2005-02-10'
7
7
 
8
8
# This file is free software; you can redistribute it and/or modify it
9
9
# under the terms of the GNU General Public License as published by
53
53
GNU config.guess ($timestamp)
54
54
 
55
55
Originally written by Per Bothner.
56
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 
56
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
57
57
Free Software Foundation, Inc.
58
58
 
59
59
This is free software; see the source for copying conditions.  There is NO
98
98
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
99
99
# use `HOST_CC' if defined, but it is deprecated.
100
100
 
101
 
# This shell variable is my proudest work .. or something. --bje
 
101
# Portable tmp directory creation inspired by the Autoconf team.
102
102
 
103
 
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
104
 
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
105
 
   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
106
 
dummy=$tmpdir/dummy ;
107
 
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
108
 
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
 
103
set_cc_for_build='
 
104
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 
105
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 
106
: ${TMPDIR=/tmp} ;
 
107
 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 
108
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 
109
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 
110
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
 
111
dummy=$tmp/dummy ;
 
112
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109
113
case $CC_FOR_BUILD,$HOST_CC,$CC in
110
114
 ,,)    echo "int x;" > $dummy.c ;
111
115
        for c in cc gcc c89 c99 ; do
113
117
             CC_FOR_BUILD="$c"; break ;
114
118
          fi ;
115
119
        done ;
116
 
        rm -f $files ;
117
120
        if test x"$CC_FOR_BUILD" = x ; then
118
121
          CC_FOR_BUILD=no_compiler_found ;
119
122
        fi
120
123
        ;;
121
124
 ,,*)   CC_FOR_BUILD=$CC ;;
122
125
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
123
 
esac ;
124
 
unset files'
 
126
esac ;'
125
127
 
126
128
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
127
129
# (ghazi@noc.rutgers.edu 1994-08-24)
195
197
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
196
198
        echo "${machine}-${os}${release}"
197
199
        exit 0 ;;
 
200
    amd64:OpenBSD:*:*)
 
201
        echo x86_64-unknown-openbsd${UNAME_RELEASE}
 
202
        exit 0 ;;
198
203
    amiga:OpenBSD:*:*)
199
204
        echo m68k-unknown-openbsd${UNAME_RELEASE}
200
205
        exit 0 ;;
201
 
    arc:OpenBSD:*:*)
202
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
206
    cats:OpenBSD:*:*)
 
207
        echo arm-unknown-openbsd${UNAME_RELEASE}
203
208
        exit 0 ;;
204
209
    hp300:OpenBSD:*:*)
205
210
        echo m68k-unknown-openbsd${UNAME_RELEASE}
206
211
        exit 0 ;;
 
212
    luna88k:OpenBSD:*:*)
 
213
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
214
        exit 0 ;;
207
215
    mac68k:OpenBSD:*:*)
208
216
        echo m68k-unknown-openbsd${UNAME_RELEASE}
209
217
        exit 0 ;;
219
227
    mvmeppc:OpenBSD:*:*)
220
228
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
221
229
        exit 0 ;;
222
 
    pmax:OpenBSD:*:*)
223
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
224
 
        exit 0 ;;
225
230
    sgi:OpenBSD:*:*)
226
 
        echo mipseb-unknown-openbsd${UNAME_RELEASE}
 
231
        echo mips64-unknown-openbsd${UNAME_RELEASE}
227
232
        exit 0 ;;
228
233
    sun3:OpenBSD:*:*)
229
234
        echo m68k-unknown-openbsd${UNAME_RELEASE}
230
235
        exit 0 ;;
231
 
    wgrisc:OpenBSD:*:*)
232
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
233
 
        exit 0 ;;
234
236
    *:OpenBSD:*:*)
235
237
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
236
238
        exit 0 ;;
 
239
    *:ekkoBSD:*:*)
 
240
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 
241
        exit 0 ;;
 
242
    macppc:MirBSD:*:*)
 
243
        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
 
244
        exit 0 ;;
 
245
    *:MirBSD:*:*)
 
246
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 
247
        exit 0 ;;
237
248
    alpha:OSF1:*:*)
238
 
        if test $UNAME_RELEASE = "V4.0"; then
 
249
        case $UNAME_RELEASE in
 
250
        *4.0)
239
251
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
240
 
        fi
 
252
                ;;
 
253
        *5.*)
 
254
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 
255
                ;;
 
256
        esac
 
257
        # According to Compaq, /usr/sbin/psrinfo has been available on
 
258
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
 
259
        # covers most systems running today.  This code pipes the CPU
 
260
        # types through head -n 1, so we only detect the type of CPU 0.
 
261
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 
262
        case "$ALPHA_CPU_TYPE" in
 
263
            "EV4 (21064)")
 
264
                UNAME_MACHINE="alpha" ;;
 
265
            "EV4.5 (21064)")
 
266
                UNAME_MACHINE="alpha" ;;
 
267
            "LCA4 (21066/21068)")
 
268
                UNAME_MACHINE="alpha" ;;
 
269
            "EV5 (21164)")
 
270
                UNAME_MACHINE="alphaev5" ;;
 
271
            "EV5.6 (21164A)")
 
272
                UNAME_MACHINE="alphaev56" ;;
 
273
            "EV5.6 (21164PC)")
 
274
                UNAME_MACHINE="alphapca56" ;;
 
275
            "EV5.7 (21164PC)")
 
276
                UNAME_MACHINE="alphapca57" ;;
 
277
            "EV6 (21264)")
 
278
                UNAME_MACHINE="alphaev6" ;;
 
279
            "EV6.7 (21264A)")
 
280
                UNAME_MACHINE="alphaev67" ;;
 
281
            "EV6.8CB (21264C)")
 
282
                UNAME_MACHINE="alphaev68" ;;
 
283
            "EV6.8AL (21264B)")
 
284
                UNAME_MACHINE="alphaev68" ;;
 
285
            "EV6.8CX (21264D)")
 
286
                UNAME_MACHINE="alphaev68" ;;
 
287
            "EV6.9A (21264/EV69A)")
 
288
                UNAME_MACHINE="alphaev69" ;;
 
289
            "EV7 (21364)")
 
290
                UNAME_MACHINE="alphaev7" ;;
 
291
            "EV7.9 (21364A)")
 
292
                UNAME_MACHINE="alphaev79" ;;
 
293
        esac
 
294
        # A Pn.n version is a patched version.
241
295
        # A Vn.n version is a released version.
242
296
        # A Tn.n version is a released field test version.
243
297
        # A Xn.n version is an unreleased experimental baselevel.
244
298
        # 1.2 uses "1.2" for uname -r.
245
 
        eval $set_cc_for_build
246
 
        cat <<EOF >$dummy.s
247
 
        .data
248
 
\$Lformat:
249
 
        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
250
 
 
251
 
        .text
252
 
        .globl main
253
 
        .align 4
254
 
        .ent main
255
 
main:
256
 
        .frame \$30,16,\$26,0
257
 
        ldgp \$29,0(\$27)
258
 
        .prologue 1
259
 
        .long 0x47e03d80 # implver \$0
260
 
        lda \$2,-1
261
 
        .long 0x47e20c21 # amask \$2,\$1
262
 
        lda \$16,\$Lformat
263
 
        mov \$0,\$17
264
 
        not \$1,\$18
265
 
        jsr \$26,printf
266
 
        ldgp \$29,0(\$26)
267
 
        mov 0,\$16
268
 
        jsr \$26,exit
269
 
        .end main
270
 
EOF
271
 
        $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
272
 
        if test "$?" = 0 ; then
273
 
                case `$dummy` in
274
 
                        0-0)
275
 
                                UNAME_MACHINE="alpha"
276
 
                                ;;
277
 
                        1-0)
278
 
                                UNAME_MACHINE="alphaev5"
279
 
                                ;;
280
 
                        1-1)
281
 
                                UNAME_MACHINE="alphaev56"
282
 
                                ;;
283
 
                        1-101)
284
 
                                UNAME_MACHINE="alphapca56"
285
 
                                ;;
286
 
                        2-303)
287
 
                                UNAME_MACHINE="alphaev6"
288
 
                                ;;
289
 
                        2-307)
290
 
                                UNAME_MACHINE="alphaev67"
291
 
                                ;;
292
 
                        2-1307)
293
 
                                UNAME_MACHINE="alphaev68"
294
 
                                ;;
295
 
                        3-1307)
296
 
                                UNAME_MACHINE="alphaev7"
297
 
                                ;;
298
 
                esac
299
 
        fi
300
 
        rm -f $dummy.s $dummy && rmdir $tmpdir
301
 
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 
299
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
302
300
        exit 0 ;;
303
301
    Alpha\ *:Windows_NT*:*)
304
302
        # How do we know it's Interix rather than the generic POSIX subsystem?
321
319
    *:OS/390:*:*)
322
320
        echo i370-ibm-openedition
323
321
        exit 0 ;;
 
322
    *:z/VM:*:*)
 
323
        echo s390-ibm-zvmoe
 
324
        exit 0 ;;
 
325
    *:OS400:*:*)
 
326
        echo powerpc-ibm-os400
 
327
        exit 0 ;;
324
328
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
325
329
        echo arm-acorn-riscix${UNAME_RELEASE}
326
330
        exit 0;;
338
342
    NILE*:*:*:dcosx)
339
343
        echo pyramid-pyramid-svr4
340
344
        exit 0 ;;
341
 
    DRS?6000:UNIX_SV:4.2*:7*)
 
345
    DRS?6000:unix:4.0:6*)
 
346
        echo sparc-icl-nx6
 
347
        exit 0 ;;
 
348
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
342
349
        case `/usr/bin/uname -p` in
343
350
            sparc) echo sparc-icl-nx7 && exit 0 ;;
344
351
        esac ;;
410
417
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
411
418
        echo m68k-unknown-mint${UNAME_RELEASE}
412
419
        exit 0 ;;
 
420
    m68k:machten:*:*)
 
421
        echo m68k-apple-machten${UNAME_RELEASE}
 
422
        exit 0 ;;
413
423
    powerpc:machten:*:*)
414
424
        echo powerpc-apple-machten${UNAME_RELEASE}
415
425
        exit 0 ;;
450
460
EOF
451
461
        $CC_FOR_BUILD -o $dummy $dummy.c \
452
462
          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
453
 
          && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
454
 
        rm -f $dummy.c $dummy && rmdir $tmpdir
 
463
          && exit 0
455
464
        echo mips-mips-riscos${UNAME_RELEASE}
456
465
        exit 0 ;;
457
466
    Motorola:PowerMAX_OS:*:*)
535
544
                        exit(0);
536
545
                        }
537
546
EOF
538
 
                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
539
 
                rm -f $dummy.c $dummy && rmdir $tmpdir
 
547
                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
540
548
                echo rs6000-ibm-aix3.2.5
541
549
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
542
550
                echo rs6000-ibm-aix3.2.4
635
643
              }
636
644
EOF
637
645
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
638
 
                    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
639
 
                    rm -f $dummy.c $dummy && rmdir $tmpdir
 
646
                    test -z "$HP_ARCH" && HP_ARCH=hppa
640
647
                fi ;;
641
648
        esac
 
649
        if [ ${HP_ARCH} = "hppa2.0w" ]
 
650
        then
 
651
            # avoid double evaluation of $set_cc_for_build
 
652
            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
 
653
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
 
654
            then
 
655
                HP_ARCH="hppa2.0w"
 
656
            else
 
657
                HP_ARCH="hppa64"
 
658
            fi
 
659
        fi
642
660
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
643
661
        exit 0 ;;
644
662
    ia64:HP-UX:*:*)
672
690
          exit (0);
673
691
        }
674
692
EOF
675
 
        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
676
 
        rm -f $dummy.c $dummy && rmdir $tmpdir
 
693
        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
677
694
        echo unknown-hitachi-hiuxwe2
678
695
        exit 0 ;;
679
696
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
731
748
    CRAY*TS:*:*:*)
732
749
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
733
750
        exit 0 ;;
734
 
    CRAY*T3D:*:*:*)
735
 
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
736
 
        exit 0 ;;
737
751
    CRAY*T3E:*:*:*)
738
752
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
739
753
        exit 0 ;;
740
754
    CRAY*SV1:*:*:*)
741
755
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
742
756
        exit 0 ;;
 
757
    *:UNICOS/mp:*:*)
 
758
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
759
        exit 0 ;;
743
760
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
744
761
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
745
762
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
746
763
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
747
764
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
748
765
        exit 0 ;;
 
766
    5000:UNIX_System_V:4.*:*)
 
767
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 
768
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
 
769
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 
770
        exit 0 ;;
749
771
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
750
772
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
751
773
        exit 0 ;;
756
778
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
757
779
        exit 0 ;;
758
780
    *:FreeBSD:*:*)
759
 
        # Determine whether the default compiler uses glibc.
760
 
        eval $set_cc_for_build
761
 
        sed 's/^        //' << EOF >$dummy.c
762
 
        #include <features.h>
763
 
        #if __GLIBC__ >= 2
764
 
        LIBC=gnu
765
 
        #else
766
 
        LIBC=
767
 
        #endif
768
 
EOF
769
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
770
 
        rm -f $dummy.c && rmdir $tmpdir
771
 
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
 
781
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
772
782
        exit 0 ;;
773
783
    i*:CYGWIN*:*)
774
784
        echo ${UNAME_MACHINE}-pc-cygwin
779
789
    i*:PW*:*)
780
790
        echo ${UNAME_MACHINE}-pc-pw32
781
791
        exit 0 ;;
782
 
    x86:Interix*:3*)
783
 
        echo i586-pc-interix3
 
792
    x86:Interix*:[34]*)
 
793
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
784
794
        exit 0 ;;
785
795
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
786
796
        echo i${UNAME_MACHINE}-pc-mks
794
804
    i*:UWIN*:*)
795
805
        echo ${UNAME_MACHINE}-pc-uwin
796
806
        exit 0 ;;
 
807
    amd64:CYGWIN*:*:*)
 
808
        echo x86_64-unknown-cygwin
 
809
        exit 0 ;;
797
810
    p*:CYGWIN*:*)
798
811
        echo powerpcle-unknown-cygwin
799
812
        exit 0 ;;
801
814
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
802
815
        exit 0 ;;
803
816
    *:GNU:*:*)
 
817
        # the GNU system
804
818
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
805
819
        exit 0 ;;
 
820
    *:GNU/*:*:*)
 
821
        # other systems with GNU libc and userland
 
822
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 
823
        exit 0 ;;
806
824
    i*86:Minix:*:*)
807
825
        echo ${UNAME_MACHINE}-pc-minix
808
826
        exit 0 ;;
809
827
    arm*:Linux:*:*)
810
828
        echo ${UNAME_MACHINE}-unknown-linux-gnu
811
829
        exit 0 ;;
 
830
    cris:Linux:*:*)
 
831
        echo cris-axis-linux-gnu
 
832
        exit 0 ;;
 
833
    crisv32:Linux:*:*)
 
834
        echo crisv32-axis-linux-gnu
 
835
        exit 0 ;;
 
836
    frv:Linux:*:*)
 
837
        echo frv-unknown-linux-gnu
 
838
        exit 0 ;;
812
839
    ia64:Linux:*:*)
813
840
        echo ${UNAME_MACHINE}-unknown-linux-gnu
814
841
        exit 0 ;;
 
842
    m32r*:Linux:*:*)
 
843
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
844
        exit 0 ;;
815
845
    m68*:Linux:*:*)
816
846
        echo ${UNAME_MACHINE}-unknown-linux-gnu
817
847
        exit 0 ;;
832
862
        #endif
833
863
EOF
834
864
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
835
 
        rm -f $dummy.c && rmdir $tmpdir
836
865
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
837
866
        ;;
838
867
    mips64:Linux:*:*)
852
881
        #endif
853
882
EOF
854
883
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
855
 
        rm -f $dummy.c && rmdir $tmpdir
856
884
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
857
885
        ;;
858
886
    ppc:Linux:*:*)
889
917
    s390:Linux:*:* | s390x:Linux:*:*)
890
918
        echo ${UNAME_MACHINE}-ibm-linux
891
919
        exit 0 ;;
 
920
    sh64*:Linux:*:*)
 
921
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
922
        exit 0 ;;
892
923
    sh*:Linux:*:*)
893
924
        echo ${UNAME_MACHINE}-unknown-linux-gnu
894
925
        exit 0 ;;
946
977
        LIBC=gnuaout
947
978
        #endif
948
979
        #endif
 
980
        #ifdef __dietlibc__
 
981
        LIBC=dietlibc
 
982
        #endif
949
983
EOF
950
984
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
951
 
        rm -f $dummy.c && rmdir $tmpdir
952
985
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
953
986
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
954
987
        ;;
977
1010
    i*86:atheos:*:*)
978
1011
        echo ${UNAME_MACHINE}-unknown-atheos
979
1012
        exit 0 ;;
 
1013
        i*86:syllable:*:*)
 
1014
        echo ${UNAME_MACHINE}-pc-syllable
 
1015
        exit 0 ;;
980
1016
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
981
1017
        echo i386-unknown-lynxos${UNAME_RELEASE}
982
1018
        exit 0 ;;
1046
1082
    M680?0:D-NIX:5.3:*)
1047
1083
        echo m68k-diab-dnix
1048
1084
        exit 0 ;;
1049
 
    M68*:*:R3V[567]*:*)
 
1085
    M68*:*:R3V[5678]*:*)
1050
1086
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1051
 
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
 
1087
    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)
1052
1088
        OS_REL=''
1053
1089
        test -r /etc/.relid \
1054
1090
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1146
1182
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1147
1183
        exit 0 ;;
1148
1184
    *:Darwin:*:*)
1149
 
        echo `uname -p`-apple-darwin${UNAME_RELEASE}
 
1185
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 
1186
        case $UNAME_PROCESSOR in
 
1187
            *86) UNAME_PROCESSOR=i686 ;;
 
1188
            unknown) UNAME_PROCESSOR=powerpc ;;
 
1189
        esac
 
1190
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1150
1191
        exit 0 ;;
1151
1192
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1152
1193
        UNAME_PROCESSOR=`uname -p`
1159
1200
    *:QNX:*:4*)
1160
1201
        echo i386-pc-qnx
1161
1202
        exit 0 ;;
1162
 
    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
 
1203
    NSE-?:NONSTOP_KERNEL:*:*)
 
1204
        echo nse-tandem-nsk${UNAME_RELEASE}
 
1205
        exit 0 ;;
 
1206
    NSR-?:NONSTOP_KERNEL:*:*)
1163
1207
        echo nsr-tandem-nsk${UNAME_RELEASE}
1164
1208
        exit 0 ;;
1165
1209
    *:NonStop-UX:*:*)
1200
1244
    *:ITS:*:*)
1201
1245
        echo pdp10-unknown-its
1202
1246
        exit 0 ;;
 
1247
    SEI:*:*:SEIUX)
 
1248
        echo mips-sei-seiux${UNAME_RELEASE}
 
1249
        exit 0 ;;
 
1250
    *:DragonFly:*:*)
 
1251
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
1252
        exit 0 ;;
 
1253
    *:*VMS:*:*)
 
1254
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
 
1255
        case "${UNAME_MACHINE}" in
 
1256
            A*) echo alpha-dec-vms && exit 0 ;;
 
1257
            I*) echo ia64-dec-vms && exit 0 ;;
 
1258
            V*) echo vax-dec-vms && exit 0 ;;
 
1259
        esac ;;
 
1260
    *:XENIX:*:SysV)
 
1261
        echo i386-pc-xenix
 
1262
        exit 0 ;;
1203
1263
esac
1204
1264
 
1205
1265
#echo '(No uname command or uname output not recognized.)' 1>&2
1320
1380
}
1321
1381
EOF
1322
1382
 
1323
 
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
1324
 
rm -f $dummy.c $dummy && rmdir $tmpdir
 
1383
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1325
1384
 
1326
1385
# Apollos put the system type in the environment.
1327
1386