OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [first/] [mp3/] [sw/] [mad-xess/] [config.sub] - Blame information for rev 1780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 266 lampret
#! /bin/sh
2
# Configuration validation subroutine script, version 1.1.
3
#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
4
# This file is (in principle) common to ALL GNU software.
5
# The presence of a machine in this file suggests that SOME GNU software
6
# can handle that machine.  It does not imply ALL GNU software can.
7
#
8
# This file is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
12
#
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 59 Temple Place - Suite 330,
21
# Boston, MA 02111-1307, USA.
22
 
23
# As a special exception to the GNU General Public License, if you
24
# distribute this file as part of a program that contains a
25
# configuration script generated by Autoconf, you may include it under
26
# the same distribution terms that you use for the rest of that program.
27
 
28
# Configuration subroutine to validate and canonicalize a configuration type.
29
# Supply the specified configuration type as an argument.
30
# If it is invalid, we print an error message on stderr and exit with code 1.
31
# Otherwise, we print the canonical config type on stdout and succeed.
32
 
33
# This file is supposed to be the same for all GNU packages
34
# and recognize all the CPU types, system types and aliases
35
# that are meaningful with *any* GNU software.
36
# Each package is responsible for reporting which valid configurations
37
# it does not support.  The user should be able to distinguish
38
# a failure to support a valid configuration from a meaningless
39
# configuration.
40
 
41
# The goal of this file is to map all the various variations of a given
42
# machine specification into a single specification in the form:
43
#       CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
44
# or in some cases, the newer four-part form:
45
#       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46
# It is wrong to echo any other type of specification.
47
 
48
if [ x$1 = x ]
49
then
50
        echo Configuration name missing. 1>&2
51
        echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
52
        echo "or     $0 ALIAS" 1>&2
53
        echo where ALIAS is a recognized configuration type. 1>&2
54
        exit 1
55
fi
56
 
57
# First pass through any local machine types.
58
case $1 in
59
        *local*)
60
                echo $1
61
                exit 0
62
                ;;
63
        *)
64
        ;;
65
esac
66
 
67
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
68
# Here we must recognize all the valid KERNEL-OS combinations.
69
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
70
case $maybe_os in
71
  linux-gnu*)
72
    os=-$maybe_os
73
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
74
    ;;
75
  *)
76
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
77
    if [ $basic_machine != $1 ]
78
    then os=`echo $1 | sed 's/.*-/-/'`
79
    else os=; fi
80
    ;;
81
esac
82
 
83
### Let's recognize common machines as not being operating systems so
84
### that things like config.sub decstation-3100 work.  We also
85
### recognize some manufacturers as not being operating systems, so we
86
### can provide default operating systems below.
87
case $os in
88
        -sun*os*)
89
                # Prevent following clause from handling this invalid input.
90
                ;;
91
        -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
92
        -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
93
        -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
94
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
95
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
96
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
97
        -apple | -or32 | -or16)
98
                os=
99
                basic_machine=$1
100
                ;;
101
        -sim | -cisco | -oki | -wec | -winbond )        # EGCS LOCAL
102
                os=
103
                basic_machine=$1
104
                ;;
105
        -scout)                                         # EGCS LOCAL
106
                ;;
107
        -wrs)                                           # EGCS LOCAL
108
                os=-vxworks
109
                basic_machine=$1
110
                ;;
111
        -hiux*)
112
                os=-hiuxwe2
113
                ;;
114
        -sco5)
115
                os=-sco3.2v5
116
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
117
                ;;
118
        -sco4)
119
                os=-sco3.2v4
120
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
121
                ;;
122
        -sco3.2.[4-9]*)
123
                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
124
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
125
                ;;
126
        -sco3.2v[4-9]*)
127
                # Don't forget version if it is 3.2v4 or newer.
128
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
129
                ;;
130
        -sco*)
131
                os=-sco3.2v2
132
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
133
                ;;
134
        -udk*)
135
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
136
                ;;
137
        -isc)
138
                os=-isc2.2
139
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
140
                ;;
141
        -clix*)
142
                basic_machine=clipper-intergraph
143
                ;;
144
        -isc*)
145
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
146
                ;;
147
        -lynx*)
148
                os=-lynxos
149
                ;;
150
        -ptx*)
151
                basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
152
                ;;
153
        -windowsnt*)
154
                os=`echo $os | sed -e 's/windowsnt/winnt/'`
155
                ;;
156
        -psos*)
157
                os=-psos
158
                ;;
159
esac
160
 
161
# Decode aliases for certain CPU-COMPANY combinations.
162
case $basic_machine in
163
        # Recognize the basic CPU types without company name.
164
        # Some are omitted here because they have special meanings below.
165
        tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
166
                | arme[lb] | pyramid | mn10200 | mn10300 \
167
                | tron | a29k | 580 | i960 | h8300 \
168
                | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
169
                | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
170
                | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
171
                | 1750a | dsp16xx | pdp11 \
172
                | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
173
                | mipstx39 | mipstx39el \
174
                | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
175
                | or32 | or16)
176
                basic_machine=$basic_machine-unknown
177
                ;;
178
        m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
179
                | h8500 | w65) # EGCS LOCAL
180
                ;;
181
        thumb)
182
                basic_machine=$basic_machine-unknown
183
                ;;
184
        mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
185
                basic_machine=$basic_machine-unknown
186
                ;;
187
        mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
188
                basic_machine=$basic_machine-unknown
189
                ;;
190
        mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
191
                basic_machine=$basic_machine-unknown
192
                ;;
193
        mips16)
194
                basic_machine=$basic_machine-unknown
195
                ;;
196
        d10v)
197
                basic_machine=$basic_machine-unknown
198
                ;;
199
        # We use `pc' rather than `unknown'
200
        # because (1) that's what they normally are, and
201
        # (2) the word "unknown" tends to confuse beginning users.
202
        i[34567]86)
203
          basic_machine=$basic_machine-pc
204
          ;;
205
        # Object if more than one company name word.
206
        *-*-*)
207
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
208
                exit 1
209
                ;;
210
        # Recognize the basic CPU types with company name.
211
        vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
212
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
213
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
214
              | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
215
              | xmp-* | ymp-* \
216
              | hppa-* | hppa1.0-* | hppa1.1-* \
217
              | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
218
              | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
219
              | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
220
              | xps100-* | clipper-* | orion-* \
221
              | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
222
              | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
223
              | mips64el-* | mips64orion-* | mips64orionel-*  \
224
              | mipstx39-* | mipstx39el-* \
225
              | f301-* | arm*-*)
226
                ;;
227
        m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
228
                ;;
229
        thumb-*) # EGCS LOCAL angela/thumb
230
                ;;
231
        v850-*) # EGCS LOCAL
232
                ;;
233
        d30v-*) # EGCS LOCAL
234
                ;;
235
        mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
236
                ;;
237
        mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
238
                ;;
239
        mips16-*) # EGCS LOCAL krk/mips16
240
                ;;
241
        tic30-*) # EGCS LOCAL ian/tic30
242
                ;;
243
        c30-*) # EGCS LOCAL ian/tic30
244
                basic_machine=tic30-unknown
245
                ;;
246
        # Recognize the various machine names and aliases which stand
247
        # for a CPU type and a company and sometimes even an OS.
248
        386bsd)                                         # EGCS LOCAL
249
                basic_machine=i386-unknown
250
                os=-bsd
251
                ;;
252
        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
253
                basic_machine=m68000-att
254
                ;;
255
        3b*)
256
                basic_machine=we32k-att
257
                ;;
258
        a29khif)                                        # EGCS LOCAL
259
                basic_machine=a29k-amd
260
                os=-udi
261
                ;;
262
        adobe68k)                                       # EGCS LOCAL
263
                basic_machine=m68010-adobe
264
                os=-scout
265
                ;;
266
        alliant | fx80)
267
                basic_machine=fx80-alliant
268
                ;;
269
        altos | altos3068)
270
                basic_machine=m68k-altos
271
                ;;
272
        am29k)
273
                basic_machine=a29k-none
274
                os=-bsd
275
                ;;
276
        amdahl)
277
                basic_machine=580-amdahl
278
                os=-sysv
279
                ;;
280
        amiga | amiga-*)
281
                basic_machine=m68k-cbm
282
                ;;
283
        amigaos | amigados)
284
                basic_machine=m68k-cbm
285
                os=-amigaos
286
                ;;
287
        amigaunix | amix)
288
                basic_machine=m68k-cbm
289
                os=-sysv4
290
                ;;
291
        apollo68)
292
                basic_machine=m68k-apollo
293
                os=-sysv
294
                ;;
295
        apollo68bsd)                                    # EGCS LOCAL
296
                basic_machine=m68k-apollo
297
                os=-bsd
298
                ;;
299
        aux)
300
                basic_machine=m68k-apple
301
                os=-aux
302
                ;;
303
        balance)
304
                basic_machine=ns32k-sequent
305
                os=-dynix
306
                ;;
307
        convex-c1)
308
                basic_machine=c1-convex
309
                os=-bsd
310
                ;;
311
        convex-c2)
312
                basic_machine=c2-convex
313
                os=-bsd
314
                ;;
315
        convex-c32)
316
                basic_machine=c32-convex
317
                os=-bsd
318
                ;;
319
        convex-c34)
320
                basic_machine=c34-convex
321
                os=-bsd
322
                ;;
323
        convex-c38)
324
                basic_machine=c38-convex
325
                os=-bsd
326
                ;;
327
        cray | ymp)
328
                basic_machine=ymp-cray
329
                os=-unicos
330
                ;;
331
        cray2)
332
                basic_machine=cray2-cray
333
                os=-unicos
334
                ;;
335
        [ctj]90-cray)
336
                basic_machine=c90-cray
337
                os=-unicos
338
                ;;
339
        crds | unos)
340
                basic_machine=m68k-crds
341
                ;;
342
        da30 | da30-*)
343
                basic_machine=m68k-da30
344
                ;;
345
        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
346
                basic_machine=mips-dec
347
                ;;
348
        delta | 3300 | motorola-3300 | motorola-delta \
349
              | 3300-motorola | delta-motorola)
350
                basic_machine=m68k-motorola
351
                ;;
352
        delta88)
353
                basic_machine=m88k-motorola
354
                os=-sysv3
355
                ;;
356
        dpx20 | dpx20-*)
357
                basic_machine=rs6000-bull
358
                os=-bosx
359
                ;;
360
        dpx2* | dpx2*-bull)
361
                basic_machine=m68k-bull
362
                os=-sysv3
363
                ;;
364
        ebmon29k)
365
                basic_machine=a29k-amd
366
                os=-ebmon
367
                ;;
368
        elxsi)
369
                basic_machine=elxsi-elxsi
370
                os=-bsd
371
                ;;
372
        encore | umax | mmax)
373
                basic_machine=ns32k-encore
374
                ;;
375
        es1800 | OSE68k | ose68k | ose | OSE)           # EGCS LOCAL
376
                basic_machine=m68k-ericsson
377
                os=-ose
378
                ;;
379
        fx2800)
380
                basic_machine=i860-alliant
381
                ;;
382
        genix)
383
                basic_machine=ns32k-ns
384
                ;;
385
        gmicro)
386
                basic_machine=tron-gmicro
387
                os=-sysv
388
                ;;
389
        h3050r* | hiux*)
390
                basic_machine=hppa1.1-hitachi
391
                os=-hiuxwe2
392
                ;;
393
        h8300hms)
394
                basic_machine=h8300-hitachi
395
                os=-hms
396
                ;;
397
        h8300xray)                                      # EGCS LOCAL
398
                basic_machine=h8300-hitachi
399
                os=-xray
400
                ;;
401
        h8500hms)                                       # EGCS LOCAL
402
                basic_machine=h8500-hitachi
403
                os=-hms
404
                ;;
405
        harris)
406
                basic_machine=m88k-harris
407
                os=-sysv3
408
                ;;
409
        hp300-*)
410
                basic_machine=m68k-hp
411
                ;;
412
        hp300bsd)
413
                basic_machine=m68k-hp
414
                os=-bsd
415
                ;;
416
        hp300hpux)
417
                basic_machine=m68k-hp
418
                os=-hpux
419
                ;;
420
        w89k-*)                                         # EGCS LOCAL
421
                basic_machine=hppa1.1-winbond
422
                os=-proelf
423
                ;;
424
        op50n-*)                                        # EGCS LOCAL
425
                basic_machine=hppa1.1-oki
426
                os=-proelf
427
                ;;
428
        op60c-*)                                        # EGCS LOCAL
429
                basic_machine=hppa1.1-oki
430
                os=-proelf
431
                ;;
432
        hppro)                                          # EGCS LOCAL
433
                basic_machine=hppa1.1-hp
434
                os=-proelf
435
                ;;
436
        hp3k9[0-9][0-9] | hp9[0-9][0-9])
437
                basic_machine=hppa1.0-hp
438
                ;;
439
        hp9k2[0-9][0-9] | hp9k31[0-9])
440
                basic_machine=m68000-hp
441
                ;;
442
        hp9k3[2-9][0-9])
443
                basic_machine=m68k-hp
444
                ;;
445
        hp9k6[0-9][0-9] | hp6[0-9][0-9] )
446
                basic_machine=hppa1.0-hp
447
                ;;
448
        hp9k7[0-79][0-9] | hp7[0-79][0-9] )
449
                basic_machine=hppa1.1-hp
450
                ;;
451
        hp9k78[0-9] | hp78[0-9] )
452
                # FIXME: really hppa2.0-hp
453
                basic_machine=hppa1.1-hp
454
                ;;
455
        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
456
        hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
457
                # FIXME: really hppa2.0-hp
458
                basic_machine=hppa1.1-hp
459
                ;;
460
        hp9k8[0-9][13679] | hp8[0-9][13679] )
461
                basic_machine=hppa1.1-hp
462
                ;;
463
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
464
                basic_machine=hppa1.0-hp
465
                ;;
466
        hppa-next)
467
                os=-nextstep3
468
                ;;
469
        hppaosf)                                        # EGCS LOCAL
470
                basic_machine=hppa1.1-hp
471
                os=-osf
472
                ;;
473
        i370-ibm* | ibm*)
474
                basic_machine=i370-ibm
475
                os=-mvs
476
                ;;
477
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
478
        i[34567]86v32)
479
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
480
                os=-sysv32
481
                ;;
482
        i[34567]86v4*)
483
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
484
                os=-sysv4
485
                ;;
486
        i[34567]86v)
487
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
488
                os=-sysv
489
                ;;
490
        i[34567]86sol2)
491
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
492
                os=-solaris2
493
                ;;
494
        i386mach)                                       # EGCS LOCAL
495
                basic_machine=i386-mach
496
                os=-mach
497
                ;;
498
        i386-vsta | vsta)                               # EGCS LOCAL
499
                basic_machine=i386-unknown
500
                os=-vsta
501
                ;;
502
        i386-go32 | go32)                               # EGCS LOCAL
503
                basic_machine=i386-unknown
504
                os=-go32
505
                ;;
506
        i386-mingw32 | mingw32)
507
                basic_machine=i386-unknown
508
                os=-mingw32
509
                ;;
510
        iris | iris4d)
511
                basic_machine=mips-sgi
512
                case $os in
513
                    -irix*)
514
                        ;;
515
                    *)
516
                        os=-irix4
517
                        ;;
518
                esac
519
                ;;
520
        isi68 | isi)
521
                basic_machine=m68k-isi
522
                os=-sysv
523
                ;;
524
        m88k-omron*)
525
                basic_machine=m88k-omron
526
                ;;
527
        magnum | m3230)
528
                basic_machine=mips-mips
529
                os=-sysv
530
                ;;
531
        merlin)
532
                basic_machine=ns32k-utek
533
                os=-sysv
534
                ;;
535
        miniframe)
536
                basic_machine=m68000-convergent
537
                ;;
538
        mipsel*-linux*)
539
                basic_machine=mipsel-unknown
540
                os=-linux-gnu
541
                ;;
542
        mips*-linux*)
543
                basic_machine=mips-unknown
544
                os=-linux-gnu
545
                ;;
546
        mips3*-*)
547
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
548
                ;;
549
        mips3*)
550
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
551
                ;;
552
        monitor)                                        # EGCS LOCAL
553
                basic_machine=m68k-rom68k
554
                os=-coff
555
                ;;
556
        msdos)                                          # EGCS LOCAL
557
                basic_machine=i386-unknown
558
                os=-msdos
559
                ;;
560
        ncr3000)
561
                basic_machine=i486-ncr
562
                os=-sysv4
563
                ;;
564
        netbsd386)
565
                basic_machine=i386-unknown              # EGCS LOCAL
566
                os=-netbsd
567
                ;;
568
        netwinder)
569
                basic_machine=armv4l-corel
570
                os=-linux
571
                ;;
572
        news | news700 | news800 | news900)
573
                basic_machine=m68k-sony
574
                os=-newsos
575
                ;;
576
        news1000)
577
                basic_machine=m68030-sony
578
                os=-newsos
579
                ;;
580
        news-3600 | risc-news)
581
                basic_machine=mips-sony
582
                os=-newsos
583
                ;;
584
        necv70)                                         # EGCS LOCAL
585
                basic_machine=v70-nec
586
                os=-sysv
587
                ;;
588
        next | m*-next )
589
                basic_machine=m68k-next
590
                case $os in
591
                    -nextstep* )
592
                        ;;
593
                    -ns2*)
594
                      os=-nextstep2
595
                        ;;
596
                    *)
597
                      os=-nextstep3
598
                        ;;
599
                esac
600
                ;;
601
        nh3000)
602
                basic_machine=m68k-harris
603
                os=-cxux
604
                ;;
605
        nh[45]000)
606
                basic_machine=m88k-harris
607
                os=-cxux
608
                ;;
609
        nindy960)
610
                basic_machine=i960-intel
611
                os=-nindy
612
                ;;
613
        mon960)                                         # EGCS LOCAL
614
                basic_machine=i960-intel
615
                os=-mon960
616
                ;;
617
        np1)
618
                basic_machine=np1-gould
619
                ;;
620
        OSE68000 | ose68000)                            # EGCS LOCAL
621
                basic_machine=m68000-ericsson
622
                os=-ose
623
                ;;
624
        os68k)                                          # EGCS LOCAL
625
                basic_machine=m68k-none
626
                os=-os68k
627
                ;;
628
        pa-hitachi)
629
                basic_machine=hppa1.1-hitachi
630
                os=-hiuxwe2
631
                ;;
632
        paragon)
633
                basic_machine=i860-intel
634
                os=-osf
635
                ;;
636
        pbd)
637
                basic_machine=sparc-tti
638
                ;;
639
        pbb)
640
                basic_machine=m68k-tti
641
                ;;
642
        pc532 | pc532-*)
643
                basic_machine=ns32k-pc532
644
                ;;
645
        pentium | p5 | k5 | k6 | nexen)
646
                basic_machine=i586-pc
647
                ;;
648
        pentiumpro | p6 | 6x86)
649
                basic_machine=i686-pc
650
                ;;
651
        pentiumii | pentium2)
652
                basic_machine=i786-pc
653
                ;;
654
        pentium-* | p5-* | k5-* | k6-* | nexen-*)
655
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
656
                ;;
657
        pentiumpro-* | p6-* | 6x86-*)
658
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
659
                ;;
660
        pentiumii-* | pentium2-*)
661
                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
662
                ;;
663
        pn)
664
                basic_machine=pn-gould
665
                ;;
666
        power)  basic_machine=rs6000-ibm
667
                ;;
668
        ppc)    basic_machine=powerpc-unknown
669
                ;;
670
        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
671
                ;;
672
        ppcle | powerpclittle | ppc-le | powerpc-little)
673
                basic_machine=powerpcle-unknown
674
                ;;
675
        ppcle-* | powerpclittle-*)
676
                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
677
                ;;
678
        ps2)
679
                basic_machine=i386-ibm
680
                ;;
681
        rom68k)                                         # EGCS LOCAL
682
                basic_machine=m68k-rom68k
683
                os=-coff
684
                ;;
685
        rm[46]00)
686
                basic_machine=mips-siemens
687
                ;;
688
        rtpc | rtpc-*)
689
                basic_machine=romp-ibm
690
                ;;
691
        sa29200)                                        # EGCS LOCAL
692
                basic_machine=a29k-amd
693
                os=-udi
694
                ;;
695
        sequent)
696
                basic_machine=i386-sequent
697
                ;;
698
        sh)
699
                basic_machine=sh-hitachi
700
                os=-hms
701
                ;;
702
        sparclite-wrs)                                  # EGCS LOCAL
703
                basic_machine=sparclite-wrs
704
                os=-vxworks
705
                ;;
706
        sps7)
707
                basic_machine=m68k-bull
708
                os=-sysv2
709
                ;;
710
        spur)
711
                basic_machine=spur-unknown
712
                ;;
713
        st2000)                                         # EGCS LOCAL
714
                basic_machine=m68k-tandem
715
                ;;
716
        stratus)                                        # EGCS LOCAL
717
                basic_machine=i860-stratus
718
                os=-sysv4
719
                ;;
720
        sun2)
721
                basic_machine=m68000-sun
722
                ;;
723
        sun2os3)
724
                basic_machine=m68000-sun
725
                os=-sunos3
726
                ;;
727
        sun2os4)
728
                basic_machine=m68000-sun
729
                os=-sunos4
730
                ;;
731
        sun3os3)
732
                basic_machine=m68k-sun
733
                os=-sunos3
734
                ;;
735
        sun3os4)
736
                basic_machine=m68k-sun
737
                os=-sunos4
738
                ;;
739
        sun4os3)
740
                basic_machine=sparc-sun
741
                os=-sunos3
742
                ;;
743
        sun4os4)
744
                basic_machine=sparc-sun
745
                os=-sunos4
746
                ;;
747
        sun4sol2)
748
                basic_machine=sparc-sun
749
                os=-solaris2
750
                ;;
751
        sun3 | sun3-*)
752
                basic_machine=m68k-sun
753
                ;;
754
        sun4)
755
                basic_machine=sparc-sun
756
                ;;
757
        sun386 | sun386i | roadrunner)
758
                basic_machine=i386-sun
759
                ;;
760
        symmetry)
761
                basic_machine=i386-sequent
762
                os=-dynix
763
                ;;
764
        tx39)
765
                basic_machine=mipstx39-unknown
766
                ;;
767
        tx39el)
768
                basic_machine=mipstx39el-unknown
769
                ;;
770
        tower | tower-32)
771
                basic_machine=m68k-ncr
772
                ;;
773
        udi29k)
774
                basic_machine=a29k-amd
775
                os=-udi
776
                ;;
777
        ultra3)
778
                basic_machine=a29k-nyu
779
                os=-sym1
780
                ;;
781
        v810 | necv810)                                 # EGCS LOCAL
782
                basic_machine=v810-nec
783
                os=-none
784
                ;;
785
        vaxv)
786
                basic_machine=vax-dec
787
                os=-sysv
788
                ;;
789
        vms)
790
                basic_machine=vax-dec
791
                os=-vms
792
                ;;
793
        vpp*|vx|vx-*)
794
               basic_machine=f301-fujitsu
795
               ;;
796
        vxworks960)
797
                basic_machine=i960-wrs
798
                os=-vxworks
799
                ;;
800
        vxworks68)
801
                basic_machine=m68k-wrs
802
                os=-vxworks
803
                ;;
804
        vxworks29k)
805
                basic_machine=a29k-wrs
806
                os=-vxworks
807
                ;;
808
        w65*)                                           # EGCS LOCAL
809
                basic_machine=w65-wdc
810
                os=-none
811
                ;;
812
        xmp)
813
                basic_machine=xmp-cray
814
                os=-unicos
815
                ;;
816
        xps | xps100)
817
                basic_machine=xps100-honeywell
818
                ;;
819
        z8k-*-coff)                                     # EGCS LOCAL
820
                basic_machine=z8k-unknown
821
                os=-sim
822
                ;;
823
        none)
824
                basic_machine=none-none
825
                os=-none
826
                ;;
827
 
828
# Here we handle the default manufacturer of certain CPU types.  It is in
829
# some cases the only manufacturer, in others, it is the most popular.
830
        w89k)                                           # EGCS LOCAL
831
                basic_machine=hppa1.1-winbond
832
                ;;
833
        op50n)                                          # EGCS LOCAL
834
                basic_machine=hppa1.1-oki
835
                ;;
836
        op60c)                                          # EGCS LOCAL
837
                basic_machine=hppa1.1-oki
838
                ;;
839
        mips)
840
                if [ x$os = x-linux-gnu ]; then
841
                        basic_machine=mips-unknown
842
                else
843
                        basic_machine=mips-mips
844
                fi
845
                ;;
846
        romp)
847
                basic_machine=romp-ibm
848
                ;;
849
        rs6000)
850
                basic_machine=rs6000-ibm
851
                ;;
852
        vax)
853
                basic_machine=vax-dec
854
                ;;
855
        pdp11)
856
                basic_machine=pdp11-dec
857
                ;;
858
        we32k)
859
                basic_machine=we32k-att
860
                ;;
861
        sparc | sparcv9)
862
                basic_machine=sparc-sun
863
                ;;
864
        cydra)
865
                basic_machine=cydra-cydrome
866
                ;;
867
        orion)
868
                basic_machine=orion-highlevel
869
                ;;
870
        orion105)
871
                basic_machine=clipper-highlevel
872
                ;;
873
        mac | mpw | mac-mpw)                            # EGCS LOCAL
874
                basic_machine=m68k-apple
875
                ;;
876
        pmac | pmac-mpw)                                # EGCS LOCAL
877
                basic_machine=powerpc-apple
878
                ;;
879
        c4x*)
880
                basic_machine=c4x-none
881
                os=-coff
882
                ;;
883
        *)
884
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
885
                exit 1
886
                ;;
887
esac
888
 
889
# Here we canonicalize certain aliases for manufacturers.
890
case $basic_machine in
891
        *-digital*)
892
                basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
893
                ;;
894
        *-commodore*)
895
                basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
896
                ;;
897
        *)
898
                ;;
899
esac
900
 
901
# Decode manufacturer-specific aliases for certain operating systems.
902
 
903
if [ x"$os" != x"" ]
904
then
905
case $os in
906
        # First match some system type aliases
907
        # that might get confused with valid system types.
908
        # -solaris* is a basic system type, with this one exception.
909
        -solaris1 | -solaris1.*)
910
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
911
                ;;
912
        -solaris)
913
                os=-solaris2
914
                ;;
915
        -svr4*)
916
                os=-sysv4
917
                ;;
918
        -unixware*)
919
                os=-sysv4.2uw
920
                ;;
921
        -gnu/linux*)
922
                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
923
                ;;
924
        # First accept the basic system types.
925
        # The portable systems comes first.
926
        # Each alternative MUST END IN A *, to match a version number.
927
        # -sysv* is not here because it comes later, after sysvr4.
928
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
929
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
930
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
931
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
932
              | -aos* \
933
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
934
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
935
              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
936
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
937
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
938
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
939
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
940
              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
941
              | -interix* | -uwin* )
942
        # Remember, each alternative MUST END IN *, to match a version number.
943
                ;;
944
        # EGCS LOCAL
945
        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
946
              | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
947
              | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
948
                ;;
949
        -mac*)
950
                os=`echo $os | sed -e 's|mac|macos|'`
951
                ;;
952
        # END EGCS LOCAL
953
        -linux*)
954
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
955
                ;;
956
        -sunos5*)
957
                os=`echo $os | sed -e 's|sunos5|solaris2|'`
958
                ;;
959
        -sunos6*)
960
                os=`echo $os | sed -e 's|sunos6|solaris3|'`
961
                ;;
962
        -osfrose*)
963
                os=-osfrose
964
                ;;
965
        -osf*)
966
                os=-osf
967
                ;;
968
        -utek*)
969
                os=-bsd
970
                ;;
971
        -dynix*)
972
                os=-bsd
973
                ;;
974
        -acis*)
975
                os=-aos
976
                ;;
977
        -386bsd)                                        # EGCS LOCAL
978
                os=-bsd
979
                ;;
980
        -ctix* | -uts*)
981
                os=-sysv
982
                ;;
983
        -ns2 )
984
                os=-nextstep2
985
                ;;
986
        # Preserve the version number of sinix5.
987
        -sinix5.*)
988
                os=`echo $os | sed -e 's|sinix|sysv|'`
989
                ;;
990
        -sinix*)
991
                os=-sysv4
992
                ;;
993
        -triton*)
994
                os=-sysv3
995
                ;;
996
        -oss*)
997
                os=-sysv3
998
                ;;
999
        -svr4)
1000
                os=-sysv4
1001
                ;;
1002
        -svr3)
1003
                os=-sysv3
1004
                ;;
1005
        -sysvr4)
1006
                os=-sysv4
1007
                ;;
1008
        # This must come after -sysvr4.
1009
        -sysv*)
1010
                ;;
1011
        -ose*)                                          # EGCS LOCAL
1012
                os=-ose
1013
                ;;
1014
        -es1800*)                                       # EGCS LOCAL
1015
                os=-ose
1016
                ;;
1017
        -xenix)
1018
                os=-xenix
1019
                ;;
1020
        -none)
1021
                ;;
1022
        *)
1023
                # Get rid of the `-' at the beginning of $os.
1024
                os=`echo $os | sed 's/[^-]*-//'`
1025
                echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1026
                exit 1
1027
                ;;
1028
esac
1029
else
1030
 
1031
# Here we handle the default operating systems that come with various machines.
1032
# The value should be what the vendor currently ships out the door with their
1033
# machine or put another way, the most popular os provided with the machine.
1034
 
1035
# Note that if you're going to try to match "-MANUFACTURER" here (say,
1036
# "-sun"), then you have to tell the case statement up towards the top
1037
# that MANUFACTURER isn't an operating system.  Otherwise, code above
1038
# will signal an error saying that MANUFACTURER isn't an operating
1039
# system, and we'll never get to this point.
1040
 
1041
case $basic_machine in
1042
        *-acorn)
1043
                os=-riscix1.2
1044
                ;;
1045
        arm*-corel)
1046
                os=-linux
1047
                ;;
1048
        arm*-semi)
1049
                os=-aout
1050
                ;;
1051
        pdp11-*)
1052
                os=-none
1053
                ;;
1054
        *-dec | vax-*)
1055
                os=-ultrix4.2
1056
                ;;
1057
        m68*-apollo)
1058
                os=-domain
1059
                ;;
1060
        i386-sun)
1061
                os=-sunos4.0.2
1062
                ;;
1063
        m68000-sun)
1064
                os=-sunos3
1065
                # This also exists in the configure program, but was not the
1066
                # default.
1067
                # os=-sunos4
1068
                ;;
1069
        m68*-cisco)                                     # EGCS LOCAL
1070
                os=-aout
1071
                ;;
1072
        mips*-cisco)                                    # EGCS LOCAL
1073
                os=-elf
1074
                ;;
1075
        mips*-*)                                        # EGCS LOCAL
1076
                os=-elf
1077
                ;;
1078
        *-tti)  # must be before sparc entry or we get the wrong os.
1079
                os=-sysv3
1080
                ;;
1081
        sparc-* | *-sun)
1082
                os=-sunos4.1.1
1083
                ;;
1084
        *-be)
1085
                os=-beos
1086
                ;;
1087
        *-ibm)
1088
                os=-aix
1089
                ;;
1090
        *-wec)                                          # EGCS LOCAL
1091
                os=-proelf
1092
                ;;
1093
        *-winbond)                                      # EGCS LOCAL
1094
                os=-proelf
1095
                ;;
1096
        *-oki)                                          # EGCS LOCAL
1097
                os=-proelf
1098
                ;;
1099
        *-hp)
1100
                os=-hpux
1101
                ;;
1102
        *-hitachi)
1103
                os=-hiux
1104
                ;;
1105
        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1106
                os=-sysv
1107
                ;;
1108
        *-cbm)
1109
                os=-amigaos
1110
                ;;
1111
        *-dg)
1112
                os=-dgux
1113
                ;;
1114
        *-dolphin)
1115
                os=-sysv3
1116
                ;;
1117
        m68k-ccur)
1118
                os=-rtu
1119
                ;;
1120
        m88k-omron*)
1121
                os=-luna
1122
                ;;
1123
        *-next )
1124
                os=-nextstep
1125
                ;;
1126
        *-sequent)
1127
                os=-ptx
1128
                ;;
1129
        *-crds)
1130
                os=-unos
1131
                ;;
1132
        *-ns)
1133
                os=-genix
1134
                ;;
1135
        i370-*)
1136
                os=-mvs
1137
                ;;
1138
        *-next)
1139
                os=-nextstep3
1140
                ;;
1141
        *-gould)
1142
                os=-sysv
1143
                ;;
1144
        *-highlevel)
1145
                os=-bsd
1146
                ;;
1147
        *-encore)
1148
                os=-bsd
1149
                ;;
1150
        *-sgi)
1151
                os=-irix
1152
                ;;
1153
        *-siemens)
1154
                os=-sysv4
1155
                ;;
1156
        *-masscomp)
1157
                os=-rtu
1158
                ;;
1159
        f301-fujitsu)
1160
                os=-uxpv
1161
                ;;
1162
        *-rom68k)                                       # EGCS LOCAL
1163
                os=-coff
1164
                ;;
1165
        *-*bug)                                         # EGCS LOCAL
1166
                os=-coff
1167
                ;;
1168
        *-apple)                                        # EGCS LOCAL
1169
                os=-macos
1170
                ;;
1171
        *)
1172
                os=-none
1173
                ;;
1174
esac
1175
fi
1176
 
1177
# Here we handle the case where we know the os, and the CPU type, but not the
1178
# manufacturer.  We pick the logical manufacturer.
1179
vendor=unknown
1180
case $basic_machine in
1181
        *-unknown)
1182
                case $os in
1183
                        -riscix*)
1184
                                vendor=acorn
1185
                                ;;
1186
                        -sunos*)
1187
                                vendor=sun
1188
                                ;;
1189
                        -aix*)
1190
                                vendor=ibm
1191
                                ;;
1192
                        -beos*)
1193
                                vendor=be
1194
                                ;;
1195
                        -hpux*)
1196
                                vendor=hp
1197
                                ;;
1198
                        -mpeix*)
1199
                                vendor=hp
1200
                                ;;
1201
                        -hiux*)
1202
                                vendor=hitachi
1203
                                ;;
1204
                        -unos*)
1205
                                vendor=crds
1206
                                ;;
1207
                        -dgux*)
1208
                                vendor=dg
1209
                                ;;
1210
                        -luna*)
1211
                                vendor=omron
1212
                                ;;
1213
                        -genix*)
1214
                                vendor=ns
1215
                                ;;
1216
                        -mvs*)
1217
                                vendor=ibm
1218
                                ;;
1219
                        -ptx*)
1220
                                vendor=sequent
1221
                                ;;
1222
                        -vxsim* | -vxworks*)
1223
                                vendor=wrs
1224
                                ;;
1225
                        -aux*)
1226
                                vendor=apple
1227
                                ;;
1228
                        -hms*)                          # EGCS LOCAL
1229
                                vendor=hitachi
1230
                                ;;
1231
                        -mpw* | -macos*)                # EGCS LOCAL
1232
                                vendor=apple
1233
                                ;;
1234
                esac
1235
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1236
                ;;
1237
esac
1238
 
1239
echo $basic_machine$os

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.