~ubuntu-branches/ubuntu/warty/gedit/warty

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Joe Drew
  • Date: 2002-01-13 02:13:27 UTC
  • Revision ID: james.westby@ubuntu.com-20020113021327-7gh6isxvejblzvdq
Tags: 0.9.6-4
* Change /usr/share/doc/gedit/html to be an absolute link
  to /usr/gnome/help/gedit/C (which is technically against
  policy, but causes problems for people in real world
  situations.)
  Closes: Bug#84067, Bug#97631
* Correct typos in description (Closes: Bug#124664)
* Modify plugins' Makefile.am to add EXTRA_GNOME_CFLAGS,
  which is necessary since libglade moved its header files.
  Also re-ran automake.

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
 
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4
4
#   Free Software Foundation, Inc.
5
 
#
 
5
 
 
6
timestamp='2001-06-29'
 
7
 
6
8
# This file is free software; you can redistribute it and/or modify it
7
9
# under the terms of the GNU General Public License as published by
8
10
# the Free Software Foundation; either version 2 of the License, or
30
32
# exits with 0.  Otherwise, it exits with 1.
31
33
#
32
34
# The plan is that this can be called by configure scripts if you
33
 
# don't specify an explicit system type (host/target name).
34
 
#
35
 
# Only a few systems have been added to this list; please add others
36
 
# (but try to keep the structure clean).
37
 
#
38
 
 
39
 
# Use $HOST_CC if defined. $CC may point to a cross-compiler
40
 
if test x"$CC_FOR_BUILD" = x; then
41
 
  if test x"$HOST_CC" != x; then
42
 
    CC_FOR_BUILD="$HOST_CC"
43
 
  else
44
 
    if test x"$CC" != x; then
45
 
      CC_FOR_BUILD="$CC"
46
 
    else
47
 
      CC_FOR_BUILD=cc
48
 
    fi
49
 
  fi
 
35
# don't specify an explicit build system type.
 
36
 
 
37
me=`echo "$0" | sed -e 's,.*/,,'`
 
38
 
 
39
usage="\
 
40
Usage: $0 [OPTION]
 
41
 
 
42
Output the configuration name of the system \`$me' is run on.
 
43
 
 
44
Operation modes:
 
45
  -h, --help         print this help, then exit
 
46
  -t, --time-stamp   print date of last modification, then exit
 
47
  -v, --version      print version number, then exit
 
48
 
 
49
Report bugs and patches to <config-patches@gnu.org>."
 
50
 
 
51
version="\
 
52
GNU config.guess ($timestamp)
 
53
 
 
54
Originally written by Per Bothner.
 
55
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 
56
Free Software Foundation, Inc.
 
57
 
 
58
This is free software; see the source for copying conditions.  There is NO
 
59
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 
60
 
 
61
help="
 
62
Try \`$me --help' for more information."
 
63
 
 
64
# Parse command line
 
65
while test $# -gt 0 ; do
 
66
  case $1 in
 
67
    --time-stamp | --time* | -t )
 
68
       echo "$timestamp" ; exit 0 ;;
 
69
    --version | -v )
 
70
       echo "$version" ; exit 0 ;;
 
71
    --help | --h* | -h )
 
72
       echo "$usage"; exit 0 ;;
 
73
    -- )     # Stop option processing
 
74
       shift; break ;;
 
75
    - ) # Use stdin as input.
 
76
       break ;;
 
77
    -* )
 
78
       echo "$me: invalid option $1$help" >&2
 
79
       exit 1 ;;
 
80
    * )
 
81
       break ;;
 
82
  esac
 
83
done
 
84
 
 
85
if test $# != 0; then
 
86
  echo "$me: too many arguments$help" >&2
 
87
  exit 1
50
88
fi
51
89
 
52
90
 
 
91
dummy=dummy-$$
 
92
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
 
93
 
 
94
# CC_FOR_BUILD -- compiler used by this script.
 
95
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 
96
# use `HOST_CC' if defined, but it is deprecated.
 
97
 
 
98
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
 
99
 ,,)    echo "int dummy(){}" > $dummy.c ;
 
100
        for c in cc gcc c89 ; do
 
101
          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
 
102
          if test $? = 0 ; then
 
103
             CC_FOR_BUILD="$c"; break ;
 
104
          fi ;
 
105
        done ;
 
106
        rm -f $dummy.c $dummy.o $dummy.rel ;
 
107
        if test x"$CC_FOR_BUILD" = x ; then
 
108
          CC_FOR_BUILD=no_compiler_found ;
 
109
        fi
 
110
        ;;
 
111
 ,,*)   CC_FOR_BUILD=$CC ;;
 
112
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
 
113
esac'
 
114
 
53
115
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
54
 
# (ghazi@noc.rutgers.edu 8/24/94.)
 
116
# (ghazi@noc.rutgers.edu 1994-08-24)
55
117
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
56
118
        PATH=$PATH:/.attbin ; export PATH
57
119
fi
58
120
 
59
121
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
60
122
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
61
 
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 
123
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
62
124
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
63
125
 
64
 
dummy=dummy-$$
65
 
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
66
 
 
67
126
# Note: order is significant - the case branches are not exclusive.
68
127
 
69
128
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
77
136
        # object file format.
78
137
        # Determine the machine/vendor (is the vendor relevant).
79
138
        case "${UNAME_MACHINE}" in
80
 
            amiga) machine=m68k-cbm ;;
 
139
            amiga) machine=m68k-unknown ;;
81
140
            arm32) machine=arm-unknown ;;
82
141
            atari*) machine=m68k-atari ;;
83
142
            sun3*) machine=m68k-sun ;;
87
146
            ibmrt|romp-ibm) machine=romp-ibm ;;
88
147
            *) machine=${UNAME_MACHINE}-unknown ;;
89
148
        esac
90
 
        # The Operating System including object format.
91
 
        if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
92
 
                | grep __ELF__ >/dev/null
93
 
        then
94
 
            # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
95
 
            # Return netbsd for either.  FIX?
96
 
            os=netbsd
97
 
        else
98
 
            os=netbsdelf
99
 
        fi
 
149
        # The Operating System including object format, if it has switched
 
150
        # to ELF recently, or will in the future.
 
151
        case "${UNAME_MACHINE}" in
 
152
            i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
 
153
                eval $set_cc_for_build
 
154
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 
155
                        | grep __ELF__ >/dev/null
 
156
                then
 
157
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 
158
                    # Return netbsd for either.  FIX?
 
159
                    os=netbsd
 
160
                else
 
161
                    os=netbsdelf
 
162
                fi
 
163
                ;;
 
164
            *)
 
165
                os=netbsd
 
166
                ;;
 
167
        esac
100
168
        # The OS release
101
169
        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
102
170
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
137
205
        jsr \$26,exit
138
206
        .end main
139
207
EOF
 
208
        eval $set_cc_for_build
140
209
        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
141
210
        if test "$?" = 0 ; then
142
211
                case `./$dummy` in
173
242
        echo alpha-dec-winnt3.5
174
243
        exit 0 ;;
175
244
    Amiga*:UNIX_System_V:4.0:*)
176
 
        echo m68k-cbm-sysv4
 
245
        echo m68k-unknown-sysv4
177
246
        exit 0;;
178
247
    amiga:OpenBSD:*:*)
179
248
        echo m68k-unknown-openbsd${UNAME_RELEASE}
205
274
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
206
275
        echo arm-acorn-riscix${UNAME_RELEASE}
207
276
        exit 0;;
208
 
    SR2?01:HI-UX/MPP:*:*)
 
277
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
209
278
        echo hppa1.1-hitachi-hiuxmpp
210
279
        exit 0;;
211
280
    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
339
408
          exit (-1);
340
409
        }
341
410
EOF
 
411
        eval $set_cc_for_build
342
412
        $CC_FOR_BUILD $dummy.c -o $dummy \
343
413
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
344
 
          && rm $dummy.c $dummy && exit 0
 
414
          && rm -f $dummy.c $dummy && exit 0
345
415
        rm -f $dummy.c $dummy
346
416
        echo mips-mips-riscos${UNAME_RELEASE}
347
417
        exit 0 ;;
 
418
    Motorola:PowerMAX_OS:*:*)
 
419
        echo powerpc-motorola-powermax
 
420
        exit 0 ;;
348
421
    Night_Hawk:Power_UNIX:*:*)
349
422
        echo powerpc-harris-powerunix
350
423
        exit 0 ;;
392
465
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
393
466
        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
394
467
        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
395
 
    i?86:AIX:*:*)
 
468
    i*86:AIX:*:*)
396
469
        echo i386-ibm-aix
397
470
        exit 0 ;;
 
471
    ia64:AIX:*:*)
 
472
        if [ -x /usr/bin/oslevel ] ; then
 
473
                IBM_REV=`/usr/bin/oslevel`
 
474
        else
 
475
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 
476
        fi
 
477
        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
 
478
        exit 0 ;;
398
479
    *:AIX:2:3)
399
480
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
400
481
                sed 's/^                //' << EOF >$dummy.c
408
489
                        exit(0);
409
490
                        }
410
491
EOF
411
 
                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
 
492
                eval $set_cc_for_build
 
493
                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
412
494
                rm -f $dummy.c $dummy
413
495
                echo rs6000-ibm-aix3.2.5
414
496
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
417
499
                echo rs6000-ibm-aix3.2
418
500
        fi
419
501
        exit 0 ;;
420
 
    *:AIX:*:4)
 
502
    *:AIX:*:[45])
421
503
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
422
 
        if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
 
504
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
423
505
                IBM_ARCH=rs6000
424
506
        else
425
507
                IBM_ARCH=powerpc
427
509
        if [ -x /usr/bin/oslevel ] ; then
428
510
                IBM_REV=`/usr/bin/oslevel`
429
511
        else
430
 
                IBM_REV=4.${UNAME_RELEASE}
 
512
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
431
513
        fi
432
514
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
433
515
        exit 0 ;;
453
535
        echo m68k-hp-bsd4.4
454
536
        exit 0 ;;
455
537
    9000/[34678]??:HP-UX:*:*)
 
538
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
456
539
        case "${UNAME_MACHINE}" in
457
540
            9000/31? )            HP_ARCH=m68000 ;;
458
541
            9000/[34]?? )         HP_ARCH=m68k ;;
459
542
            9000/[678][0-9][0-9])
 
543
              case "${HPUX_REV}" in
 
544
                11.[0-9][0-9])
 
545
                  if [ -x /usr/bin/getconf ]; then
 
546
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 
547
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
 
548
                    case "${sc_cpu_version}" in
 
549
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
 
550
                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
 
551
                      532)                      # CPU_PA_RISC2_0
 
552
                        case "${sc_kernel_bits}" in
 
553
                          32) HP_ARCH="hppa2.0n" ;;
 
554
                          64) HP_ARCH="hppa2.0w" ;;
 
555
                        esac ;;
 
556
                    esac
 
557
                  fi ;;
 
558
              esac
 
559
              if [ "${HP_ARCH}" = "" ]; then
460
560
              sed 's/^              //' << EOF >$dummy.c
461
561
 
462
562
              #define _HPUX_SOURCE
490
590
                  exit (0);
491
591
              }
492
592
EOF
 
593
        eval $set_cc_for_build
493
594
        (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
 
595
        if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
494
596
        rm -f $dummy.c $dummy
 
597
        fi ;;
495
598
        esac
496
 
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
497
599
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
498
600
        exit 0 ;;
 
601
    ia64:HP-UX:*:*)
 
602
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 
603
        echo ia64-hp-hpux${HPUX_REV}
 
604
        exit 0 ;;
499
605
    3050*:HI-UX:*:*)
500
606
        sed 's/^        //' << EOF >$dummy.c
501
607
        #include <unistd.h>
522
628
          exit (0);
523
629
        }
524
630
EOF
525
 
        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
 
631
        eval $set_cc_for_build
 
632
        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
526
633
        rm -f $dummy.c $dummy
527
634
        echo unknown-hitachi-hiuxwe2
528
635
        exit 0 ;;
541
648
    hp8??:OSF1:*:*)
542
649
        echo hppa1.0-hp-osf
543
650
        exit 0 ;;
544
 
    i?86:OSF1:*:*)
 
651
    i*86:OSF1:*:*)
545
652
        if [ -x /usr/sbin/sysversion ] ; then
546
653
            echo ${UNAME_MACHINE}-unknown-osf1mk
547
654
        else
586
693
    CRAY*TS:*:*:*)
587
694
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
588
695
        exit 0 ;;
 
696
    CRAY*T3D:*:*:*)
 
697
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
698
        exit 0 ;;
589
699
    CRAY*T3E:*:*:*)
590
 
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
700
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
591
701
        exit 0 ;;
592
702
    CRAY*SV1:*:*:*)
593
703
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
595
705
    CRAY-2:*:*:*)
596
706
        echo cray2-cray-unicos
597
707
        exit 0 ;;
598
 
    F300:UNIX_System_V:*:*)
 
708
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 
709
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
599
710
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
600
711
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
601
 
        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 
712
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
602
713
        exit 0 ;;
603
 
    F301:UNIX_System_V:*:*)
604
 
       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
605
 
       exit 0 ;;
606
714
    hp300:OpenBSD:*:*)
607
715
        echo m68k-unknown-openbsd${UNAME_RELEASE}
608
716
        exit 0 ;;
609
 
    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 
717
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
610
718
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
611
719
        exit 0 ;;
612
720
    sparc*:BSD/OS:*:*)
627
735
    i*:MINGW*:*)
628
736
        echo ${UNAME_MACHINE}-pc-mingw32
629
737
        exit 0 ;;
 
738
    i*:PW*:*)
 
739
        echo ${UNAME_MACHINE}-pc-pw32
 
740
        exit 0 ;;
630
741
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
631
742
        # How do we know it's Interix rather than the generic POSIX subsystem?
632
743
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
645
756
    *:GNU:*:*)
646
757
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
647
758
        exit 0 ;;
648
 
    *:Linux:*:*)
649
 
 
 
759
    i*86:Minix:*:*)
 
760
        echo ${UNAME_MACHINE}-pc-minix
 
761
        exit 0 ;;
 
762
    arm*:Linux:*:*)
 
763
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
764
        exit 0 ;;
 
765
    ia64:Linux:*:*)
 
766
        echo ${UNAME_MACHINE}-unknown-linux
 
767
        exit 0 ;;
 
768
    m68*:Linux:*:*)
 
769
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
770
        exit 0 ;;
 
771
    mips:Linux:*:*)
 
772
        case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
 
773
          big)    echo mips-unknown-linux-gnu && exit 0 ;;
 
774
          little) echo mipsel-unknown-linux-gnu && exit 0 ;;
 
775
        esac
 
776
        ;;
 
777
    ppc:Linux:*:*)
 
778
        echo powerpc-unknown-linux-gnu
 
779
        exit 0 ;;
 
780
    alpha:Linux:*:*)
 
781
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 
782
          EV5)   UNAME_MACHINE=alphaev5 ;;
 
783
          EV56)  UNAME_MACHINE=alphaev56 ;;
 
784
          PCA56) UNAME_MACHINE=alphapca56 ;;
 
785
          PCA57) UNAME_MACHINE=alphapca56 ;;
 
786
          EV6)   UNAME_MACHINE=alphaev6 ;;
 
787
          EV67)  UNAME_MACHINE=alphaev67 ;;
 
788
          EV68*) UNAME_MACHINE=alphaev67 ;;
 
789
        esac
 
790
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 
791
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 
792
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
793
        exit 0 ;;
 
794
    parisc:Linux:*:* | hppa:Linux:*:*)
 
795
        # Look for CPU level
 
796
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
 
797
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
 
798
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
 
799
          *)    echo hppa-unknown-linux-gnu ;;
 
800
        esac
 
801
        exit 0 ;;
 
802
    parisc64:Linux:*:* | hppa64:Linux:*:*)
 
803
        echo hppa64-unknown-linux-gnu
 
804
        exit 0 ;;
 
805
    s390:Linux:*:* | s390x:Linux:*:*)
 
806
        echo ${UNAME_MACHINE}-ibm-linux
 
807
        exit 0 ;;
 
808
    sh*:Linux:*:*)
 
809
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
810
        exit 0 ;;
 
811
    sparc:Linux:*:* | sparc64:Linux:*:*)
 
812
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
813
        exit 0 ;;
 
814
    x86_64:Linux:*:*)
 
815
        echo x86_64-unknown-linux-gnu
 
816
        exit 0 ;;
 
817
    i*86:Linux:*:*)
650
818
        # The BFD linker knows what the default object file format is, so
651
819
        # first see if it will tell us. cd to the root directory to prevent
652
820
        # problems with other programs or directories called `ld' in the path.
653
 
        ld_help_string=`cd /; ld --help 2>&1`
654
 
        ld_supported_emulations=`echo $ld_help_string \
655
 
                         | sed -ne '/supported emulations:/!d
 
821
        ld_supported_targets=`cd /; ld --help 2>&1 \
 
822
                         | sed -ne '/supported targets:/!d
656
823
                                    s/[         ][      ]*/ /g
657
 
                                    s/.*supported emulations: *//
 
824
                                    s/.*supported targets: *//
658
825
                                    s/ .*//
659
826
                                    p'`
660
 
        case "$ld_supported_emulations" in
661
 
          *ia64)
662
 
                echo "${UNAME_MACHINE}-unknown-linux"
663
 
                exit 0
 
827
        case "$ld_supported_targets" in
 
828
          elf32-i386)
 
829
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
664
830
                ;;
665
 
          i?86linux)
 
831
          a.out-i386-linux)
666
832
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
667
 
                exit 0
668
 
                ;;
669
 
          elf_i?86)
670
 
                echo "${UNAME_MACHINE}-pc-linux"
671
 
                exit 0
672
 
                ;;
673
 
          i?86coff)
 
833
                exit 0 ;;               
 
834
          coff-i386)
674
835
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
675
 
                exit 0
676
 
                ;;
677
 
          sparclinux)
678
 
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
679
 
                exit 0
680
 
                ;;
681
 
          armlinux)
682
 
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
683
 
                exit 0
684
 
                ;;
685
 
          elf32arm*)
686
 
                echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
687
 
                exit 0
688
 
                ;;
689
 
          armelf_linux*)
690
 
                echo "${UNAME_MACHINE}-unknown-linux-gnu"
691
 
                exit 0
692
 
                ;;
693
 
          m68klinux)
694
 
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
695
 
                exit 0
696
 
                ;;
697
 
          elf32ppc | elf32ppclinux)
698
 
                # Determine Lib Version
699
 
                cat >$dummy.c <<EOF
700
 
#include <features.h>
701
 
#if defined(__GLIBC__)
702
 
extern char __libc_version[];
703
 
extern char __libc_release[];
704
 
#endif
705
 
main(argc, argv)
706
 
     int argc;
707
 
     char *argv[];
708
 
{
709
 
#if defined(__GLIBC__)
710
 
  printf("%s %s\n", __libc_version, __libc_release);
711
 
#else
712
 
  printf("unkown\n");
713
 
#endif
714
 
  return 0;
715
 
}
716
 
EOF
717
 
                LIBC=""
718
 
                $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
719
 
                if test "$?" = 0 ; then
720
 
                        ./$dummy | grep 1\.99 > /dev/null
721
 
                        if test "$?" = 0 ; then
722
 
                                LIBC="libc1"
723
 
                        fi
724
 
                fi
725
 
                rm -f $dummy.c $dummy
726
 
                echo powerpc-unknown-linux-gnu${LIBC}
727
 
                exit 0
728
 
                ;;
 
836
                exit 0 ;;
 
837
          "")
 
838
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
 
839
                # one that does not give us useful --help.
 
840
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
 
841
                exit 0 ;;
729
842
        esac
730
 
 
731
 
        if test "${UNAME_MACHINE}" = "alpha" ; then
732
 
                cat <<EOF >$dummy.s
733
 
                        .data
734
 
                \$Lformat:
735
 
                        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
736
 
 
737
 
                        .text
738
 
                        .globl main
739
 
                        .align 4
740
 
                        .ent main
741
 
                main:
742
 
                        .frame \$30,16,\$26,0
743
 
                        ldgp \$29,0(\$27)
744
 
                        .prologue 1
745
 
                        .long 0x47e03d80 # implver \$0
746
 
                        lda \$2,-1
747
 
                        .long 0x47e20c21 # amask \$2,\$1
748
 
                        lda \$16,\$Lformat
749
 
                        mov \$0,\$17
750
 
                        not \$1,\$18
751
 
                        jsr \$26,printf
752
 
                        ldgp \$29,0(\$26)
753
 
                        mov 0,\$16
754
 
                        jsr \$26,exit
755
 
                        .end main
756
 
EOF
757
 
                LIBC=""
758
 
                $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
759
 
                if test "$?" = 0 ; then
760
 
                        case `./$dummy` in
761
 
                        0-0)
762
 
                                UNAME_MACHINE="alpha"
763
 
                                ;;
764
 
                        1-0)
765
 
                                UNAME_MACHINE="alphaev5"
766
 
                                ;;
767
 
                        1-1)
768
 
                                UNAME_MACHINE="alphaev56"
769
 
                                ;;
770
 
                        1-101)
771
 
                                UNAME_MACHINE="alphapca56"
772
 
                                ;;
773
 
                        2-303)
774
 
                                UNAME_MACHINE="alphaev6"
775
 
                                ;;
776
 
                        2-307)
777
 
                                UNAME_MACHINE="alphaev67"
778
 
                                ;;
779
 
                        esac
780
 
 
781
 
                        objdump --private-headers $dummy | \
782
 
                          grep ld.so.1 > /dev/null
783
 
                        if test "$?" = 0 ; then
784
 
                                LIBC="libc1"
785
 
                        fi
786
 
                fi
787
 
                rm -f $dummy.s $dummy
788
 
                echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
789
 
        elif test "${UNAME_MACHINE}" = "mips" ; then
790
 
          cat >$dummy.c <<EOF
791
 
#ifdef __cplusplus
792
 
#include <stdio.h>  /* for printf() prototype */
793
 
        int main (int argc, char *argv[]) {
794
 
#else
795
 
        int main (argc, argv) int argc; char *argv[]; {
796
 
#endif
797
 
#ifdef __MIPSEB__
798
 
  printf ("%s-unknown-linux-gnu\n", argv[1]);
799
 
#endif
800
 
#ifdef __MIPSEL__
801
 
  printf ("%sel-unknown-linux-gnu\n", argv[1]);
802
 
#endif
803
 
  return 0;
804
 
}
805
 
EOF
806
 
          $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
807
 
          rm -f $dummy.c $dummy
808
 
        elif test "${UNAME_MACHINE}" = "s390"; then
809
 
          echo s390-ibm-linux && exit 0
810
 
        else
811
 
          # Either a pre-BFD a.out linker (linux-gnuoldld)
812
 
          # or one that does not give us useful --help.
813
 
          # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
814
 
          # If ld does not provide *any* "supported emulations:"
815
 
          # that means it is gnuoldld.
816
 
          echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
817
 
          test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
818
 
 
819
 
          case "${UNAME_MACHINE}" in
820
 
          i?86)
821
 
            VENDOR=pc;
822
 
            ;;
823
 
          *)
824
 
            VENDOR=unknown;
825
 
            ;;
826
 
          esac
827
 
          # Determine whether the default compiler is a.out or elf
828
 
          cat >$dummy.c <<EOF
 
843
        # Determine whether the default compiler is a.out or elf
 
844
        cat >$dummy.c <<EOF
829
845
#include <features.h>
830
846
#ifdef __cplusplus
831
847
#include <stdio.h>  /* for printf() prototype */
836
852
#ifdef __ELF__
837
853
# ifdef __GLIBC__
838
854
#  if __GLIBC__ >= 2
839
 
    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
 
855
    printf ("%s-pc-linux-gnu\n", argv[1]);
840
856
#  else
841
 
    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
 
857
    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
842
858
#  endif
843
859
# else
844
 
   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
 
860
   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
845
861
# endif
846
862
#else
847
 
  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
 
863
  printf ("%s-pc-linux-gnuaout\n", argv[1]);
848
864
#endif
849
865
  return 0;
850
866
}
851
867
EOF
852
 
          $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
853
 
          rm -f $dummy.c $dummy
854
 
        fi ;;
855
 
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
856
 
# are messed up and put the nodename in both sysname and nodename.
857
 
    i?86:DYNIX/ptx:4*:*)
 
868
        eval $set_cc_for_build
 
869
        $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
 
870
        rm -f $dummy.c $dummy
 
871
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 
872
        ;;
 
873
    i*86:DYNIX/ptx:4*:*)
 
874
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 
875
        # earlier versions are messed up and put the nodename in both
 
876
        # sysname and nodename.
858
877
        echo i386-sequent-sysv4
859
878
        exit 0 ;;
860
 
    i?86:UNIX_SV:4.2MP:2.*)
 
879
    i*86:UNIX_SV:4.2MP:2.*)
861
880
        # Unixware is an offshoot of SVR4, but it has its own version
862
881
        # number series starting with 2...
863
882
        # I am not positive that other SVR4 systems won't match this,
865
884
        # Use sysv4.2uw... so that sysv4* matches it.
866
885
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
867
886
        exit 0 ;;
868
 
    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
 
887
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
869
888
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
870
889
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
871
890
                echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
873
892
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
874
893
        fi
875
894
        exit 0 ;;
876
 
    i?86:*:5:7*)
877
 
        # Fixed at (any) Pentium or better
878
 
        UNAME_MACHINE=i586
879
 
        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
880
 
            echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
881
 
        else
882
 
            echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
883
 
        fi
 
895
    i*86:*:5:[78]*)
 
896
        case `/bin/uname -X | grep "^Machine"` in
 
897
            *486*)           UNAME_MACHINE=i486 ;;
 
898
            *Pentium)        UNAME_MACHINE=i586 ;;
 
899
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 
900
        esac
 
901
        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
884
902
        exit 0 ;;
885
 
    i?86:*:3.2:*)
 
903
    i*86:*:3.2:*)
886
904
        if test -f /usr/options/cb.name; then
887
905
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
888
906
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
900
918
                echo ${UNAME_MACHINE}-pc-sysv32
901
919
        fi
902
920
        exit 0 ;;
903
 
    i?86:*DOS:*:*)
 
921
    i*86:*DOS:*:*)
904
922
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
905
923
        exit 0 ;;
906
924
    pc:*:*:*)
928
946
        exit 0 ;;
929
947
    M68*:*:R3V[567]*:*)
930
948
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
931
 
    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
 
949
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
932
950
        OS_REL=''
933
951
        test -r /etc/.relid \
934
952
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
939
957
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
940
958
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
941
959
          && echo i486-ncr-sysv4 && exit 0 ;;
942
 
    m68*:LynxOS:2.*:*)
 
960
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
943
961
        echo m68k-unknown-lynxos${UNAME_RELEASE}
944
962
        exit 0 ;;
945
963
    mc68030:UNIX_System_V:4.*:*)
946
964
        echo m68k-atari-sysv4
947
965
        exit 0 ;;
948
 
    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
 
966
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
949
967
        echo i386-unknown-lynxos${UNAME_RELEASE}
950
968
        exit 0 ;;
951
969
    TSUNAMI:LynxOS:2.*:*)
952
970
        echo sparc-unknown-lynxos${UNAME_RELEASE}
953
971
        exit 0 ;;
954
 
    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
 
972
    rs6000:LynxOS:2.*:*)
955
973
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
956
974
        exit 0 ;;
 
975
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 
976
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
 
977
        exit 0 ;;
957
978
    SM[BE]S:UNIX_SV:*:*)
958
979
        echo mips-dde-sysv${UNAME_RELEASE}
959
980
        exit 0 ;;
987
1008
    mc68*:A/UX:*:*)
988
1009
        echo m68k-apple-aux${UNAME_RELEASE}
989
1010
        exit 0 ;;
990
 
    news*:NEWS-OS:*:6*)
 
1011
    news*:NEWS-OS:6*:*)
991
1012
        echo mips-sony-newsos6
992
1013
        exit 0 ;;
993
1014
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1030
1051
    *:QNX:*:4*)
1031
1052
        echo i386-pc-qnx
1032
1053
        exit 0 ;;
1033
 
    NSR-W:NONSTOP_KERNEL:*:*)
 
1054
    NSR-[KW]:NONSTOP_KERNEL:*:*)
1034
1055
        echo nsr-tandem-nsk${UNAME_RELEASE}
1035
1056
        exit 0 ;;
 
1057
    *:NonStop-UX:*:*)
 
1058
        echo mips-compaq-nonstopux
 
1059
        exit 0 ;;
1036
1060
    BS2000:POSIX*:*:*)
1037
1061
        echo bs2000-siemens-sysv
1038
1062
        exit 0 ;;
1039
1063
    DS/*:UNIX_System_V:*:*)
1040
1064
        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1041
1065
        exit 0 ;;
 
1066
    *:Plan9:*:*)
 
1067
        # "uname -m" is not consistent, so use $cputype instead. 386
 
1068
        # is converted to i386 for consistency with other x86
 
1069
        # operating systems.
 
1070
        if test "$cputype" = "386"; then
 
1071
            UNAME_MACHINE=i386
 
1072
        else
 
1073
            UNAME_MACHINE="$cputype"
 
1074
        fi
 
1075
        echo ${UNAME_MACHINE}-unknown-plan9
 
1076
        exit 0 ;;
 
1077
    i*86:OS/2:*:*)
 
1078
        # If we were able to find `uname', then EMX Unix compatibility
 
1079
        # is probably installed.
 
1080
        echo ${UNAME_MACHINE}-pc-os2-emx
 
1081
        exit 0 ;;
 
1082
    *:TOPS-10:*:*)
 
1083
        echo pdp10-unknown-tops10
 
1084
        exit 0 ;;
 
1085
    *:TENEX:*:*)
 
1086
        echo pdp10-unknown-tenex
 
1087
        exit 0 ;;
 
1088
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 
1089
        echo pdp10-dec-tops20
 
1090
        exit 0 ;;
 
1091
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 
1092
        echo pdp10-xkl-tops20
 
1093
        exit 0 ;;
 
1094
    *:TOPS-20:*:*)
 
1095
        echo pdp10-unknown-tops20
 
1096
        exit 0 ;;
 
1097
    *:ITS:*:*)
 
1098
        echo pdp10-unknown-its
 
1099
        exit 0 ;;
1042
1100
esac
1043
1101
 
1044
1102
#echo '(No uname command or uname output not recognized.)' 1>&2
1130
1188
#endif
1131
1189
 
1132
1190
#if defined (vax)
1133
 
#if !defined (ultrix)
1134
 
  printf ("vax-dec-bsd\n"); exit (0);
1135
 
#else
1136
 
  printf ("vax-dec-ultrix\n"); exit (0);
1137
 
#endif
 
1191
# if !defined (ultrix)
 
1192
#  include <sys/param.h>
 
1193
#  if defined (BSD)
 
1194
#   if BSD == 43
 
1195
      printf ("vax-dec-bsd4.3\n"); exit (0);
 
1196
#   else
 
1197
#    if BSD == 199006
 
1198
      printf ("vax-dec-bsd4.3reno\n"); exit (0);
 
1199
#    else
 
1200
      printf ("vax-dec-bsd\n"); exit (0);
 
1201
#    endif
 
1202
#   endif
 
1203
#  else
 
1204
    printf ("vax-dec-bsd\n"); exit (0);
 
1205
#  endif
 
1206
# else
 
1207
    printf ("vax-dec-ultrix\n"); exit (0);
 
1208
# endif
1138
1209
#endif
1139
1210
 
1140
1211
#if defined (alliant) && defined (i860)
1145
1216
}
1146
1217
EOF
1147
1218
 
1148
 
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
 
1219
eval $set_cc_for_build
 
1220
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1149
1221
rm -f $dummy.c $dummy
1150
1222
 
1151
1223
# Apollos put the system type in the environment.
1178
1250
    esac
1179
1251
fi
1180
1252
 
1181
 
#echo '(Unable to guess system type)' 1>&2
 
1253
cat >&2 <<EOF
 
1254
$0: unable to guess system type
 
1255
 
 
1256
This script, last modified $timestamp, has failed to recognize
 
1257
the operating system you are using. It is advised that you
 
1258
download the most up to date version of the config scripts from
 
1259
 
 
1260
    ftp://ftp.gnu.org/pub/gnu/config/
 
1261
 
 
1262
If the version you run ($0) is already up to date, please
 
1263
send the following data and any information you think might be
 
1264
pertinent to <config-patches@gnu.org> in order to provide the needed
 
1265
information to handle your system.
 
1266
 
 
1267
config.guess timestamp = $timestamp
 
1268
 
 
1269
uname -m = `(uname -m) 2>/dev/null || echo unknown`
 
1270
uname -r = `(uname -r) 2>/dev/null || echo unknown`
 
1271
uname -s = `(uname -s) 2>/dev/null || echo unknown`
 
1272
uname -v = `(uname -v) 2>/dev/null || echo unknown`
 
1273
 
 
1274
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
 
1275
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
 
1276
 
 
1277
hostinfo               = `(hostinfo) 2>/dev/null`
 
1278
/bin/universe          = `(/bin/universe) 2>/dev/null`
 
1279
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
 
1280
/bin/arch              = `(/bin/arch) 2>/dev/null`
 
1281
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
 
1282
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
 
1283
 
 
1284
UNAME_MACHINE = ${UNAME_MACHINE}
 
1285
UNAME_RELEASE = ${UNAME_RELEASE}
 
1286
UNAME_SYSTEM  = ${UNAME_SYSTEM}
 
1287
UNAME_VERSION = ${UNAME_VERSION}
 
1288
EOF
1182
1289
 
1183
1290
exit 1
 
1291
 
 
1292
# Local variables:
 
1293
# eval: (add-hook 'write-file-hooks 'time-stamp)
 
1294
# time-stamp-start: "timestamp='"
 
1295
# time-stamp-format: "%:y-%02m-%02d"
 
1296
# time-stamp-end: "'"
 
1297
# End: