~ubuntu-branches/debian/sid/unixodbc/sid

« back to all changes in this revision

Viewing changes to gODBCConfig/config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2004-10-15 03:07:52 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041015030752-dzw4vhxlgycz3woj
Tags: 2.2.4-11
Brown paper bag me: conflicts do not write themselves just because
you add a line to the changelog.

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
 
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4
 
#   Free Software Foundation, Inc.
 
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 
4
#   2000, 2001, 2002 Free Software Foundation, Inc.
5
5
 
6
 
timestamp='2001-11-08'
 
6
timestamp='2002-11-30'
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
24
24
# configuration script generated by Autoconf, you may include it under
25
25
# the same distribution terms that you use for the rest of that program.
26
26
 
27
 
# Originally written by Per Bothner <bothner@cygnus.com>.
 
27
# Originally written by Per Bothner <per@bothner.com>.
28
28
# Please send patches to <config-patches@gnu.org>.  Submit a context
29
29
# diff and a properly formatted ChangeLog entry.
30
30
#
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
 
        for c in cc gcc c89 ; do
102
 
          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
103
 
          if test $? = 0 ; then
 
101
# This shell variable is my proudest work .. or something. --bje
 
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 ;
 
109
case $CC_FOR_BUILD,$HOST_CC,$CC in
 
110
 ,,)    echo "int x;" > $dummy.c ;
 
111
        for c in cc gcc c89 c99 ; do
 
112
          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
104
113
             CC_FOR_BUILD="$c"; break ;
105
114
          fi ;
106
115
        done ;
107
 
        rm -f $dummy.c $dummy.o $dummy.rel ;
 
116
        rm -f $files ;
108
117
        if test x"$CC_FOR_BUILD" = x ; then
109
118
          CC_FOR_BUILD=no_compiler_found ;
110
119
        fi
111
120
        ;;
112
121
 ,,*)   CC_FOR_BUILD=$CC ;;
113
122
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
114
 
esac'
 
123
esac ;
 
124
unset files'
115
125
 
116
126
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
117
127
# (ghazi@noc.rutgers.edu 1994-08-24)
135
145
        # object file format.  This provides both forward
136
146
        # compatibility and a consistent mechanism for selecting the
137
147
        # object file format.
138
 
        # Determine the machine/vendor (is the vendor relevant).
139
 
        case "${UNAME_MACHINE}" in
140
 
            amiga) machine=m68k-unknown ;;
141
 
            arm32) machine=arm-unknown ;;
142
 
            atari*) machine=m68k-atari ;;
143
 
            sun3*) machine=m68k-sun ;;
144
 
            mac68k) machine=m68k-apple ;;
145
 
            macppc) machine=powerpc-apple ;;
146
 
            hp3[0-9][05]) machine=m68k-hp ;;
147
 
            ibmrt|romp-ibm) machine=romp-ibm ;;
148
 
            sparc*) machine=`uname -p`-unknown ;;
149
 
            *) machine=${UNAME_MACHINE}-unknown ;;
 
148
        #
 
149
        # Note: NetBSD doesn't particularly care about the vendor
 
150
        # portion of the name.  We always set it to "unknown".
 
151
        sysctl="sysctl -n hw.machine_arch"
 
152
        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
 
153
            /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 
154
        case "${UNAME_MACHINE_ARCH}" in
 
155
            armeb) machine=armeb-unknown ;;
 
156
            arm*) machine=arm-unknown ;;
 
157
            sh3el) machine=shl-unknown ;;
 
158
            sh3eb) machine=sh-unknown ;;
 
159
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
150
160
        esac
151
161
        # The Operating System including object format, if it has switched
152
162
        # to ELF recently, or will in the future.
153
 
        case "${UNAME_MACHINE}" in
154
 
            i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
 
163
        case "${UNAME_MACHINE_ARCH}" in
 
164
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
155
165
                eval $set_cc_for_build
156
166
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
157
167
                        | grep __ELF__ >/dev/null
168
178
                ;;
169
179
        esac
170
180
        # The OS release
171
 
        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
181
        # Debian GNU/NetBSD machines have a different userland, and
 
182
        # thus, need a distinct triplet. However, they do not need
 
183
        # kernel version information, so it can be replaced with a
 
184
        # suitable tag, in the style of linux-gnu.
 
185
        case "${UNAME_VERSION}" in
 
186
            Debian*)
 
187
                release='-gnu'
 
188
                ;;
 
189
            *)
 
190
                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
191
                ;;
 
192
        esac
172
193
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
173
194
        # contains redundant information, the shorter form:
174
195
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
221
242
        # A Tn.n version is a released field test version.
222
243
        # A Xn.n version is an unreleased experimental baselevel.
223
244
        # 1.2 uses "1.2" for uname -r.
 
245
        eval $set_cc_for_build
224
246
        cat <<EOF >$dummy.s
225
247
        .data
226
248
\$Lformat:
246
268
        jsr \$26,exit
247
269
        .end main
248
270
EOF
249
 
        eval $set_cc_for_build
250
 
        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 
271
        $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
251
272
        if test "$?" = 0 ; then
252
 
                case `./$dummy` in
 
273
                case `$dummy` in
253
274
                        0-0)
254
275
                                UNAME_MACHINE="alpha"
255
276
                                ;;
271
292
                        2-1307)
272
293
                                UNAME_MACHINE="alphaev68"
273
294
                                ;;
 
295
                        3-1307)
 
296
                                UNAME_MACHINE="alphaev7"
 
297
                                ;;
274
298
                esac
275
299
        fi
276
 
        rm -f $dummy.s $dummy
 
300
        rm -f $dummy.s $dummy && rmdir $tmpdir
277
301
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
278
302
        exit 0 ;;
279
303
    Alpha\ *:Windows_NT*:*)
291
315
    *:[Aa]miga[Oo][Ss]:*:*)
292
316
        echo ${UNAME_MACHINE}-unknown-amigaos
293
317
        exit 0 ;;
 
318
    *:[Mm]orph[Oo][Ss]:*:*)
 
319
        echo ${UNAME_MACHINE}-unknown-morphos
 
320
        exit 0 ;;
294
321
    *:OS/390:*:*)
295
322
        echo i370-ibm-openedition
296
323
        exit 0 ;;
311
338
    NILE*:*:*:dcosx)
312
339
        echo pyramid-pyramid-svr4
313
340
        exit 0 ;;
 
341
    DRS?6000:UNIX_SV:4.2*:7*)
 
342
        case `/usr/bin/uname -p` in
 
343
            sparc) echo sparc-icl-nx7 && exit 0 ;;
 
344
        esac ;;
314
345
    sun4H:SunOS:5.*:*)
315
346
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
316
347
        exit 0 ;;
339
370
        echo m68k-sun-sunos${UNAME_RELEASE}
340
371
        exit 0 ;;
341
372
    sun*:*:4.2BSD:*)
342
 
        UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 
373
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
343
374
        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
344
375
        case "`/bin/arch`" in
345
376
            sun3)
417
448
          exit (-1);
418
449
        }
419
450
EOF
420
 
        $CC_FOR_BUILD $dummy.c -o $dummy \
421
 
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
422
 
          && rm -f $dummy.c $dummy && exit 0
423
 
        rm -f $dummy.c $dummy
 
451
        $CC_FOR_BUILD -o $dummy $dummy.c \
 
452
          && $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
424
455
        echo mips-mips-riscos${UNAME_RELEASE}
425
456
        exit 0 ;;
426
457
    Motorola:PowerMAX_OS:*:*)
427
458
        echo powerpc-motorola-powermax
428
459
        exit 0 ;;
 
460
    Motorola:*:4.3:PL8-*)
 
461
        echo powerpc-harris-powermax
 
462
        exit 0 ;;
 
463
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 
464
        echo powerpc-harris-powermax
 
465
        exit 0 ;;
429
466
    Night_Hawk:Power_UNIX:*:*)
430
467
        echo powerpc-harris-powerunix
431
468
        exit 0 ;;
498
535
                        exit(0);
499
536
                        }
500
537
EOF
501
 
                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
502
 
                rm -f $dummy.c $dummy
 
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
503
540
                echo rs6000-ibm-aix3.2.5
504
541
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
505
542
                echo rs6000-ibm-aix3.2.4
508
545
        fi
509
546
        exit 0 ;;
510
547
    *:AIX:*:[45])
511
 
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
 
548
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
512
549
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
513
550
                IBM_ARCH=rs6000
514
551
        else
597
634
                  exit (0);
598
635
              }
599
636
EOF
600
 
                    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
 
637
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
601
638
                    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
602
 
                    rm -f $dummy.c $dummy
 
639
                    rm -f $dummy.c $dummy && rmdir $tmpdir
603
640
                fi ;;
604
641
        esac
605
642
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
635
672
          exit (0);
636
673
        }
637
674
EOF
638
 
        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
639
 
        rm -f $dummy.c $dummy
 
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
640
677
        echo unknown-hitachi-hiuxwe2
641
678
        exit 0 ;;
642
679
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
682
719
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
683
720
        echo c4-convex-bsd
684
721
        exit 0 ;;
685
 
    CRAY*X-MP:*:*:*)
686
 
        echo xmp-cray-unicos
687
 
        exit 0 ;;
688
722
    CRAY*Y-MP:*:*:*)
689
723
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
690
724
        exit 0 ;;
706
740
    CRAY*SV1:*:*:*)
707
741
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
708
742
        exit 0 ;;
709
 
    CRAY-2:*:*:*)
710
 
        echo cray2-cray-unicos
711
 
        exit 0 ;;
712
743
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
713
744
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
714
745
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
725
756
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
726
757
        exit 0 ;;
727
758
    *:FreeBSD:*:*)
728
 
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
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}
729
772
        exit 0 ;;
730
773
    i*:CYGWIN*:*)
731
774
        echo ${UNAME_MACHINE}-pc-cygwin
736
779
    i*:PW*:*)
737
780
        echo ${UNAME_MACHINE}-pc-pw32
738
781
        exit 0 ;;
 
782
    x86:Interix*:3*)
 
783
        echo i586-pc-interix3
 
784
        exit 0 ;;
 
785
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 
786
        echo i${UNAME_MACHINE}-pc-mks
 
787
        exit 0 ;;
739
788
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
740
789
        # How do we know it's Interix rather than the generic POSIX subsystem?
741
790
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
742
791
        # UNAME_MACHINE based on the output of uname instead of i386?
743
 
        echo i386-pc-interix
 
792
        echo i586-pc-interix
744
793
        exit 0 ;;
745
794
    i*:UWIN*:*)
746
795
        echo ${UNAME_MACHINE}-pc-uwin
761
810
        echo ${UNAME_MACHINE}-unknown-linux-gnu
762
811
        exit 0 ;;
763
812
    ia64:Linux:*:*)
764
 
        echo ${UNAME_MACHINE}-unknown-linux
 
813
        echo ${UNAME_MACHINE}-unknown-linux-gnu
765
814
        exit 0 ;;
766
815
    m68*:Linux:*:*)
767
816
        echo ${UNAME_MACHINE}-unknown-linux-gnu
768
817
        exit 0 ;;
769
818
    mips:Linux:*:*)
770
 
        case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
771
 
          big)    echo mips-unknown-linux-gnu && exit 0 ;;
772
 
          little) echo mipsel-unknown-linux-gnu && exit 0 ;;
773
 
        esac
 
819
        eval $set_cc_for_build
 
820
        sed 's/^        //' << EOF >$dummy.c
 
821
        #undef CPU
 
822
        #undef mips
 
823
        #undef mipsel
 
824
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
825
        CPU=mipsel
 
826
        #else
 
827
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
828
        CPU=mips
 
829
        #else
 
830
        CPU=
 
831
        #endif
 
832
        #endif
 
833
EOF
 
834
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
 
835
        rm -f $dummy.c && rmdir $tmpdir
 
836
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
 
837
        ;;
 
838
    mips64:Linux:*:*)
 
839
        eval $set_cc_for_build
 
840
        sed 's/^        //' << EOF >$dummy.c
 
841
        #undef CPU
 
842
        #undef mips64
 
843
        #undef mips64el
 
844
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
845
        CPU=mips64el
 
846
        #else
 
847
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
848
        CPU=mips64
 
849
        #else
 
850
        CPU=
 
851
        #endif
 
852
        #endif
 
853
EOF
 
854
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
 
855
        rm -f $dummy.c && rmdir $tmpdir
 
856
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
774
857
        ;;
775
858
    ppc:Linux:*:*)
776
859
        echo powerpc-unknown-linux-gnu
819
902
        # The BFD linker knows what the default object file format is, so
820
903
        # first see if it will tell us. cd to the root directory to prevent
821
904
        # problems with other programs or directories called `ld' in the path.
822
 
        ld_supported_targets=`cd /; ld --help 2>&1 \
 
905
        # Set LC_ALL=C to ensure ld outputs messages in English.
 
906
        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
823
907
                         | sed -ne '/supported targets:/!d
824
908
                                    s/[         ][      ]*/ /g
825
909
                                    s/.*supported targets: *//
831
915
                ;;
832
916
          a.out-i386-linux)
833
917
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
834
 
                exit 0 ;;               
 
918
                exit 0 ;;
835
919
          coff-i386)
836
920
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
837
921
                exit 0 ;;
843
927
        esac
844
928
        # Determine whether the default compiler is a.out or elf
845
929
        eval $set_cc_for_build
846
 
        cat >$dummy.c <<EOF
847
 
#include <features.h>
848
 
#ifdef __cplusplus
849
 
#include <stdio.h>  /* for printf() prototype */
850
 
        int main (int argc, char *argv[]) {
851
 
#else
852
 
        int main (argc, argv) int argc; char *argv[]; {
853
 
#endif
854
 
#ifdef __ELF__
855
 
# ifdef __GLIBC__
856
 
#  if __GLIBC__ >= 2
857
 
    printf ("%s-pc-linux-gnu\n", argv[1]);
858
 
#  else
859
 
    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
860
 
#  endif
861
 
# else
862
 
   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
863
 
# endif
864
 
#else
865
 
  printf ("%s-pc-linux-gnuaout\n", argv[1]);
866
 
#endif
867
 
  return 0;
868
 
}
 
930
        sed 's/^        //' << EOF >$dummy.c
 
931
        #include <features.h>
 
932
        #ifdef __ELF__
 
933
        # ifdef __GLIBC__
 
934
        #  if __GLIBC__ >= 2
 
935
        LIBC=gnu
 
936
        #  else
 
937
        LIBC=gnulibc1
 
938
        #  endif
 
939
        # else
 
940
        LIBC=gnulibc1
 
941
        # endif
 
942
        #else
 
943
        #ifdef __INTEL_COMPILER
 
944
        LIBC=gnu
 
945
        #else
 
946
        LIBC=gnuaout
 
947
        #endif
 
948
        #endif
869
949
EOF
870
 
        $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
871
 
        rm -f $dummy.c $dummy
 
950
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
 
951
        rm -f $dummy.c && rmdir $tmpdir
 
952
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
872
953
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
873
954
        ;;
874
955
    i*86:DYNIX/ptx:4*:*)
885
966
        # Use sysv4.2uw... so that sysv4* matches it.
886
967
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
887
968
        exit 0 ;;
 
969
    i*86:OS/2:*:*)
 
970
        # If we were able to find `uname', then EMX Unix compatibility
 
971
        # is probably installed.
 
972
        echo ${UNAME_MACHINE}-pc-os2-emx
 
973
        exit 0 ;;
 
974
    i*86:XTS-300:*:STOP)
 
975
        echo ${UNAME_MACHINE}-unknown-stop
 
976
        exit 0 ;;
 
977
    i*86:atheos:*:*)
 
978
        echo ${UNAME_MACHINE}-unknown-atheos
 
979
        exit 0 ;;
 
980
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 
981
        echo i386-unknown-lynxos${UNAME_RELEASE}
 
982
        exit 0 ;;
 
983
    i*86:*DOS:*:*)
 
984
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
 
985
        exit 0 ;;
888
986
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
889
987
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
890
988
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
906
1004
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
907
1005
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
908
1006
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
909
 
                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
910
 
                (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
911
 
                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
 
1007
                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 
1008
                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
 
1009
                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
912
1010
                        && UNAME_MACHINE=i586
913
 
                (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
 
1011
                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
914
1012
                        && UNAME_MACHINE=i686
915
 
                (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
 
1013
                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
916
1014
                        && UNAME_MACHINE=i686
917
1015
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
918
1016
        else
919
1017
                echo ${UNAME_MACHINE}-pc-sysv32
920
1018
        fi
921
1019
        exit 0 ;;
922
 
    i*86:*DOS:*:*)
923
 
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
924
 
        exit 0 ;;
925
1020
    pc:*:*:*)
926
1021
        # Left here for compatibility:
927
1022
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
945
1040
        # "miniframe"
946
1041
        echo m68010-convergent-sysv
947
1042
        exit 0 ;;
 
1043
    mc68k:UNIX:SYSTEM5:3.51m)
 
1044
        echo m68k-convergent-sysv
 
1045
        exit 0 ;;
 
1046
    M680?0:D-NIX:5.3:*)
 
1047
        echo m68k-diab-dnix
 
1048
        exit 0 ;;
948
1049
    M68*:*:R3V[567]*:*)
949
1050
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
950
 
    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 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.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)
951
1052
        OS_REL=''
952
1053
        test -r /etc/.relid \
953
1054
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
964
1065
    mc68030:UNIX_System_V:4.*:*)
965
1066
        echo m68k-atari-sysv4
966
1067
        exit 0 ;;
967
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
968
 
        echo i386-unknown-lynxos${UNAME_RELEASE}
969
 
        exit 0 ;;
970
1068
    TSUNAMI:LynxOS:2.*:*)
971
1069
        echo sparc-unknown-lynxos${UNAME_RELEASE}
972
1070
        exit 0 ;;
1038
1136
    SX-5:SUPER-UX:*:*)
1039
1137
        echo sx5-nec-superux${UNAME_RELEASE}
1040
1138
        exit 0 ;;
 
1139
    SX-6:SUPER-UX:*:*)
 
1140
        echo sx6-nec-superux${UNAME_RELEASE}
 
1141
        exit 0 ;;
1041
1142
    Power*:Rhapsody:*:*)
1042
1143
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
1043
1144
        exit 0 ;;
1048
1149
        echo `uname -p`-apple-darwin${UNAME_RELEASE}
1049
1150
        exit 0 ;;
1050
1151
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1051
 
        if test "${UNAME_MACHINE}" = "x86pc"; then
 
1152
        UNAME_PROCESSOR=`uname -p`
 
1153
        if test "$UNAME_PROCESSOR" = "x86"; then
 
1154
                UNAME_PROCESSOR=i386
1052
1155
                UNAME_MACHINE=pc
1053
1156
        fi
1054
 
        echo `uname -p`-${UNAME_MACHINE}-nto-qnx
 
1157
        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1055
1158
        exit 0 ;;
1056
1159
    *:QNX:*:4*)
1057
1160
        echo i386-pc-qnx
1058
1161
        exit 0 ;;
1059
 
    NSR-[KW]:NONSTOP_KERNEL:*:*)
 
1162
    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
1060
1163
        echo nsr-tandem-nsk${UNAME_RELEASE}
1061
1164
        exit 0 ;;
1062
1165
    *:NonStop-UX:*:*)
1079
1182
        fi
1080
1183
        echo ${UNAME_MACHINE}-unknown-plan9
1081
1184
        exit 0 ;;
1082
 
    i*86:OS/2:*:*)
1083
 
        # If we were able to find `uname', then EMX Unix compatibility
1084
 
        # is probably installed.
1085
 
        echo ${UNAME_MACHINE}-pc-os2-emx
1086
 
        exit 0 ;;
1087
1185
    *:TOPS-10:*:*)
1088
1186
        echo pdp10-unknown-tops10
1089
1187
        exit 0 ;;
1102
1200
    *:ITS:*:*)
1103
1201
        echo pdp10-unknown-its
1104
1202
        exit 0 ;;
1105
 
    i*86:XTS-300:*:STOP)
1106
 
        echo ${UNAME_MACHINE}-unknown-stop
1107
 
        exit 0 ;;
1108
 
    i*86:atheos:*:*)
1109
 
        echo ${UNAME_MACHINE}-unknown-atheos
1110
 
        exit 0 ;;
1111
1203
esac
1112
1204
 
1113
1205
#echo '(No uname command or uname output not recognized.)' 1>&2
1228
1320
}
1229
1321
EOF
1230
1322
 
1231
 
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1232
 
rm -f $dummy.c $dummy
 
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
1233
1325
 
1234
1326
# Apollos put the system type in the environment.
1235
1327