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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [or1ksim/] [config.sub] - Blame information for rev 1242

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

Line No. Rev Author Line
1 7 jrydberg
#! /bin/sh
2
# Configuration validation subroutine script, version 1.1.
3
#   Copyright (C) 1991, 92, 93, 94, 95, 1996 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 )
98
                os=
99
                basic_machine=$1
100
                ;;
101
        -hiux*)
102
                os=-hiuxwe2
103
                ;;
104
        -sco5)
105
                os=-sco3.2v5
106
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
107
                ;;
108
        -sco4)
109
                os=-sco3.2v4
110
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
111
                ;;
112
        -sco3.2.[4-9]*)
113
                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
114
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
115
                ;;
116
        -sco3.2v[4-9]*)
117
                # Don't forget version if it is 3.2v4 or newer.
118
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
119
                ;;
120
        -sco*)
121
                os=-sco3.2v2
122
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
123
                ;;
124
        -isc)
125
                os=-isc2.2
126
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
127
                ;;
128
        -clix*)
129
                basic_machine=clipper-intergraph
130
                ;;
131
        -isc*)
132
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
133
                ;;
134
        -lynx*)
135
                os=-lynxos
136
                ;;
137
        -ptx*)
138
                basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
139
                ;;
140
        -windowsnt*)
141
                os=`echo $os | sed -e 's/windowsnt/winnt/'`
142
                ;;
143
        -psos*)
144
                os=-psos
145
                ;;
146
esac
147
 
148
# Decode aliases for certain CPU-COMPANY combinations.
149
case $basic_machine in
150
        # Recognize the basic CPU types without company name.
151
        # Some are omitted here because they have special meanings below.
152
        tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
153
                | arme[lb] | pyramid \
154
                | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
155
                | hppa2.0 | alpha | we32k | ns16k | clipper | i370 | sh \
156
                | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
157
                | pdp11 | mips64el | mips64orion | mips64orionel \
158 397 markom
                | sparc | sparclet | sparclite | sparc64 | or32 | dlx)
159 7 jrydberg
                basic_machine=$basic_machine-unknown
160
                ;;
161
        # We use `pc' rather than `unknown'
162
        # because (1) that's what they normally are, and
163
        # (2) the word "unknown" tends to confuse beginning users.
164
        i[3456]86)
165
          basic_machine=$basic_machine-pc
166
          ;;
167
        # Object if more than one company name word.
168
        *-*-*)
169
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
170
                exit 1
171
                ;;
172
        # Recognize the basic CPU types with company name.
173
        vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
174
              | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
175
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
176
              | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
177
              | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
178
              | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* | alphaev6-* \
179
              | we32k-* | cydra-* | ns16k-* \
180
              | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
181
              | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
182
              | mips64el-* | mips64orion-* | mips64orionel-* | f301-* \
183
              | butterfly-bbn* \
184
              | cadmus-* | ews*-nec | ibmrt-ibm* | masscomp-masscomp \
185
              | tandem-* | symmetric-* | drs6000-icl | *-*ardent | gould-gould \
186
              | concurrent-* | ksr1-* | esa-ibm | fxc-alliant | *370-amdahl \
187
              | *-convex | sx4*-nec)
188
                ;;
189
        # Recognize the various machine names and aliases which stand
190
        # for a CPU type and a company and sometimes even an OS.
191
        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
192
                basic_machine=m68000-att
193
                ;;
194
        3b*)
195
                basic_machine=we32k-att
196
                ;;
197
        alliant | fx80)
198
                basic_machine=fx80-alliant
199
                ;;
200
        altos | altos3068)
201
                basic_machine=m68k-altos
202
                ;;
203
        am29k)
204
                basic_machine=a29k-none
205
                os=-bsd
206
                ;;
207
        amdahl)
208
                basic_machine=580-amdahl
209
                os=-sysv
210
                ;;
211
        amiga | amiga-*)
212
#               basic_machine=m68k-cbm
213
                basic_machine=m68k-unknown
214
                ;;
215
        amigaos)
216
                basic_machine=m68k-unknown
217
                os=-amigaos
218
                ;;
219
        amigados)
220
                basic_machine=m68k-cbm
221
                os=-amigados
222
                ;;
223
        amigaunix | amix)
224
                basic_machine=m68k-cbm
225
                os=-sysv4
226
                ;;
227
        apollo68)
228
                basic_machine=m68k-apollo
229
                os=-sysv
230
                ;;
231
        aux)
232
                basic_machine=m68k-apple
233
                os=-aux
234
                ;;
235
        balance)
236
                basic_machine=ns32k-sequent
237
                os=-dynix
238
                ;;
239
        convex-c1)
240
                basic_machine=c1-convex
241
                os=-bsd
242
                ;;
243
        convex-c2)
244
                basic_machine=c2-convex
245
                os=-bsd
246
                ;;
247
        convex-c32)
248
                basic_machine=c32-convex
249
                os=-bsd
250
                ;;
251
        convex-c34)
252
                basic_machine=c34-convex
253
                os=-bsd
254
                ;;
255
        convex-c38)
256
                basic_machine=c38-convex
257
                os=-bsd
258
                ;;
259
        cray | ymp)
260
                basic_machine=ymp-cray
261
                os=-unicos
262
                ;;
263
        cray2)
264
                basic_machine=cray2-cray
265
                os=-unicos
266
                ;;
267
        [ctj]90-cray)
268
                basic_machine=c90-cray
269
                os=-unicos
270
                ;;
271
        crds | unos)
272
                basic_machine=m68k-crds
273
                ;;
274
        da30 | da30-*)
275
                basic_machine=m68k-da30
276
                ;;
277
        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
278
                basic_machine=mips-dec
279
                ;;
280
        delta | 3300 | motorola-3300 | motorola-delta \
281
              | 3300-motorola | delta-motorola)
282
                basic_machine=m68k-motorola
283
                ;;
284
        delta88)
285
                basic_machine=m88k-motorola
286
                os=-sysv3
287
                ;;
288
        dpx20 | dpx20-*)
289
                basic_machine=rs6000-bull
290
                os=-bosx
291
                ;;
292
        dpx2* | dpx2*-bull)
293
                basic_machine=m68k-bull
294
                os=-sysv3
295
                ;;
296
        hbullx20-bull)
297
                basic_machine=m68k-bull
298
                ;;
299
        ebmon29k)
300
                basic_machine=a29k-amd
301
                os=-ebmon
302
                ;;
303
        elxsi)
304
                basic_machine=elxsi-elxsi
305
                os=-bsd
306
                ;;
307
        encore | umax | mmax | multimax)
308
                basic_machine=ns32k-encore
309
                ;;
310
        fx2800)
311
                basic_machine=i860-alliant
312
                ;;
313
        genix)
314
                basic_machine=ns32k-ns
315
                ;;
316
        gmicro)
317
                basic_machine=tron-gmicro
318
                os=-sysv
319
                ;;
320
        h3050r* | hiux*)
321
                basic_machine=hppa1.1-hitachi
322
                os=-hiuxwe2
323
                ;;
324
        h8300hms)
325
                basic_machine=h8300-hitachi
326
                os=-hms
327
                ;;
328
        harris)
329
                basic_machine=m88k-harris
330
                os=-sysv3
331
                ;;
332
        hp300-*)
333
                basic_machine=m68k-hp
334
                ;;
335
        hp300bsd)
336
                basic_machine=m68k-hp
337
                os=-bsd
338
                ;;
339
        hp300hpux)
340
                basic_machine=m68k-hp
341
                os=-hpux
342
                ;;
343
        hp9k2[0-9][0-9] | hp9k31[0-9])
344
                basic_machine=m68000-hp
345
                ;;
346
        hp9k3[2-9][0-9])
347
                basic_machine=m68k-hp
348
                ;;
349
        hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
350
                basic_machine=hppa1.1-hp
351
                ;;
352
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
353
                basic_machine=hppa1.0-hp
354
                ;;
355
        hppa-next)
356
                os=-nextstep3
357
                ;;
358
        ibm032-*)
359
                basic_machine=ibmrt-ibm
360
                ;;
361
        i370-ibm* | ibm*)
362
                basic_machine=i370-ibm
363
                os=-mvs
364
                ;;
365
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
366
        i[3456]86v32)
367
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
368
                os=-sysv32
369
                ;;
370
        i[3456]86v4*)
371
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
372
                os=-sysv4
373
                ;;
374
        i[3456]86v)
375
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
376
                os=-sysv
377
                ;;
378
        i[3456]86sol2)
379
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
380
                os=-solaris2
381
                ;;
382
        iris | iris4d)
383
                basic_machine=mips-sgi
384
                case $os in
385
                    -irix*)
386
                        ;;
387
                    *)
388
                        os=-irix4
389
                        ;;
390
                esac
391
                ;;
392
        isi68 | isi)
393
                basic_machine=m68k-isi
394
                os=-sysv
395
                ;;
396
        luna88k-omron* | m88k-omron*)
397
                basic_machine=m88k-omron
398
                ;;
399
        magicstation*)
400
                basic_machine=magicstation-unknown
401
                ;;
402
        magnum | m3230)
403
                basic_machine=mips-mips
404
                os=-sysv
405
                ;;
406
        merlin)
407
                basic_machine=ns32k-utek
408
                os=-sysv
409
                ;;
410
        miniframe)
411
                basic_machine=m68000-convergent
412
                ;;
413
        mipsel*-linux*)
414
                basic_machine=mipsel-unknown
415
                os=-linux
416
                ;;
417
        mips*-linux*)
418
                basic_machine=mips-unknown
419
                os=-linux
420
                ;;
421
        mips3*-*)
422
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
423
                ;;
424
        mips3*)
425
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
426
                ;;
427
        ncr3000)
428
                basic_machine=i486-ncr
429
                os=-sysv4
430
                ;;
431
        news | news700 | news800 | news900)
432
                basic_machine=m68k-sony
433
                os=-newsos
434
                ;;
435
        news1000)
436
                basic_machine=m68030-sony
437
                os=-newsos
438
                ;;
439
        news-3600 | risc-news)
440
                basic_machine=mips-sony
441
                os=-newsos
442
                ;;
443
        next | m*-next )
444
                basic_machine=m68k-next
445
                case $os in
446
                    -nextstep* )
447
                        ;;
448
                    -ns2*)
449
                      os=-nextstep2
450
                        ;;
451
                    *)
452
                      os=-nextstep3
453
                        ;;
454
                esac
455
                ;;
456
        nh3000)
457
                basic_machine=m68k-harris
458
                os=-cxux
459
                ;;
460
        nh[45]000)
461
                basic_machine=m88k-harris
462
                os=-cxux
463
                ;;
464
        nindy960)
465
                basic_machine=i960-intel
466
                os=-nindy
467
                ;;
468
        np1)
469
                basic_machine=np1-gould
470
                ;;
471
        osr5 | sco5)    # SCO Open Server
472
                basic_machine=i386-pc
473
                os=-sco3.2v5
474
                ;;
475
        odt | odt3 | odt4)      # SCO Open Desktop
476
                basic_machine=i386-pc
477
                os=-sco3.2v4
478
                ;;
479
        pa-hitachi)
480
                basic_machine=hppa1.1-hitachi
481
                os=-hiuxwe2
482
                ;;
483
        paragon)
484
                basic_machine=i860-intel
485
                os=-osf
486
                ;;
487
        pbd)
488
                basic_machine=sparc-tti
489
                ;;
490
        pbb)
491
                basic_machine=m68k-tti
492
                ;;
493
        pc532 | pc532-*)
494
                basic_machine=ns32k-pc532
495
                ;;
496
        pentium | p5)
497
                basic_machine=i586-intel
498
                ;;
499
        pentiumpro | p6)
500
                basic_machine=i686-intel
501
                ;;
502
        pentium-* | p5-*)
503
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
504
                ;;
505
        pentiumpro-* | p6-*)
506
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
507
                ;;
508
        k5)
509
                # We don't have specific support for AMD's K5 yet, so just call it a Pentium
510
                basic_machine=i586-amd
511
                ;;
512
        nexen)
513
                # We don't have specific support for Nexgen yet, so just call it a Pentium
514
                basic_machine=i586-nexgen
515
                ;;
516
        pn)
517
                basic_machine=pn-gould
518
                ;;
519
        power)  basic_machine=rs6000-ibm
520
                ;;
521
        ppc)    basic_machine=powerpc-unknown
522
                ;;
523
        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
524
                ;;
525
        ppcle | powerpclittle | ppc-le | powerpc-little)
526
                basic_machine=powerpcle-unknown
527
                ;;
528
        ppcle-* | powerpclittle-*)
529
                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
530
                ;;
531
        ps2)
532
                basic_machine=i386-ibm
533
                ;;
534
        rm[46]00)
535
                basic_machine=mips-siemens
536
                ;;
537
        rtpc | rtpc-*)
538
                basic_machine=romp-ibm
539
                ;;
540
        sequent)
541
                basic_machine=i386-sequent
542
                ;;
543
        sh)
544
                basic_machine=sh-hitachi
545
                os=-hms
546
                ;;
547
        sps7)
548
                basic_machine=m68k-bull
549
                os=-sysv2
550
                ;;
551
        spur)
552
                basic_machine=spur-unknown
553
                ;;
554
        sun2)
555
                basic_machine=m68000-sun
556
                ;;
557
        sun2os3)
558
                basic_machine=m68000-sun
559
                os=-sunos3
560
                ;;
561
        sun2os4)
562
                basic_machine=m68000-sun
563
                os=-sunos4
564
                ;;
565
        sun3os3)
566
                basic_machine=m68k-sun
567
                os=-sunos3
568
                ;;
569
        sun3os4)
570
                basic_machine=m68k-sun
571
                os=-sunos4
572
                ;;
573
        sun4os3)
574
                basic_machine=sparc-sun
575
                os=-sunos3
576
                ;;
577
        sun4os4)
578
                basic_machine=sparc-sun
579
                os=-sunos4
580
                ;;
581
        sun4sol2)
582
                basic_machine=sparc-sun
583
                os=-solaris2
584
                ;;
585
        sun3 | sun3-*)
586
                basic_machine=m68k-sun
587
                ;;
588
        sun4)
589
                basic_machine=sparc-sun
590
                ;;
591
        sun386 | sun386i | roadrunner)
592
                basic_machine=i386-sun
593
                ;;
594
        symmetry)
595
                basic_machine=i386-sequent
596
                os=-dynix
597
                ;;
598
        tower | tower-32)
599
                basic_machine=m68k-ncr
600
                ;;
601
        udi29k)
602
                basic_machine=a29k-amd
603
                os=-udi
604
                ;;
605
        ultra3)
606
                basic_machine=a29k-nyu
607
                os=-sym1
608
                ;;
609
        uw2 | unixware | unixware2)
610
                basic_machine=i386-pc
611
                os=-sysv4.2uw2.1
612
                ;;
613
        uw7 | unixware7)
614
                basic_machine=i386-pc
615
                os=-sysv5uw7
616
                ;;
617
        vaxv)
618
                basic_machine=vax-dec
619
                os=-sysv
620
                ;;
621
        vms)
622
                basic_machine=vax-dec
623
                os=-vms
624
                ;;
625
        vpp*|vx|vx-*)
626
                basic_machine=f301-fujitsu
627
                ;;
628
        vxworks960)
629
                basic_machine=i960-wrs
630
                os=-vxworks
631
                ;;
632
        vxworks68)
633
                basic_machine=m68k-wrs
634
                os=-vxworks
635
                ;;
636
        vxworks29k)
637
                basic_machine=a29k-wrs
638
                os=-vxworks
639
                ;;
640
        xmp)
641
                basic_machine=xmp-cray
642
                os=-unicos
643
                ;;
644
        xps | xps100)
645
                basic_machine=xps100-honeywell
646
                ;;
647
        none)
648
                basic_machine=none-none
649
                os=-none
650
                ;;
651
 
652
# Here we handle the default manufacturer of certain CPU types.  It is in
653
# some cases the only manufacturer, in others, it is the most popular.
654
        mips)
655
                if test "x$os" = "x-linux" ; then
656
                        basic_machine=mips-unknown
657
                else
658
                        basic_machine=mips-mips
659
                fi
660
                ;;
661
        romp)
662
                basic_machine=romp-ibm
663
                ;;
664
        rs6000)
665
                basic_machine=rs6000-ibm
666
                ;;
667
        vax)
668
                basic_machine=vax-dec
669
                ;;
670
        pdp11)
671
                basic_machine=pdp11-dec
672
                ;;
673
        we32k)
674
                basic_machine=we32k-att
675
                ;;
676
        sparc)
677
                basic_machine=sparc-sun
678
                ;;
679
        cydra)
680
                basic_machine=cydra-cydrome
681
                ;;
682
        orion)
683
                basic_machine=orion-highlevel
684
                ;;
685
        orion105)
686
                basic_machine=clipper-highlevel
687
                ;;
688
        *)
689
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
690
                exit 1
691
                ;;
692
esac
693
 
694
# Here we canonicalize certain aliases for manufacturers.
695
case $basic_machine in
696
        *-digital*)
697
                basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
698
                ;;
699
        *-commodore*)
700
                basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
701
                ;;
702
        *)
703
                ;;
704
esac
705
 
706
# Decode manufacturer-specific aliases for certain operating systems.
707
 
708
if [ x"$os" != x"" ]
709
then
710
case $os in
711
        # First match some system type aliases
712
        # that might get confused with valid system types.
713
        # -solaris* is a basic system type, with this one exception.
714
        -solaris1 | -solaris1.*)
715
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
716
                ;;
717
        -solaris)
718
                os=-solaris2
719
                ;;
720
        svr4*)
721
                os=-sysv4
722
                ;;
723
        -unixware | -uw | -unixware2* | -uw2*)
724
                os=-sysv4.2uw2.1
725
                ;;
726
        -unixware7* | -uw7*)
727
                os=-sysv5uw7
728
                ;;
729
        -gnu/linux*)
730
                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
731
                ;;
732
        # First accept the basic system types.
733
        # The portable systems comes first.
734
        # Each alternative MUST END IN A *, to match a version number.
735
        # -sysv* is not here because it comes later, after sysvr4.
736
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
737
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
738
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
739
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
740
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
741
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
742
              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
743
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
744
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
745
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
746
              | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
747
              | -linux-gnu* | -uxpv* | -qnx* | -powerux* | -beos* | -rhapsody* \
748 1242 hpanther
              | -superux* | -darwin* )
749 7 jrydberg
        # Remember, each alternative MUST END IN *, to match a version number.
750
                ;;
751 826 markom
        -*linux*)
752 7 jrydberg
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
753
                ;;
754
        -sunos5*)
755
                os=`echo $os | sed -e 's|sunos5|solaris2|'`
756
                ;;
757
        -sunos6*)
758
                os=`echo $os | sed -e 's|sunos6|solaris3|'`
759
                ;;
760
        -osfrose*)
761
                os=-osfrose
762
                ;;
763
        -osf*)
764
                os=-osf
765
                ;;
766
        -utek*)
767
                os=-bsd
768
                ;;
769
        -dynix*)
770
                os=-bsd
771
                ;;
772
        -acis*)
773
                os=-aos
774
                ;;
775
        -ctix* | -uts*)
776
                os=-sysv
777
                ;;
778
        -ns2 )
779
                os=-nextstep2
780
                ;;
781
        # Preserve the version number of sinix5.
782
        -sinix5.*)
783
                os=`echo $os | sed -e 's|sinix|sysv|'`
784
                ;;
785
        -sinix*)
786
                os=-sysv4
787
                ;;
788
        -triton*)
789
                os=-sysv3
790
                ;;
791
        -oss*)
792
                os=-sysv3
793
                ;;
794
        -svr4)
795
                os=-sysv4
796
                ;;
797
        -svr3)
798
                os=-sysv3
799
                ;;
800
        -sysvr4)
801
                os=-sysv4
802
                ;;
803
        -sysvr5)
804
                os=-sysv5
805
                ;;
806
        # This must come after -sysvr[45].
807
        -sysv*)
808
                ;;
809
        -xenix)
810
                os=-xenix
811
                ;;
812
        -none)
813
                ;;
814
        *)
815
                # Get rid of the `-' at the beginning of $os.
816
                os=`echo $os | sed 's/[^-]*-//'`
817
                echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
818
                exit 1
819
                ;;
820
esac
821
else
822
 
823
# Here we handle the default operating systems that come with various machines.
824
# The value should be what the vendor currently ships out the door with their
825
# machine or put another way, the most popular os provided with the machine.
826
 
827
# Note that if you're going to try to match "-MANUFACTURER" here (say,
828
# "-sun"), then you have to tell the case statement up towards the top
829
# that MANUFACTURER isn't an operating system.  Otherwise, code above
830
# will signal an error saying that MANUFACTURER isn't an operating
831
# system, and we'll never get to this point.
832
 
833
case $basic_machine in
834
        *-acorn)
835
                os=-riscix1.2
836
                ;;
837
        arm*-semi)
838
                os=-aout
839
                ;;
840
        pdp11-*)
841
                os=-none
842
                ;;
843
        *-dec | vax-*)
844
                os=-ultrix4.2
845
                ;;
846
        m68*-apollo)
847
                os=-domain
848
                ;;
849
        i386-sun)
850
                os=-sunos4.0.2
851
                ;;
852
        m68000-sun)
853
                os=-sunos3
854
                # This also exists in the configure program, but was not the
855
                # default.
856
                # os=-sunos4
857
                ;;
858
        *-tti)  # must be before sparc entry or we get the wrong os.
859
                os=-sysv3
860
                ;;
861
        sparc-* | *-sun)
862
                os=-sunos4.1.1
863
                ;;
864
        *-be)
865
                os=-beos
866
                ;;
867
        *-ibm)
868
                os=-aix
869
                ;;
870
        *-hp)
871
                os=-hpux
872
                ;;
873
        *-hitachi)
874
                os=-hiux
875
                ;;
876
        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
877
                os=-sysv
878
                ;;
879
        *-cbm)
880
                os=-amigaos
881
                ;;
882
        *-dg)
883
                os=-dgux
884
                ;;
885
        *-dolphin)
886
                os=-sysv3
887
                ;;
888
        m68k-ccur)
889
                os=-rtu
890
                ;;
891
        m88k-omron*)
892
                os=-luna
893
                ;;
894
        *-next )
895
                os=-nextstep
896
                ;;
897
        *-sequent)
898
                os=-ptx
899
                ;;
900
        *-crds)
901
                os=-unos
902
                ;;
903
        *-ns)
904
                os=-genix
905
                ;;
906
        i370-*)
907
                os=-mvs
908
                ;;
909
        *-next)
910
                os=-nextstep3
911
                ;;
912
        *-gould)
913
                os=-sysv
914
                ;;
915
        *-highlevel)
916
                os=-bsd
917
                ;;
918
        *-encore)
919
                os=-bsd
920
                ;;
921
        *-sgi)
922
                os=-irix
923
                ;;
924
        *-siemens)
925
                os=-sysv4
926
                ;;
927
        *-masscomp)
928
                os=-rtu
929
                ;;
930
        f301-fujitsu)
931
                os=-uxpv
932
                ;;
933
        *)
934
                os=-none
935
                ;;
936
esac
937
fi
938
 
939
# Here we handle the case where we know the os, and the CPU type, but not the
940
# manufacturer.  We pick the logical manufacturer.
941
vendor=unknown
942
case $basic_machine in
943
        *-unknown)
944
                case $os in
945
                        -riscix*)
946
                                vendor=acorn
947
                                ;;
948
                        -sunos*)
949
                                vendor=sun
950
                                ;;
951
                        -lynxos*)
952
                                vendor=lynx
953
                                ;;
954
                        -aix*)
955
                                vendor=ibm
956
                                ;;
957
                        -hpux*)
958
                                vendor=hp
959
                                ;;
960
                        -hiux*)
961
                                vendor=hitachi
962
                                ;;
963
                        -unos*)
964
                                vendor=crds
965
                                ;;
966
                        -dgux*)
967
                                vendor=dg
968
                                ;;
969
                        -luna*)
970
                                vendor=omron
971
                                ;;
972
                        -genix*)
973
                                vendor=ns
974
                                ;;
975
                        -mvs*)
976
                                vendor=ibm
977
                                ;;
978
                        -ptx*)
979
                                vendor=sequent
980
                                ;;
981
                        -vxsim* | -vxworks*)
982
                                vendor=wrs
983
                                ;;
984
                        -aux*)
985
                                vendor=apple
986
                                ;;
987
                esac
988
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
989
                ;;
990
esac
991
 
992
echo $basic_machine$os

powered by: WebSVN 2.1.0

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