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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [testbench/] [config.sub] - Blame information for rev 224

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

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

powered by: WebSVN 2.1.0

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