~ubuntu-branches/debian/sid/x11-apps/sid

« back to all changes in this revision

Viewing changes to xedit/config.guess

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2015-04-30 23:57:18 UTC
  • Revision ID: package-import@ubuntu.com-20150430235718-gm4akh8letheag2v
Tags: 7.7+5
* bitmap 1.0.8.
* x11perf 1.6.0.
* xcalc 1.0.6.
* xditview 1.0.4.
* xedit 1.2.2.
* xgc 1.0.5.
* xmag 1.0.6.
* xman 1.1.4.
* Remove cpp from Depends (closes: #778804).
* Bump debhelper compat level to 9.

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,
4
 
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
 
#   2011 Free Software Foundation, Inc.
 
3
#   Copyright 1992-2014 Free Software Foundation, Inc.
6
4
 
7
 
timestamp='2011-11-11'
 
5
timestamp='2014-02-12'
8
6
 
9
7
# This file is free software; you can redistribute it and/or modify it
10
8
# under the terms of the GNU General Public License as published by
11
 
# the Free Software Foundation; either version 2 of the License, or
 
9
# the Free Software Foundation; either version 3 of the License, or
12
10
# (at your option) any later version.
13
11
#
14
12
# This program is distributed in the hope that it will be useful, but
17
15
# General Public License for more details.
18
16
#
19
17
# You should have received a copy of the GNU General Public License
20
 
# along with this program; if not, write to the Free Software
21
 
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
 
# 02110-1301, USA.
 
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
23
19
#
24
20
# As a special exception to the GNU General Public License, if you
25
21
# distribute this file as part of a program that contains a
26
22
# configuration script generated by Autoconf, you may include it under
27
 
# the same distribution terms that you use for the rest of that program.
28
 
 
29
 
 
30
 
# Originally written by Per Bothner.  Please send patches (context
31
 
# diff format) to <config-patches@gnu.org> and include a ChangeLog
32
 
# entry.
 
23
# the same distribution terms that you use for the rest of that
 
24
# program.  This Exception is an additional permission under section 7
 
25
# of the GNU General Public License, version 3 ("GPLv3").
33
26
#
34
 
# This script attempts to guess a canonical system name similar to
35
 
# config.sub.  If it succeeds, it prints the system name on stdout, and
36
 
# exits with 0.  Otherwise, it exits with 1.
 
27
# Originally written by Per Bothner.
37
28
#
38
29
# You can get the latest version of this script from:
39
30
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
31
#
 
32
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
 
33
 
40
34
 
41
35
me=`echo "$0" | sed -e 's,.*/,,'`
42
36
 
56
50
GNU config.guess ($timestamp)
57
51
 
58
52
Originally written by Per Bothner.
59
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
60
 
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
61
 
Software Foundation, Inc.
 
53
Copyright 1992-2014 Free Software Foundation, Inc.
62
54
 
63
55
This is free software; see the source for copying conditions.  There is NO
64
56
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
140
132
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
141
133
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142
134
 
 
135
case "${UNAME_SYSTEM}" in
 
136
Linux|GNU|GNU/*)
 
137
        # If the system lacks a compiler, then just pick glibc.
 
138
        # We could probably try harder.
 
139
        LIBC=gnu
 
140
 
 
141
        eval $set_cc_for_build
 
142
        cat <<-EOF > $dummy.c
 
143
        #include <features.h>
 
144
        #if defined(__UCLIBC__)
 
145
        LIBC=uclibc
 
146
        #elif defined(__dietlibc__)
 
147
        LIBC=dietlibc
 
148
        #else
 
149
        LIBC=gnu
 
150
        #endif
 
151
        EOF
 
152
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
 
153
        ;;
 
154
esac
 
155
 
143
156
# Note: order is significant - the case branches are not exclusive.
144
157
 
145
158
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146
159
    *:NetBSD:*:*)
147
160
        # NetBSD (nbsd) targets should (where applicable) match one or
148
 
        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
 
161
        # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
149
162
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
150
163
        # switched to ELF, *-*-netbsd* would select the old
151
164
        # object file format.  This provides both forward
202
215
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203
216
        echo "${machine}-${os}${release}"
204
217
        exit ;;
 
218
    *:Bitrig:*:*)
 
219
        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
 
220
        echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
 
221
        exit ;;
205
222
    *:OpenBSD:*:*)
206
223
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207
224
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
304
321
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
305
322
        echo arm-acorn-riscix${UNAME_RELEASE}
306
323
        exit ;;
307
 
    arm:riscos:*:*|arm:RISCOS:*:*)
 
324
    arm*:riscos:*:*|arm*:RISCOS:*:*)
308
325
        echo arm-unknown-riscos
309
326
        exit ;;
310
327
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
803
820
    i*:CYGWIN*:*)
804
821
        echo ${UNAME_MACHINE}-pc-cygwin
805
822
        exit ;;
 
823
    *:MINGW64*:*)
 
824
        echo ${UNAME_MACHINE}-pc-mingw64
 
825
        exit ;;
806
826
    *:MINGW*:*)
807
827
        echo ${UNAME_MACHINE}-pc-mingw32
808
828
        exit ;;
854
874
        exit ;;
855
875
    *:GNU:*:*)
856
876
        # the GNU system
857
 
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 
877
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
858
878
        exit ;;
859
879
    *:GNU/*:*:*)
860
880
        # other systems with GNU libc and userland
861
 
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 
881
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
862
882
        exit ;;
863
883
    i*86:Minix:*:*)
864
884
        echo ${UNAME_MACHINE}-pc-minix
865
885
        exit ;;
 
886
    aarch64:Linux:*:*)
 
887
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
888
        exit ;;
 
889
    aarch64_be:Linux:*:*)
 
890
        UNAME_MACHINE=aarch64_be
 
891
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
892
        exit ;;
866
893
    alpha:Linux:*:*)
867
894
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
868
895
          EV5)   UNAME_MACHINE=alphaev5 ;;
874
901
          EV68*) UNAME_MACHINE=alphaev68 ;;
875
902
        esac
876
903
        objdump --private-headers /bin/sh | grep -q ld.so.1
877
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
878
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
904
        if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
 
905
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
906
        exit ;;
 
907
    arc:Linux:*:* | arceb:Linux:*:*)
 
908
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
879
909
        exit ;;
880
910
    arm*:Linux:*:*)
881
911
        eval $set_cc_for_build
882
912
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
883
913
            | grep -q __ARM_EABI__
884
914
        then
885
 
            echo ${UNAME_MACHINE}-unknown-linux-gnu
 
915
            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
886
916
        else
887
917
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
888
918
                | grep -q __ARM_PCS_VFP
889
919
            then
890
 
                echo ${UNAME_MACHINE}-unknown-linux-gnueabi
 
920
                echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
891
921
            else
892
 
                echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
 
922
                echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
893
923
            fi
894
924
        fi
895
925
        exit ;;
896
926
    avr32*:Linux:*:*)
897
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
927
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
898
928
        exit ;;
899
929
    cris:Linux:*:*)
900
 
        echo cris-axis-linux-gnu
 
930
        echo ${UNAME_MACHINE}-axis-linux-${LIBC}
901
931
        exit ;;
902
932
    crisv32:Linux:*:*)
903
 
        echo crisv32-axis-linux-gnu
 
933
        echo ${UNAME_MACHINE}-axis-linux-${LIBC}
904
934
        exit ;;
905
935
    frv:Linux:*:*)
906
 
        echo frv-unknown-linux-gnu
 
936
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
907
937
        exit ;;
908
938
    hexagon:Linux:*:*)
909
 
        echo hexagon-unknown-linux-gnu
 
939
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
910
940
        exit ;;
911
941
    i*86:Linux:*:*)
912
 
        LIBC=gnu
913
 
        eval $set_cc_for_build
914
 
        sed 's/^        //' << EOF >$dummy.c
915
 
        #ifdef __dietlibc__
916
 
        LIBC=dietlibc
917
 
        #endif
918
 
EOF
919
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
920
 
        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
 
942
        echo ${UNAME_MACHINE}-pc-linux-${LIBC}
921
943
        exit ;;
922
944
    ia64:Linux:*:*)
923
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
945
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
924
946
        exit ;;
925
947
    m32r*:Linux:*:*)
926
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
948
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
927
949
        exit ;;
928
950
    m68*:Linux:*:*)
929
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
951
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
930
952
        exit ;;
931
953
    mips:Linux:*:* | mips64:Linux:*:*)
932
954
        eval $set_cc_for_build
945
967
        #endif
946
968
EOF
947
969
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
948
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
970
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
949
971
        ;;
 
972
    or1k:Linux:*:*)
 
973
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
974
        exit ;;
950
975
    or32:Linux:*:*)
951
 
        echo or32-unknown-linux-gnu
 
976
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952
977
        exit ;;
953
978
    padre:Linux:*:*)
954
 
        echo sparc-unknown-linux-gnu
 
979
        echo sparc-unknown-linux-${LIBC}
955
980
        exit ;;
956
981
    parisc64:Linux:*:* | hppa64:Linux:*:*)
957
 
        echo hppa64-unknown-linux-gnu
 
982
        echo hppa64-unknown-linux-${LIBC}
958
983
        exit ;;
959
984
    parisc:Linux:*:* | hppa:Linux:*:*)
960
985
        # Look for CPU level
961
986
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
962
 
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
963
 
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
964
 
          *)    echo hppa-unknown-linux-gnu ;;
 
987
          PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
 
988
          PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
 
989
          *)    echo hppa-unknown-linux-${LIBC} ;;
965
990
        esac
966
991
        exit ;;
967
992
    ppc64:Linux:*:*)
968
 
        echo powerpc64-unknown-linux-gnu
 
993
        echo powerpc64-unknown-linux-${LIBC}
969
994
        exit ;;
970
995
    ppc:Linux:*:*)
971
 
        echo powerpc-unknown-linux-gnu
 
996
        echo powerpc-unknown-linux-${LIBC}
 
997
        exit ;;
 
998
    ppc64le:Linux:*:*)
 
999
        echo powerpc64le-unknown-linux-${LIBC}
 
1000
        exit ;;
 
1001
    ppcle:Linux:*:*)
 
1002
        echo powerpcle-unknown-linux-${LIBC}
972
1003
        exit ;;
973
1004
    s390:Linux:*:* | s390x:Linux:*:*)
974
 
        echo ${UNAME_MACHINE}-ibm-linux
 
1005
        echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
975
1006
        exit ;;
976
1007
    sh64*:Linux:*:*)
977
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
1008
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
978
1009
        exit ;;
979
1010
    sh*:Linux:*:*)
980
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
1011
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
981
1012
        exit ;;
982
1013
    sparc:Linux:*:* | sparc64:Linux:*:*)
983
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
1014
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
984
1015
        exit ;;
985
1016
    tile*:Linux:*:*)
986
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
1017
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
987
1018
        exit ;;
988
1019
    vax:Linux:*:*)
989
 
        echo ${UNAME_MACHINE}-dec-linux-gnu
 
1020
        echo ${UNAME_MACHINE}-dec-linux-${LIBC}
990
1021
        exit ;;
991
1022
    x86_64:Linux:*:*)
992
 
        echo x86_64-unknown-linux-gnu
 
1023
        eval $set_cc_for_build
 
1024
        X86_64_ABI=
 
1025
        # If there is a compiler, see if it is configured for 32-bit objects.
 
1026
        if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
 
1027
            if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
 
1028
                (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
 
1029
                grep IS_X32 >/dev/null
 
1030
            then
 
1031
                X86_64_ABI=x32
 
1032
            fi
 
1033
        fi
 
1034
        echo x86_64-unknown-linux-gnu${X86_64_ABI}
993
1035
        exit ;;
994
1036
    xtensa*:Linux:*:*)
995
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
1037
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
996
1038
        exit ;;
997
1039
    i*86:DYNIX/ptx:4*:*)
998
1040
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1196
1238
    BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
1197
1239
        echo i586-pc-haiku
1198
1240
        exit ;;
 
1241
    x86_64:Haiku:*:*)
 
1242
        echo x86_64-unknown-haiku
 
1243
        exit ;;
1199
1244
    SX-4:SUPER-UX:*:*)
1200
1245
        echo sx4-nec-superux${UNAME_RELEASE}
1201
1246
        exit ;;
1222
1267
        exit ;;
1223
1268
    *:Darwin:*:*)
1224
1269
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1225
 
        case $UNAME_PROCESSOR in
1226
 
            i386)
1227
 
                eval $set_cc_for_build
1228
 
                if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1229
 
                  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1230
 
                      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1231
 
                      grep IS_64BIT_ARCH >/dev/null
1232
 
                  then
1233
 
                      UNAME_PROCESSOR="x86_64"
1234
 
                  fi
1235
 
                fi ;;
1236
 
            unknown) UNAME_PROCESSOR=powerpc ;;
1237
 
        esac
 
1270
        eval $set_cc_for_build
 
1271
        if test "$UNAME_PROCESSOR" = unknown ; then
 
1272
            UNAME_PROCESSOR=powerpc
 
1273
        fi
 
1274
        if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
 
1275
            if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
 
1276
                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
 
1277
                    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
 
1278
                    grep IS_64BIT_ARCH >/dev/null
 
1279
                then
 
1280
                    case $UNAME_PROCESSOR in
 
1281
                        i386) UNAME_PROCESSOR=x86_64 ;;
 
1282
                        powerpc) UNAME_PROCESSOR=powerpc64 ;;
 
1283
                    esac
 
1284
                fi
 
1285
            fi
 
1286
        elif test "$UNAME_PROCESSOR" = i386 ; then
 
1287
            # Avoid executing cc on OS X 10.9, as it ships with a stub
 
1288
            # that puts up a graphical alert prompting to install
 
1289
            # developer tools.  Any system running Mac OS X 10.7 or
 
1290
            # later (Darwin 11 and later) is required to have a 64-bit
 
1291
            # processor. This is not true of the ARM version of Darwin
 
1292
            # that Apple uses in portable devices.
 
1293
            UNAME_PROCESSOR=x86_64
 
1294
        fi
1238
1295
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1239
1296
        exit ;;
1240
1297
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1251
1308
    NEO-?:NONSTOP_KERNEL:*:*)
1252
1309
        echo neo-tandem-nsk${UNAME_RELEASE}
1253
1310
        exit ;;
1254
 
    NSE-?:NONSTOP_KERNEL:*:*)
 
1311
    NSE-*:NONSTOP_KERNEL:*:*)
1255
1312
        echo nse-tandem-nsk${UNAME_RELEASE}
1256
1313
        exit ;;
1257
1314
    NSR-?:NONSTOP_KERNEL:*:*)
1320
1377
    i*86:AROS:*:*)
1321
1378
        echo ${UNAME_MACHINE}-pc-aros
1322
1379
        exit ;;
 
1380
    x86_64:VMkernel:*:*)
 
1381
        echo ${UNAME_MACHINE}-unknown-esx
 
1382
        exit ;;
1323
1383
esac
1324
1384
 
1325
 
#echo '(No uname command or uname output not recognized.)' 1>&2
1326
 
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1327
 
 
1328
 
eval $set_cc_for_build
1329
 
cat >$dummy.c <<EOF
1330
 
#ifdef _SEQUENT_
1331
 
# include <sys/types.h>
1332
 
# include <sys/utsname.h>
1333
 
#endif
1334
 
main ()
1335
 
{
1336
 
#if defined (sony)
1337
 
#if defined (MIPSEB)
1338
 
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1339
 
     I don't know....  */
1340
 
  printf ("mips-sony-bsd\n"); exit (0);
1341
 
#else
1342
 
#include <sys/param.h>
1343
 
  printf ("m68k-sony-newsos%s\n",
1344
 
#ifdef NEWSOS4
1345
 
        "4"
1346
 
#else
1347
 
        ""
1348
 
#endif
1349
 
        ); exit (0);
1350
 
#endif
1351
 
#endif
1352
 
 
1353
 
#if defined (__arm) && defined (__acorn) && defined (__unix)
1354
 
  printf ("arm-acorn-riscix\n"); exit (0);
1355
 
#endif
1356
 
 
1357
 
#if defined (hp300) && !defined (hpux)
1358
 
  printf ("m68k-hp-bsd\n"); exit (0);
1359
 
#endif
1360
 
 
1361
 
#if defined (NeXT)
1362
 
#if !defined (__ARCHITECTURE__)
1363
 
#define __ARCHITECTURE__ "m68k"
1364
 
#endif
1365
 
  int version;
1366
 
  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1367
 
  if (version < 4)
1368
 
    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1369
 
  else
1370
 
    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1371
 
  exit (0);
1372
 
#endif
1373
 
 
1374
 
#if defined (MULTIMAX) || defined (n16)
1375
 
#if defined (UMAXV)
1376
 
  printf ("ns32k-encore-sysv\n"); exit (0);
1377
 
#else
1378
 
#if defined (CMU)
1379
 
  printf ("ns32k-encore-mach\n"); exit (0);
1380
 
#else
1381
 
  printf ("ns32k-encore-bsd\n"); exit (0);
1382
 
#endif
1383
 
#endif
1384
 
#endif
1385
 
 
1386
 
#if defined (__386BSD__)
1387
 
  printf ("i386-pc-bsd\n"); exit (0);
1388
 
#endif
1389
 
 
1390
 
#if defined (sequent)
1391
 
#if defined (i386)
1392
 
  printf ("i386-sequent-dynix\n"); exit (0);
1393
 
#endif
1394
 
#if defined (ns32000)
1395
 
  printf ("ns32k-sequent-dynix\n"); exit (0);
1396
 
#endif
1397
 
#endif
1398
 
 
1399
 
#if defined (_SEQUENT_)
1400
 
    struct utsname un;
1401
 
 
1402
 
    uname(&un);
1403
 
 
1404
 
    if (strncmp(un.version, "V2", 2) == 0) {
1405
 
        printf ("i386-sequent-ptx2\n"); exit (0);
1406
 
    }
1407
 
    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1408
 
        printf ("i386-sequent-ptx1\n"); exit (0);
1409
 
    }
1410
 
    printf ("i386-sequent-ptx\n"); exit (0);
1411
 
 
1412
 
#endif
1413
 
 
1414
 
#if defined (vax)
1415
 
# if !defined (ultrix)
1416
 
#  include <sys/param.h>
1417
 
#  if defined (BSD)
1418
 
#   if BSD == 43
1419
 
      printf ("vax-dec-bsd4.3\n"); exit (0);
1420
 
#   else
1421
 
#    if BSD == 199006
1422
 
      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1423
 
#    else
1424
 
      printf ("vax-dec-bsd\n"); exit (0);
1425
 
#    endif
1426
 
#   endif
1427
 
#  else
1428
 
    printf ("vax-dec-bsd\n"); exit (0);
1429
 
#  endif
1430
 
# else
1431
 
    printf ("vax-dec-ultrix\n"); exit (0);
1432
 
# endif
1433
 
#endif
1434
 
 
1435
 
#if defined (alliant) && defined (i860)
1436
 
  printf ("i860-alliant-bsd\n"); exit (0);
1437
 
#endif
1438
 
 
1439
 
  exit (1);
1440
 
}
1441
 
EOF
1442
 
 
1443
 
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1444
 
        { echo "$SYSTEM_NAME"; exit; }
1445
 
 
1446
 
# Apollos put the system type in the environment.
1447
 
 
1448
 
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1449
 
 
1450
 
# Convex versions that predate uname can use getsysinfo(1)
1451
 
 
1452
 
if [ -x /usr/convex/getsysinfo ]
1453
 
then
1454
 
    case `getsysinfo -f cpu_type` in
1455
 
    c1*)
1456
 
        echo c1-convex-bsd
1457
 
        exit ;;
1458
 
    c2*)
1459
 
        if getsysinfo -f scalar_acc
1460
 
        then echo c32-convex-bsd
1461
 
        else echo c2-convex-bsd
1462
 
        fi
1463
 
        exit ;;
1464
 
    c34*)
1465
 
        echo c34-convex-bsd
1466
 
        exit ;;
1467
 
    c38*)
1468
 
        echo c38-convex-bsd
1469
 
        exit ;;
1470
 
    c4*)
1471
 
        echo c4-convex-bsd
1472
 
        exit ;;
1473
 
    esac
1474
 
fi
1475
 
 
1476
1385
cat >&2 <<EOF
1477
1386
$0: unable to guess system type
1478
1387