~ubuntu-branches/ubuntu/trusty/dhcpcd/trusty-security

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Simon Kelley
  • Date: 2005-09-30 02:21:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050930022151-vq3xlcazj0bdpyf4
Tags: 1:2.0.0-2
Clear out /etc/dhcpc/resolv.conf and /var/lib/dhcpc/* 
during purge. (closes: #330515)

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-05-29'
 
6
timestamp='2005-03-24'
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
88
88
  exit 1
89
89
fi
90
90
 
91
 
 
92
 
dummy=dummy-$$
93
 
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
94
 
 
95
 
# CC_FOR_BUILD -- compiler used by this script.
 
91
trap 'exit 1' 1 2 15
 
92
 
 
93
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 
94
# compiler to aid in system detection is discouraged as it requires
 
95
# temporary files to be created and, as you can see below, it is a
 
96
# headache to deal with in a portable fashion.
 
97
 
96
98
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
97
99
# use `HOST_CC' if defined, but it is deprecated.
98
100
 
99
 
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
100
 
 ,,)    echo "int dummy(){}" > $dummy.c ;
 
101
# Portable tmp directory creation inspired by the Autoconf team.
 
102
 
 
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" ;
 
113
case $CC_FOR_BUILD,$HOST_CC,$CC in
 
114
 ,,)    echo "int x;" > $dummy.c ;
101
115
        for c in cc gcc c89 c99 ; do
102
 
          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
103
 
          if test $? = 0 ; then
 
116
          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
104
117
             CC_FOR_BUILD="$c"; break ;
105
118
          fi ;
106
119
        done ;
107
 
        rm -f $dummy.c $dummy.o $dummy.rel ;
108
120
        if test x"$CC_FOR_BUILD" = x ; then
109
121
          CC_FOR_BUILD=no_compiler_found ;
110
122
        fi
111
123
        ;;
112
124
 ,,*)   CC_FOR_BUILD=$CC ;;
113
125
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
114
 
esac'
 
126
esac ;'
115
127
 
116
128
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
117
129
# (ghazi@noc.rutgers.edu 1994-08-24)
124
136
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
125
137
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
126
138
 
 
139
if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
 
140
        eval $set_cc_for_build
 
141
        cat << EOF > $dummy.c
 
142
        #include <features.h>
 
143
        #ifdef __UCLIBC__
 
144
        # ifdef __UCLIBC_CONFIG_VERSION__
 
145
        LIBC=uclibc __UCLIBC_CONFIG_VERSION__
 
146
        # else
 
147
        LIBC=uclibc
 
148
        # endif
 
149
        #else
 
150
        LIBC=gnu
 
151
        #endif
 
152
EOF
 
153
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
 
154
fi
 
155
 
127
156
# Note: order is significant - the case branches are not exclusive.
128
157
 
129
158
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
168
197
                ;;
169
198
        esac
170
199
        # The OS release
171
 
        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
200
        # Debian GNU/NetBSD machines have a different userland, and
 
201
        # thus, need a distinct triplet. However, they do not need
 
202
        # kernel version information, so it can be replaced with a
 
203
        # suitable tag, in the style of linux-gnu.
 
204
        case "${UNAME_VERSION}" in
 
205
            Debian*)
 
206
                release='-gnu'
 
207
                ;;
 
208
            *)
 
209
                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
210
                ;;
 
211
        esac
172
212
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
173
213
        # contains redundant information, the shorter form:
174
214
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
175
215
        echo "${machine}-${os}${release}"
176
216
        exit 0 ;;
 
217
    amd64:OpenBSD:*:*)
 
218
        echo x86_64-unknown-openbsd${UNAME_RELEASE}
 
219
        exit 0 ;;
177
220
    amiga:OpenBSD:*:*)
178
221
        echo m68k-unknown-openbsd${UNAME_RELEASE}
179
222
        exit 0 ;;
180
 
    arc:OpenBSD:*:*)
181
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
223
    cats:OpenBSD:*:*)
 
224
        echo arm-unknown-openbsd${UNAME_RELEASE}
182
225
        exit 0 ;;
183
226
    hp300:OpenBSD:*:*)
184
227
        echo m68k-unknown-openbsd${UNAME_RELEASE}
185
228
        exit 0 ;;
 
229
    luna88k:OpenBSD:*:*)
 
230
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
231
        exit 0 ;;
186
232
    mac68k:OpenBSD:*:*)
187
233
        echo m68k-unknown-openbsd${UNAME_RELEASE}
188
234
        exit 0 ;;
198
244
    mvmeppc:OpenBSD:*:*)
199
245
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
200
246
        exit 0 ;;
201
 
    pmax:OpenBSD:*:*)
202
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
203
 
        exit 0 ;;
204
247
    sgi:OpenBSD:*:*)
205
 
        echo mipseb-unknown-openbsd${UNAME_RELEASE}
 
248
        echo mips64-unknown-openbsd${UNAME_RELEASE}
206
249
        exit 0 ;;
207
250
    sun3:OpenBSD:*:*)
208
251
        echo m68k-unknown-openbsd${UNAME_RELEASE}
209
252
        exit 0 ;;
210
 
    wgrisc:OpenBSD:*:*)
211
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
212
 
        exit 0 ;;
213
253
    *:OpenBSD:*:*)
214
254
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
215
255
        exit 0 ;;
 
256
    *:ekkoBSD:*:*)
 
257
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 
258
        exit 0 ;;
 
259
    macppc:MirBSD:*:*)
 
260
        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
 
261
        exit 0 ;;
 
262
    *:MirBSD:*:*)
 
263
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 
264
        exit 0 ;;
216
265
    alpha:OSF1:*:*)
217
 
        if test $UNAME_RELEASE = "V4.0"; then
 
266
        case $UNAME_RELEASE in
 
267
        *4.0)
218
268
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
219
 
        fi
 
269
                ;;
 
270
        *5.*)
 
271
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 
272
                ;;
 
273
        esac
 
274
        # According to Compaq, /usr/sbin/psrinfo has been available on
 
275
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
 
276
        # covers most systems running today.  This code pipes the CPU
 
277
        # types through head -n 1, so we only detect the type of CPU 0.
 
278
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 
279
        case "$ALPHA_CPU_TYPE" in
 
280
            "EV4 (21064)")
 
281
                UNAME_MACHINE="alpha" ;;
 
282
            "EV4.5 (21064)")
 
283
                UNAME_MACHINE="alpha" ;;
 
284
            "LCA4 (21066/21068)")
 
285
                UNAME_MACHINE="alpha" ;;
 
286
            "EV5 (21164)")
 
287
                UNAME_MACHINE="alphaev5" ;;
 
288
            "EV5.6 (21164A)")
 
289
                UNAME_MACHINE="alphaev56" ;;
 
290
            "EV5.6 (21164PC)")
 
291
                UNAME_MACHINE="alphapca56" ;;
 
292
            "EV5.7 (21164PC)")
 
293
                UNAME_MACHINE="alphapca57" ;;
 
294
            "EV6 (21264)")
 
295
                UNAME_MACHINE="alphaev6" ;;
 
296
            "EV6.7 (21264A)")
 
297
                UNAME_MACHINE="alphaev67" ;;
 
298
            "EV6.8CB (21264C)")
 
299
                UNAME_MACHINE="alphaev68" ;;
 
300
            "EV6.8AL (21264B)")
 
301
                UNAME_MACHINE="alphaev68" ;;
 
302
            "EV6.8CX (21264D)")
 
303
                UNAME_MACHINE="alphaev68" ;;
 
304
            "EV6.9A (21264/EV69A)")
 
305
                UNAME_MACHINE="alphaev69" ;;
 
306
            "EV7 (21364)")
 
307
                UNAME_MACHINE="alphaev7" ;;
 
308
            "EV7.9 (21364A)")
 
309
                UNAME_MACHINE="alphaev79" ;;
 
310
        esac
 
311
        # A Pn.n version is a patched version.
220
312
        # A Vn.n version is a released version.
221
313
        # A Tn.n version is a released field test version.
222
314
        # A Xn.n version is an unreleased experimental baselevel.
223
315
        # 1.2 uses "1.2" for uname -r.
224
 
        cat <<EOF >$dummy.s
225
 
        .data
226
 
\$Lformat:
227
 
        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
228
 
 
229
 
        .text
230
 
        .globl main
231
 
        .align 4
232
 
        .ent main
233
 
main:
234
 
        .frame \$30,16,\$26,0
235
 
        ldgp \$29,0(\$27)
236
 
        .prologue 1
237
 
        .long 0x47e03d80 # implver \$0
238
 
        lda \$2,-1
239
 
        .long 0x47e20c21 # amask \$2,\$1
240
 
        lda \$16,\$Lformat
241
 
        mov \$0,\$17
242
 
        not \$1,\$18
243
 
        jsr \$26,printf
244
 
        ldgp \$29,0(\$26)
245
 
        mov 0,\$16
246
 
        jsr \$26,exit
247
 
        .end main
248
 
EOF
249
 
        eval $set_cc_for_build
250
 
        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
251
 
        if test "$?" = 0 ; then
252
 
                case `./$dummy` in
253
 
                        0-0)
254
 
                                UNAME_MACHINE="alpha"
255
 
                                ;;
256
 
                        1-0)
257
 
                                UNAME_MACHINE="alphaev5"
258
 
                                ;;
259
 
                        1-1)
260
 
                                UNAME_MACHINE="alphaev56"
261
 
                                ;;
262
 
                        1-101)
263
 
                                UNAME_MACHINE="alphapca56"
264
 
                                ;;
265
 
                        2-303)
266
 
                                UNAME_MACHINE="alphaev6"
267
 
                                ;;
268
 
                        2-307)
269
 
                                UNAME_MACHINE="alphaev67"
270
 
                                ;;
271
 
                        2-1307)
272
 
                                UNAME_MACHINE="alphaev68"
273
 
                                ;;
274
 
                esac
275
 
        fi
276
 
        rm -f $dummy.s $dummy
277
 
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 
316
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
278
317
        exit 0 ;;
279
318
    Alpha\ *:Windows_NT*:*)
280
319
        # How do we know it's Interix rather than the generic POSIX subsystem?
297
336
    *:OS/390:*:*)
298
337
        echo i370-ibm-openedition
299
338
        exit 0 ;;
 
339
    *:z/VM:*:*)
 
340
        echo s390-ibm-zvmoe
 
341
        exit 0 ;;
 
342
    *:OS400:*:*)
 
343
        echo powerpc-ibm-os400
 
344
        exit 0 ;;
300
345
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301
346
        echo arm-acorn-riscix${UNAME_RELEASE}
302
347
        exit 0;;
314
359
    NILE*:*:*:dcosx)
315
360
        echo pyramid-pyramid-svr4
316
361
        exit 0 ;;
 
362
    DRS?6000:unix:4.0:6*)
 
363
        echo sparc-icl-nx6
 
364
        exit 0 ;;
 
365
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 
366
        case `/usr/bin/uname -p` in
 
367
            sparc) echo sparc-icl-nx7 && exit 0 ;;
 
368
        esac ;;
317
369
    sun4H:SunOS:5.*:*)
318
370
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
319
371
        exit 0 ;;
382
434
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
383
435
        echo m68k-unknown-mint${UNAME_RELEASE}
384
436
        exit 0 ;;
 
437
    m68k:machten:*:*)
 
438
        echo m68k-apple-machten${UNAME_RELEASE}
 
439
        exit 0 ;;
385
440
    powerpc:machten:*:*)
386
441
        echo powerpc-apple-machten${UNAME_RELEASE}
387
442
        exit 0 ;;
420
475
          exit (-1);
421
476
        }
422
477
EOF
423
 
        $CC_FOR_BUILD $dummy.c -o $dummy \
424
 
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
425
 
          && rm -f $dummy.c $dummy && exit 0
426
 
        rm -f $dummy.c $dummy
 
478
        $CC_FOR_BUILD -o $dummy $dummy.c \
 
479
          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 
480
          && exit 0
427
481
        echo mips-mips-riscos${UNAME_RELEASE}
428
482
        exit 0 ;;
429
483
    Motorola:PowerMAX_OS:*:*)
430
484
        echo powerpc-motorola-powermax
431
485
        exit 0 ;;
432
 
    Night_Hawk:*:*:PowerMAX_OS)
 
486
    Motorola:*:4.3:PL8-*)
 
487
        echo powerpc-harris-powermax
 
488
        exit 0 ;;
 
489
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
433
490
        echo powerpc-harris-powermax
434
491
        exit 0 ;;
435
492
    Night_Hawk:Power_UNIX:*:*)
504
561
                        exit(0);
505
562
                        }
506
563
EOF
507
 
                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
508
 
                rm -f $dummy.c $dummy
 
564
                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
509
565
                echo rs6000-ibm-aix3.2.5
510
566
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
511
567
                echo rs6000-ibm-aix3.2.4
603
659
                  exit (0);
604
660
              }
605
661
EOF
606
 
                    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
607
 
                    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
608
 
                    rm -f $dummy.c $dummy
 
662
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 
663
                    test -z "$HP_ARCH" && HP_ARCH=hppa
609
664
                fi ;;
610
665
        esac
 
666
        if [ ${HP_ARCH} = "hppa2.0w" ]
 
667
        then
 
668
            # avoid double evaluation of $set_cc_for_build
 
669
            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
 
670
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
 
671
            then
 
672
                HP_ARCH="hppa2.0w"
 
673
            else
 
674
                HP_ARCH="hppa64"
 
675
            fi
 
676
        fi
611
677
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
612
678
        exit 0 ;;
613
679
    ia64:HP-UX:*:*)
641
707
          exit (0);
642
708
        }
643
709
EOF
644
 
        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
645
 
        rm -f $dummy.c $dummy
 
710
        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
646
711
        echo unknown-hitachi-hiuxwe2
647
712
        exit 0 ;;
648
713
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
700
765
    CRAY*TS:*:*:*)
701
766
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
702
767
        exit 0 ;;
703
 
    CRAY*T3D:*:*:*)
704
 
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
705
 
        exit 0 ;;
706
768
    CRAY*T3E:*:*:*)
707
769
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
708
770
        exit 0 ;;
709
771
    CRAY*SV1:*:*:*)
710
772
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
711
773
        exit 0 ;;
 
774
    *:UNICOS/mp:*:*)
 
775
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
776
        exit 0 ;;
712
777
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
713
778
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
714
779
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
715
780
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
716
781
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
717
782
        exit 0 ;;
 
783
    5000:UNIX_System_V:4.*:*)
 
784
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 
785
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
 
786
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 
787
        exit 0 ;;
718
788
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
719
789
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
720
790
        exit 0 ;;
736
806
    i*:PW*:*)
737
807
        echo ${UNAME_MACHINE}-pc-pw32
738
808
        exit 0 ;;
739
 
    x86:Interix*:3*)
740
 
        echo i386-pc-interix3
 
809
    x86:Interix*:[34]*)
 
810
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
 
811
        exit 0 ;;
 
812
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 
813
        echo i${UNAME_MACHINE}-pc-mks
741
814
        exit 0 ;;
742
815
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
743
816
        # How do we know it's Interix rather than the generic POSIX subsystem?
744
817
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
745
818
        # UNAME_MACHINE based on the output of uname instead of i386?
746
 
        echo i386-pc-interix
 
819
        echo i586-pc-interix
747
820
        exit 0 ;;
748
821
    i*:UWIN*:*)
749
822
        echo ${UNAME_MACHINE}-pc-uwin
750
823
        exit 0 ;;
 
824
    amd64:CYGWIN*:*:*)
 
825
        echo x86_64-unknown-cygwin
 
826
        exit 0 ;;
751
827
    p*:CYGWIN*:*)
752
828
        echo powerpcle-unknown-cygwin
753
829
        exit 0 ;;
755
831
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
756
832
        exit 0 ;;
757
833
    *:GNU:*:*)
 
834
        # the GNU system
758
835
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
759
836
        exit 0 ;;
 
837
    *:GNU/*:*:*)
 
838
        # other systems with GNU libc and userland
 
839
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 
840
        exit 0 ;;
760
841
    i*86:Minix:*:*)
761
842
        echo ${UNAME_MACHINE}-pc-minix
762
843
        exit 0 ;;
763
844
    arm*:Linux:*:*)
764
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
845
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
846
        exit 0 ;;
 
847
    cris:Linux:*:*)
 
848
        echo cris-axis-linux-${LIBC}
 
849
        exit 0 ;;
 
850
    crisv32:Linux:*:*)
 
851
        echo crisv32-axis-linux-${LIBC}
 
852
        exit 0 ;;
 
853
    frv:Linux:*:*)
 
854
        echo frv-unknown-linux-${LIBC}
765
855
        exit 0 ;;
766
856
    ia64:Linux:*:*)
767
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
857
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
858
        exit 0 ;;
 
859
    m32r*:Linux:*:*)
 
860
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
768
861
        exit 0 ;;
769
862
    m68*:Linux:*:*)
770
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
863
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
771
864
        exit 0 ;;
772
865
    mips:Linux:*:*)
773
866
        eval $set_cc_for_build
786
879
        #endif
787
880
EOF
788
881
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
789
 
        rm -f $dummy.c
790
 
        test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 
882
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-${LIBC}" && exit 0
 
883
        ;;
 
884
    mips64:Linux:*:*)
 
885
        eval $set_cc_for_build
 
886
        sed 's/^        //' << EOF >$dummy.c
 
887
        #undef CPU
 
888
        #undef mips64
 
889
        #undef mips64el
 
890
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
891
        CPU=mips64el
 
892
        #else
 
893
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
894
        CPU=mips64
 
895
        #else
 
896
        CPU=
 
897
        #endif
 
898
        #endif
 
899
EOF
 
900
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
 
901
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-${LIBC}" && exit 0
791
902
        ;;
792
903
    ppc:Linux:*:*)
793
 
        echo powerpc-unknown-linux-gnu
 
904
        echo powerpc-unknown-linux-${LIBC}
794
905
        exit 0 ;;
795
906
    ppc64:Linux:*:*)
796
 
        echo powerpc64-unknown-linux-gnu
 
907
        echo powerpc64-unknown-linux-${LIBC}
797
908
        exit 0 ;;
798
909
    alpha:Linux:*:*)
799
910
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
806
917
          EV68*) UNAME_MACHINE=alphaev68 ;;
807
918
        esac
808
919
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
809
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
810
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
920
        if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
 
921
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
811
922
        exit 0 ;;
812
923
    parisc:Linux:*:* | hppa:Linux:*:*)
813
924
        # Look for CPU level
814
925
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
815
 
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
816
 
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
817
 
          *)    echo hppa-unknown-linux-gnu ;;
 
926
          PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
 
927
          PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
 
928
          *)    echo hppa-unknown-linux-${LIBC} ;;
818
929
        esac
819
930
        exit 0 ;;
820
931
    parisc64:Linux:*:* | hppa64:Linux:*:*)
821
 
        echo hppa64-unknown-linux-gnu
 
932
        echo hppa64-unknown-linux-${LIBC}
822
933
        exit 0 ;;
823
934
    s390:Linux:*:* | s390x:Linux:*:*)
824
935
        echo ${UNAME_MACHINE}-ibm-linux
825
936
        exit 0 ;;
 
937
    sh64*:Linux:*:*)
 
938
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
939
        exit 0 ;;
826
940
    sh*:Linux:*:*)
827
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
941
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
828
942
        exit 0 ;;
829
943
    sparc:Linux:*:* | sparc64:Linux:*:*)
830
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
944
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
831
945
        exit 0 ;;
832
946
    x86_64:Linux:*:*)
833
 
        echo x86_64-unknown-linux-gnu
 
947
        echo x86_64-unknown-linux-${LIBC}
834
948
        exit 0 ;;
835
949
    i*86:Linux:*:*)
836
950
        # The BFD linker knows what the default object file format is, so
845
959
                                    p'`
846
960
        case "$ld_supported_targets" in
847
961
          elf32-i386)
848
 
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 
962
                TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
849
963
                ;;
850
964
          a.out-i386-linux)
851
 
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
852
 
                exit 0 ;;               
 
965
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
 
966
                exit 0 ;;
853
967
          coff-i386)
854
 
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 
968
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
855
969
                exit 0 ;;
856
970
          "")
857
971
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
858
972
                # one that does not give us useful --help.
859
 
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
 
973
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
860
974
                exit 0 ;;
861
975
        esac
 
976
        if [ "`echo $LIBC | sed -e 's:uclibc::'`" != "$LIBC" ] ; then echo "$TENTATIVE" && exit 0 ; fi
862
977
        # Determine whether the default compiler is a.out or elf
863
978
        eval $set_cc_for_build
864
979
        sed 's/^        //' << EOF >$dummy.c
880
995
        LIBC=gnuaout
881
996
        #endif
882
997
        #endif
 
998
        #ifdef __dietlibc__
 
999
        LIBC=dietlibc
 
1000
        #endif
883
1001
EOF
884
1002
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
885
 
        rm -f $dummy.c
886
1003
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
887
1004
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
888
1005
        ;;
900
1017
        # Use sysv4.2uw... so that sysv4* matches it.
901
1018
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
902
1019
        exit 0 ;;
 
1020
    i*86:OS/2:*:*)
 
1021
        # If we were able to find `uname', then EMX Unix compatibility
 
1022
        # is probably installed.
 
1023
        echo ${UNAME_MACHINE}-pc-os2-emx
 
1024
        exit 0 ;;
 
1025
    i*86:XTS-300:*:STOP)
 
1026
        echo ${UNAME_MACHINE}-unknown-stop
 
1027
        exit 0 ;;
 
1028
    i*86:atheos:*:*)
 
1029
        echo ${UNAME_MACHINE}-unknown-atheos
 
1030
        exit 0 ;;
 
1031
        i*86:syllable:*:*)
 
1032
        echo ${UNAME_MACHINE}-pc-syllable
 
1033
        exit 0 ;;
 
1034
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 
1035
        echo i386-unknown-lynxos${UNAME_RELEASE}
 
1036
        exit 0 ;;
 
1037
    i*86:*DOS:*:*)
 
1038
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
 
1039
        exit 0 ;;
903
1040
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
904
1041
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
905
1042
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
934
1071
                echo ${UNAME_MACHINE}-pc-sysv32
935
1072
        fi
936
1073
        exit 0 ;;
937
 
    i*86:*DOS:*:*)
938
 
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
939
 
        exit 0 ;;
940
1074
    pc:*:*:*)
941
1075
        # Left here for compatibility:
942
1076
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
960
1094
        # "miniframe"
961
1095
        echo m68010-convergent-sysv
962
1096
        exit 0 ;;
963
 
    M68*:*:R3V[567]*:*)
 
1097
    mc68k:UNIX:SYSTEM5:3.51m)
 
1098
        echo m68k-convergent-sysv
 
1099
        exit 0 ;;
 
1100
    M680?0:D-NIX:5.3:*)
 
1101
        echo m68k-diab-dnix
 
1102
        exit 0 ;;
 
1103
    M68*:*:R3V[5678]*:*)
964
1104
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
965
 
    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)
 
1105
    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)
966
1106
        OS_REL=''
967
1107
        test -r /etc/.relid \
968
1108
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
979
1119
    mc68030:UNIX_System_V:4.*:*)
980
1120
        echo m68k-atari-sysv4
981
1121
        exit 0 ;;
982
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
983
 
        echo i386-unknown-lynxos${UNAME_RELEASE}
984
 
        exit 0 ;;
985
1122
    TSUNAMI:LynxOS:2.*:*)
986
1123
        echo sparc-unknown-lynxos${UNAME_RELEASE}
987
1124
        exit 0 ;;
1053
1190
    SX-5:SUPER-UX:*:*)
1054
1191
        echo sx5-nec-superux${UNAME_RELEASE}
1055
1192
        exit 0 ;;
 
1193
    SX-6:SUPER-UX:*:*)
 
1194
        echo sx6-nec-superux${UNAME_RELEASE}
 
1195
        exit 0 ;;
1056
1196
    Power*:Rhapsody:*:*)
1057
1197
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
1058
1198
        exit 0 ;;
1060
1200
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1061
1201
        exit 0 ;;
1062
1202
    *:Darwin:*:*)
1063
 
        echo `uname -p`-apple-darwin${UNAME_RELEASE}
 
1203
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 
1204
        case $UNAME_PROCESSOR in
 
1205
            *86) UNAME_PROCESSOR=i686 ;;
 
1206
            unknown) UNAME_PROCESSOR=powerpc ;;
 
1207
        esac
 
1208
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1064
1209
        exit 0 ;;
1065
1210
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1066
1211
        UNAME_PROCESSOR=`uname -p`
1073
1218
    *:QNX:*:4*)
1074
1219
        echo i386-pc-qnx
1075
1220
        exit 0 ;;
1076
 
    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
 
1221
    NSE-?:NONSTOP_KERNEL:*:*)
 
1222
        echo nse-tandem-nsk${UNAME_RELEASE}
 
1223
        exit 0 ;;
 
1224
    NSR-?:NONSTOP_KERNEL:*:*)
1077
1225
        echo nsr-tandem-nsk${UNAME_RELEASE}
1078
1226
        exit 0 ;;
1079
1227
    *:NonStop-UX:*:*)
1096
1244
        fi
1097
1245
        echo ${UNAME_MACHINE}-unknown-plan9
1098
1246
        exit 0 ;;
1099
 
    i*86:OS/2:*:*)
1100
 
        # If we were able to find `uname', then EMX Unix compatibility
1101
 
        # is probably installed.
1102
 
        echo ${UNAME_MACHINE}-pc-os2-emx
1103
 
        exit 0 ;;
1104
1247
    *:TOPS-10:*:*)
1105
1248
        echo pdp10-unknown-tops10
1106
1249
        exit 0 ;;
1119
1262
    *:ITS:*:*)
1120
1263
        echo pdp10-unknown-its
1121
1264
        exit 0 ;;
1122
 
    i*86:XTS-300:*:STOP)
1123
 
        echo ${UNAME_MACHINE}-unknown-stop
1124
 
        exit 0 ;;
1125
 
    i*86:atheos:*:*)
1126
 
        echo ${UNAME_MACHINE}-unknown-atheos
 
1265
    SEI:*:*:SEIUX)
 
1266
        echo mips-sei-seiux${UNAME_RELEASE}
 
1267
        exit 0 ;;
 
1268
    *:DragonFly:*:*)
 
1269
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
1270
        exit 0 ;;
 
1271
    *:*VMS:*:*)
 
1272
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
 
1273
        case "${UNAME_MACHINE}" in
 
1274
            A*) echo alpha-dec-vms && exit 0 ;;
 
1275
            I*) echo ia64-dec-vms && exit 0 ;;
 
1276
            V*) echo vax-dec-vms && exit 0 ;;
 
1277
        esac ;;
 
1278
    *:XENIX:*:SysV)
 
1279
        echo i386-pc-xenix
1127
1280
        exit 0 ;;
1128
1281
esac
1129
1282
 
1245
1398
}
1246
1399
EOF
1247
1400
 
1248
 
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1249
 
rm -f $dummy.c $dummy
 
1401
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1250
1402
 
1251
1403
# Apollos put the system type in the environment.
1252
1404
 
1285
1437
the operating system you are using. It is advised that you
1286
1438
download the most up to date version of the config scripts from
1287
1439
 
1288
 
    ftp://ftp.gnu.org/pub/gnu/config/
 
1440
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
 
1441
and
 
1442
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1289
1443
 
1290
1444
If the version you run ($0) is already up to date, please
1291
1445
send the following data and any information you think might be