~ubuntu-branches/debian/sid/libhdf4/sid

« back to all changes in this revision

Viewing changes to config.sub

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Troin
  • Date: 2001-08-17 18:15:39 UTC
  • Revision ID: james.westby@ubuntu.com-20010817181539-dxk88azjdkntsxbm
Tags: 4.1r4-13
* Fixed upstream version detection in debian/rules.
* Change all instances of the linux C preprocessor symbol to __linux__
  to avoid breaking other packages; patch courtesy of James Troup
  <james@nocrew.org>; closes: #108921.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Configuration validation subroutine script, version 1.1.
3
 
#   Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
 
1
#! /bin/sh
 
2
# Configuration validation subroutine script.
 
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 
4
#   Free Software Foundation, Inc.
 
5
 
 
6
timestamp='2001-03-09'
 
7
 
4
8
# This file is (in principle) common to ALL GNU software.
5
9
# 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. 
 
10
# can handle that machine.  It does not imply ALL GNU software can.
7
11
#
8
12
# This file is free software; you can redistribute it and/or modify
9
13
# it under the terms of the GNU General Public License as published by
17
21
#
18
22
# You should have received a copy of the GNU General Public License
19
23
# along with this program; if not, write to the Free Software
20
 
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
24
# Foundation, Inc., 59 Temple Place - Suite 330,
 
25
# Boston, MA 02111-1307, USA.
21
26
 
22
27
# As a special exception to the GNU General Public License, if you
23
28
# distribute this file as part of a program that contains a
24
29
# configuration script generated by Autoconf, you may include it under
25
30
# the same distribution terms that you use for the rest of that program.
26
31
 
 
32
# Please send patches to <config-patches@gnu.org>.
 
33
#
27
34
# Configuration subroutine to validate and canonicalize a configuration type.
28
35
# Supply the specified configuration type as an argument.
29
36
# If it is invalid, we print an error message on stderr and exit with code 1.
40
47
# The goal of this file is to map all the various variations of a given
41
48
# machine specification into a single specification in the form:
42
49
#       CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
 
50
# or in some cases, the newer four-part form:
 
51
#       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
43
52
# It is wrong to echo any other type of specification.
44
53
 
45
 
# First pass through any local machine types.
46
 
case $1 in
47
 
        *local*)
48
 
                echo $1
49
 
                exit 0
50
 
                ;;
51
 
        *)
52
 
        ;;
53
 
esac
54
 
 
55
 
# Separate what the user gave into CPU-COMPANY and OS (if any).
56
 
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
57
 
if [ $basic_machine != $1 ]
58
 
then os=`echo $1 | sed 's/.*-/-/'`
59
 
else os=; fi
 
54
me=`echo "$0" | sed -e 's,.*/,,'`
 
55
 
 
56
usage="\
 
57
Usage: $0 [OPTION] CPU-MFR-OPSYS
 
58
       $0 [OPTION] ALIAS
 
59
 
 
60
Canonicalize a configuration name.
 
61
 
 
62
Operation modes:
 
63
  -h, --help         print this help, then exit
 
64
  -t, --time-stamp   print date of last modification, then exit
 
65
  -v, --version      print version number, then exit
 
66
 
 
67
Report bugs and patches to <config-patches@gnu.org>."
 
68
 
 
69
version="\
 
70
GNU config.sub ($timestamp)
 
71
 
 
72
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 
73
Free Software Foundation, Inc.
 
74
 
 
75
This is free software; see the source for copying conditions.  There is NO
 
76
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 
77
 
 
78
help="
 
79
Try \`$me --help' for more information."
 
80
 
 
81
# Parse command line
 
82
while test $# -gt 0 ; do
 
83
  case $1 in
 
84
    --time-stamp | --time* | -t )
 
85
       echo "$timestamp" ; exit 0 ;;
 
86
    --version | -v )
 
87
       echo "$version" ; exit 0 ;;
 
88
    --help | --h* | -h )
 
89
       echo "$usage"; exit 0 ;;
 
90
    -- )     # Stop option processing
 
91
       shift; break ;;
 
92
    - ) # Use stdin as input.
 
93
       break ;;
 
94
    -* )
 
95
       echo "$me: invalid option $1$help"
 
96
       exit 1 ;;
 
97
 
 
98
    *local*)
 
99
       # First pass through any local machine types.
 
100
       echo $1
 
101
       exit 0;;
 
102
 
 
103
    * )
 
104
       break ;;
 
105
  esac
 
106
done
 
107
 
 
108
case $# in
 
109
 0) echo "$me: missing argument$help" >&2
 
110
    exit 1;;
 
111
 1) ;;
 
112
 *) echo "$me: too many arguments$help" >&2
 
113
    exit 1;;
 
114
esac
 
115
 
 
116
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 
117
# Here we must recognize all the valid KERNEL-OS combinations.
 
118
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 
119
case $maybe_os in
 
120
  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
 
121
    os=-$maybe_os
 
122
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
 
123
    ;;
 
124
  *)
 
125
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
 
126
    if [ $basic_machine != $1 ]
 
127
    then os=`echo $1 | sed 's/.*-/-/'`
 
128
    else os=; fi
 
129
    ;;
 
130
esac
60
131
 
61
132
### Let's recognize common machines as not being operating systems so
62
133
### that things like config.sub decstation-3100 work.  We also
71
142
        -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
72
143
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
73
144
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
74
 
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
75
 
                os=
 
145
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
 
146
        -apple | -axis)
 
147
                os=
 
148
                basic_machine=$1
 
149
                ;;
 
150
        -sim | -cisco | -oki | -wec | -winbond)
 
151
                os=
 
152
                basic_machine=$1
 
153
                ;;
 
154
        -scout)
 
155
                ;;
 
156
        -wrs)
 
157
                os=-vxworks
76
158
                basic_machine=$1
77
159
                ;;
78
160
        -hiux*)
79
161
                os=-hiuxwe2
80
162
                ;;
 
163
        -sco5)
 
164
                os=-sco3.2v5
 
165
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 
166
                ;;
81
167
        -sco4)
82
168
                os=-sco3.2v4
83
 
                basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
 
169
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
84
170
                ;;
85
171
        -sco3.2.[4-9]*)
86
172
                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
87
 
                basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
 
173
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
88
174
                ;;
89
175
        -sco3.2v[4-9]*)
90
176
                # Don't forget version if it is 3.2v4 or newer.
91
 
                basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
 
177
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
92
178
                ;;
93
179
        -sco*)
94
180
                os=-sco3.2v2
95
 
                basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
 
181
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 
182
                ;;
 
183
        -udk*)
 
184
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
96
185
                ;;
97
186
        -isc)
98
187
                os=-isc2.2
99
 
                basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
 
188
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
100
189
                ;;
101
190
        -clix*)
102
191
                basic_machine=clipper-intergraph
103
192
                ;;
104
193
        -isc*)
105
 
                basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
 
194
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
106
195
                ;;
107
 
        -lynx)
 
196
        -lynx*)
108
197
                os=-lynxos
109
198
                ;;
110
199
        -ptx*)
113
202
        -windowsnt*)
114
203
                os=`echo $os | sed -e 's/windowsnt/winnt/'`
115
204
                ;;
 
205
        -psos*)
 
206
                os=-psos
 
207
                ;;
 
208
        -mint | -mint[0-9]*)
 
209
                basic_machine=m68k-atari
 
210
                os=-mint
 
211
                ;;
116
212
esac
117
213
 
118
214
# Decode aliases for certain CPU-COMPANY combinations.
119
215
case $basic_machine in
120
216
        # Recognize the basic CPU types without company name.
121
217
        # Some are omitted here because they have special meanings below.
122
 
        tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
123
 
                | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
124
 
                | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
125
 
                | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
126
 
                | pdp11 | mips64el | mips64orion | mips64orionel )
127
 
                basic_machine=$basic_machine-unknown
128
 
                ;;
 
218
        tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
 
219
                | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
 
220
                | pyramid | mn10200 | mn10300 | tron | a29k \
 
221
                | 580 | i960 | h8300 \
 
222
                | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
 
223
                | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
 
224
                | hppa64 \
 
225
                | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
 
226
                | alphaev6[78] \
 
227
                | we32k | ns16k | clipper | i370 | sh | sh[34] \
 
228
                | powerpc | powerpcle \
 
229
                | 1750a | dsp16xx | pdp10 | pdp11 \
 
230
                | mips16 | mips64 | mipsel | mips64el \
 
231
                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
 
232
                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
 
233
                | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
 
234
                | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
 
235
                | thumb | d10v | d30v | fr30 | avr | openrisc)
 
236
                basic_machine=$basic_machine-unknown
 
237
                ;;
 
238
        m6811 | m68hc11 | m6812 | m68hc12)
 
239
                # Motorola 68HC11/12.
 
240
                basic_machine=$basic_machine-unknown
 
241
                os=-none
 
242
                ;;
 
243
        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
 
244
                ;;
 
245
 
 
246
        # We use `pc' rather than `unknown'
 
247
        # because (1) that's what they normally are, and
 
248
        # (2) the word "unknown" tends to confuse beginning users.
 
249
        i[234567]86 | x86_64)
 
250
          basic_machine=$basic_machine-pc
 
251
          ;;
129
252
        # Object if more than one company name word.
130
253
        *-*-*)
131
254
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
132
255
                exit 1
133
256
                ;;
134
257
        # Recognize the basic CPU types with company name.
135
 
        vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
136
 
              | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* | ia64-* \
 
258
        # FIXME: clean up the formatting here.
 
259
        vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
 
260
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
 
261
              | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
137
262
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
138
 
              | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
139
 
              | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
140
 
              | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
141
 
              | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \
142
 
              | mips64el-* | mips64orion-* | mips64orionel-* | S370-* )
 
263
              | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
 
264
              | xmp-* | ymp-* \
 
265
              | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
 
266
              | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
 
267
              | hppa2.0n-* | hppa64-* \
 
268
              | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
 
269
              | alphaev6[78]-* \
 
270
              | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
 
271
              | clipper-* | orion-* \
 
272
              | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
 
273
              | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
 
274
              | mips64el-* | mips64orion-* | mips64orionel-* \
 
275
              | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
 
276
              | mipstx39-* | mipstx39el-* | mcore-* \
 
277
              | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
 
278
              | [cjt]90-* \
 
279
              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
 
280
              | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
 
281
              | bs2000-* | tic54x-* | c54x-* | x86_64-*)
143
282
                ;;
144
283
        # Recognize the various machine names and aliases which stand
145
284
        # for a CPU type and a company and sometimes even an OS.
 
285
        386bsd)
 
286
                basic_machine=i386-unknown
 
287
                os=-bsd
 
288
                ;;
146
289
        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
147
290
                basic_machine=m68000-att
148
291
                ;;
149
292
        3b*)
150
293
                basic_machine=we32k-att
151
294
                ;;
 
295
        a29khif)
 
296
                basic_machine=a29k-amd
 
297
                os=-udi
 
298
                ;;
 
299
        adobe68k)
 
300
                basic_machine=m68010-adobe
 
301
                os=-scout
 
302
                ;;
152
303
        alliant | fx80)
153
304
                basic_machine=fx80-alliant
154
305
                ;;
164
315
                os=-sysv
165
316
                ;;
166
317
        amiga | amiga-*)
167
 
                basic_machine=m68k-cbm
 
318
                basic_machine=m68k-unknown
168
319
                ;;
169
 
        amigados)
170
 
                basic_machine=m68k-cbm
171
 
                os=-amigados
 
320
        amigaos | amigados)
 
321
                basic_machine=m68k-unknown
 
322
                os=-amigaos
172
323
                ;;
173
324
        amigaunix | amix)
174
 
                basic_machine=m68k-cbm
 
325
                basic_machine=m68k-unknown
175
326
                os=-sysv4
176
327
                ;;
177
328
        apollo68)
178
329
                basic_machine=m68k-apollo
179
330
                os=-sysv
180
331
                ;;
 
332
        apollo68bsd)
 
333
                basic_machine=m68k-apollo
 
334
                os=-bsd
 
335
                ;;
 
336
        aux)
 
337
                basic_machine=m68k-apple
 
338
                os=-aux
 
339
                ;;
181
340
        balance)
182
341
                basic_machine=ns32k-sequent
183
342
                os=-dynix
210
369
                basic_machine=cray2-cray
211
370
                os=-unicos
212
371
                ;;
213
 
        c90*)
214
 
                basic_machine=c90-cray
 
372
        [cjt]90)
 
373
                basic_machine=${basic_machine}-cray
215
374
                os=-unicos
216
375
                ;;
217
 
        cray-t3* | t3* | t3*-cray)
218
 
                basic_machine=t3e-cray
219
 
                os=-craympp
220
 
                ;;
221
376
        crds | unos)
222
377
                basic_machine=m68k-crds
223
378
                ;;
 
379
        cris | cris-* | etrax*)
 
380
                basic_machine=cris-axis
 
381
                ;;
224
382
        da30 | da30-*)
225
383
                basic_machine=m68k-da30
226
384
                ;;
254
412
        encore | umax | mmax)
255
413
                basic_machine=ns32k-encore
256
414
                ;;
 
415
        es1800 | OSE68k | ose68k | ose | OSE)
 
416
                basic_machine=m68k-ericsson
 
417
                os=-ose
 
418
                ;;
257
419
        fx2800)
258
420
                basic_machine=i860-alliant
259
421
                ;;
264
426
                basic_machine=tron-gmicro
265
427
                os=-sysv
266
428
                ;;
 
429
        go32)
 
430
                basic_machine=i386-pc
 
431
                os=-go32
 
432
                ;;
267
433
        h3050r* | hiux*)
268
434
                basic_machine=hppa1.1-hitachi
269
435
                os=-hiuxwe2
272
438
                basic_machine=h8300-hitachi
273
439
                os=-hms
274
440
                ;;
 
441
        h8300xray)
 
442
                basic_machine=h8300-hitachi
 
443
                os=-xray
 
444
                ;;
 
445
        h8500hms)
 
446
                basic_machine=h8500-hitachi
 
447
                os=-hms
 
448
                ;;
275
449
        harris)
276
450
                basic_machine=m88k-harris
277
451
                os=-sysv3
287
461
                basic_machine=m68k-hp
288
462
                os=-hpux
289
463
                ;;
 
464
        hp3k9[0-9][0-9] | hp9[0-9][0-9])
 
465
                basic_machine=hppa1.0-hp
 
466
                ;;
290
467
        hp9k2[0-9][0-9] | hp9k31[0-9])
291
468
                basic_machine=m68000-hp
292
469
                ;;
293
470
        hp9k3[2-9][0-9])
294
471
                basic_machine=m68k-hp
295
472
                ;;
296
 
        hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
 
473
        hp9k6[0-9][0-9] | hp6[0-9][0-9])
 
474
                basic_machine=hppa1.0-hp
 
475
                ;;
 
476
        hp9k7[0-79][0-9] | hp7[0-79][0-9])
 
477
                basic_machine=hppa1.1-hp
 
478
                ;;
 
479
        hp9k78[0-9] | hp78[0-9])
 
480
                # FIXME: really hppa2.0-hp
 
481
                basic_machine=hppa1.1-hp
 
482
                ;;
 
483
        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
 
484
                # FIXME: really hppa2.0-hp
 
485
                basic_machine=hppa1.1-hp
 
486
                ;;
 
487
        hp9k8[0-9][13679] | hp8[0-9][13679])
297
488
                basic_machine=hppa1.1-hp
298
489
                ;;
299
490
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
300
491
                basic_machine=hppa1.0-hp
301
492
                ;;
 
493
        hppa-next)
 
494
                os=-nextstep3
 
495
                ;;
 
496
        hppaosf)
 
497
                basic_machine=hppa1.1-hp
 
498
                os=-osf
 
499
                ;;
 
500
        hppro)
 
501
                basic_machine=hppa1.1-hp
 
502
                os=-proelf
 
503
                ;;
302
504
        i370-ibm* | ibm*)
303
505
                basic_machine=i370-ibm
304
 
                os=-mvs
305
506
                ;;
306
507
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
307
 
        i[3456]86v32)
308
 
                basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
 
508
        i[34567]86v32)
 
509
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
309
510
                os=-sysv32
310
511
                ;;
311
 
        i[3456]86v4*)
312
 
                basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
 
512
        i[34567]86v4*)
 
513
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
313
514
                os=-sysv4
314
515
                ;;
315
 
        i[3456]86v)
316
 
                basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
 
516
        i[34567]86v)
 
517
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
317
518
                os=-sysv
318
519
                ;;
319
 
        i[3456]86sol2)
320
 
                basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
 
520
        i[34567]86sol2)
 
521
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
321
522
                os=-solaris2
322
523
                ;;
 
524
        i386mach)
 
525
                basic_machine=i386-mach
 
526
                os=-mach
 
527
                ;;
 
528
        i386-vsta | vsta)
 
529
                basic_machine=i386-unknown
 
530
                os=-vsta
 
531
                ;;
323
532
        iris | iris4d)
324
533
                basic_machine=mips-sgi
325
534
                case $os in
330
539
                        ;;
331
540
                esac
332
541
                ;;
333
 
        irix6_32)
334
 
                basic_machine=mips-sgi
335
 
                os=-irix6_32
336
 
                ;;
337
542
        isi68 | isi)
338
543
                basic_machine=m68k-isi
339
544
                os=-sysv
340
545
                ;;
341
 
        j90*)
342
 
                basic_machine=j90-cray
343
 
                os=-unicos
344
 
                ;;
345
546
        m88k-omron*)
346
547
                basic_machine=m88k-omron
347
548
                ;;
353
554
                basic_machine=ns32k-utek
354
555
                os=-sysv
355
556
                ;;
 
557
        mingw32)
 
558
                basic_machine=i386-pc
 
559
                os=-mingw32
 
560
                ;;
356
561
        miniframe)
357
562
                basic_machine=m68000-convergent
358
563
                ;;
 
564
        *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
 
565
                basic_machine=m68k-atari
 
566
                os=-mint
 
567
                ;;
 
568
        mipsel*-linux*)
 
569
                basic_machine=mipsel-unknown
 
570
                os=-linux-gnu
 
571
                ;;
 
572
        mips*-linux*)
 
573
                basic_machine=mips-unknown
 
574
                os=-linux-gnu
 
575
                ;;
359
576
        mips3*-*)
360
577
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
361
578
                ;;
362
579
        mips3*)
363
580
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
364
581
                ;;
 
582
        mmix*)
 
583
                basic_machine=mmix-knuth
 
584
                os=-mmixware
 
585
                ;;
 
586
        monitor)
 
587
                basic_machine=m68k-rom68k
 
588
                os=-coff
 
589
                ;;
 
590
        msdos)
 
591
                basic_machine=i386-pc
 
592
                os=-msdos
 
593
                ;;
 
594
        mvs)
 
595
                basic_machine=i370-ibm
 
596
                os=-mvs
 
597
                ;;
365
598
        ncr3000)
366
599
                basic_machine=i486-ncr
367
600
                os=-sysv4
368
601
                ;;
 
602
        netbsd386)
 
603
                basic_machine=i386-unknown
 
604
                os=-netbsd
 
605
                ;;
 
606
        netwinder)
 
607
                basic_machine=armv4l-rebel
 
608
                os=-linux
 
609
                ;;
369
610
        news | news700 | news800 | news900)
370
611
                basic_machine=m68k-sony
371
612
                os=-newsos
378
619
                basic_machine=mips-sony
379
620
                os=-newsos
380
621
                ;;
 
622
        necv70)
 
623
                basic_machine=v70-nec
 
624
                os=-sysv
 
625
                ;;
381
626
        next | m*-next )
382
627
                basic_machine=m68k-next
383
628
                case $os in
403
648
                basic_machine=i960-intel
404
649
                os=-nindy
405
650
                ;;
 
651
        mon960)
 
652
                basic_machine=i960-intel
 
653
                os=-mon960
 
654
                ;;
 
655
        nonstopux)
 
656
                basic_machine=mips-compaq
 
657
                os=-nonstopux
 
658
                ;;
406
659
        np1)
407
660
                basic_machine=np1-gould
408
661
                ;;
 
662
        nsr-tandem)
 
663
                basic_machine=nsr-tandem
 
664
                ;;
 
665
        op50n-* | op60c-*)
 
666
                basic_machine=hppa1.1-oki
 
667
                os=-proelf
 
668
                ;;
 
669
        OSE68000 | ose68000)
 
670
                basic_machine=m68000-ericsson
 
671
                os=-ose
 
672
                ;;
 
673
        os68k)
 
674
                basic_machine=m68k-none
 
675
                os=-os68k
 
676
                ;;
409
677
        pa-hitachi)
410
678
                basic_machine=hppa1.1-hitachi
411
679
                os=-hiuxwe2
423
691
        pc532 | pc532-*)
424
692
                basic_machine=ns32k-pc532
425
693
                ;;
426
 
        pentium-*)
427
 
                # We will change tis to say i586 once there has been
428
 
                # time for various packages to start to recognize that.
429
 
                basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'`
 
694
        pentium | p5 | k5 | k6 | nexgen)
 
695
                basic_machine=i586-pc
 
696
                ;;
 
697
        pentiumpro | p6 | 6x86 | athlon)
 
698
                basic_machine=i686-pc
 
699
                ;;
 
700
        pentiumii | pentium2)
 
701
                basic_machine=i686-pc
 
702
                ;;
 
703
        pentium-* | p5-* | k5-* | k6-* | nexgen-*)
 
704
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 
705
                ;;
 
706
        pentiumpro-* | p6-* | 6x86-* | athlon-*)
 
707
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 
708
                ;;
 
709
        pentiumii-* | pentium2-*)
 
710
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
430
711
                ;;
431
712
        pn)
432
713
                basic_machine=pn-gould
433
714
                ;;
 
715
        power)  basic_machine=power-ibm
 
716
                ;;
 
717
        ppc)    basic_machine=powerpc-unknown
 
718
                ;;
 
719
        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 
720
                ;;
 
721
        ppcle | powerpclittle | ppc-le | powerpc-little)
 
722
                basic_machine=powerpcle-unknown
 
723
                ;;
 
724
        ppcle-* | powerpclittle-*)
 
725
                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 
726
                ;;
434
727
        ps2)
435
728
                basic_machine=i386-ibm
436
729
                ;;
 
730
        pw32)
 
731
                basic_machine=i586-unknown
 
732
                os=-pw32
 
733
                ;;
 
734
        rom68k)
 
735
                basic_machine=m68k-rom68k
 
736
                os=-coff
 
737
                ;;
 
738
        rm[46]00)
 
739
                basic_machine=mips-siemens
 
740
                ;;
437
741
        rtpc | rtpc-*)
438
742
                basic_machine=romp-ibm
439
743
                ;;
440
 
        fujitsu | vp | S370)
441
 
                basic_machine=vp-fujitsu
442
 
                os=-sysv
 
744
        sa29200)
 
745
                basic_machine=a29k-amd
 
746
                os=-udi
443
747
                ;;
444
748
        sequent)
445
749
                basic_machine=i386-sequent
448
752
                basic_machine=sh-hitachi
449
753
                os=-hms
450
754
                ;;
 
755
        sparclite-wrs)
 
756
                basic_machine=sparclite-wrs
 
757
                os=-vxworks
 
758
                ;;
451
759
        sps7)
452
760
                basic_machine=m68k-bull
453
761
                os=-sysv2
455
763
        spur)
456
764
                basic_machine=spur-unknown
457
765
                ;;
 
766
        st2000)
 
767
                basic_machine=m68k-tandem
 
768
                ;;
 
769
        stratus)
 
770
                basic_machine=i860-stratus
 
771
                os=-sysv4
 
772
                ;;
458
773
        sun2)
459
774
                basic_machine=m68000-sun
460
775
                ;;
482
797
                basic_machine=sparc-sun
483
798
                os=-sunos4
484
799
                ;;
 
800
        sun4sol2)
 
801
                basic_machine=sparc-sun
 
802
                os=-solaris2
 
803
                ;;
485
804
        sun3 | sun3-*)
486
805
                basic_machine=m68k-sun
487
806
                ;;
491
810
        sun386 | sun386i | roadrunner)
492
811
                basic_machine=i386-sun
493
812
                ;;
494
 
        mac)
495
 
                basic_machine=m68k-mac
496
 
                os=-macos
 
813
        sv1)
 
814
                basic_machine=sv1-cray
 
815
                os=-unicos
497
816
                ;;
498
817
        symmetry)
499
818
                basic_machine=i386-sequent
500
819
                os=-dynix
501
820
                ;;
502
 
        t90*)
503
 
                basic_machine=t90-cray
 
821
        t3e)
 
822
                basic_machine=t3e-cray
504
823
                os=-unicos
505
824
                ;;
 
825
        tic54x | c54x*)
 
826
                basic_machine=tic54x-unknown
 
827
                os=-coff
 
828
                ;;
 
829
        tx39)
 
830
                basic_machine=mipstx39-unknown
 
831
                ;;
 
832
        tx39el)
 
833
                basic_machine=mipstx39el-unknown
 
834
                ;;
506
835
        tower | tower-32)
507
836
                basic_machine=m68k-ncr
508
837
                ;;
 
838
        udi29k)
 
839
                basic_machine=a29k-amd
 
840
                os=-udi
 
841
                ;;
509
842
        ultra3)
510
843
                basic_machine=a29k-nyu
511
844
                os=-sym1
512
845
                ;;
 
846
        v810 | necv810)
 
847
                basic_machine=v810-nec
 
848
                os=-none
 
849
                ;;
513
850
        vaxv)
514
851
                basic_machine=vax-dec
515
852
                os=-sysv
518
855
                basic_machine=vax-dec
519
856
                os=-vms
520
857
                ;;
 
858
        vpp*|vx|vx-*)
 
859
               basic_machine=f301-fujitsu
 
860
               ;;
521
861
        vxworks960)
522
862
                basic_machine=i960-wrs
523
863
                os=-vxworks
526
866
                basic_machine=m68k-wrs
527
867
                os=-vxworks
528
868
                ;;
 
869
        vxworks29k)
 
870
                basic_machine=a29k-wrs
 
871
                os=-vxworks
 
872
                ;;
 
873
        w65*)
 
874
                basic_machine=w65-wdc
 
875
                os=-none
 
876
                ;;
 
877
        w89k-*)
 
878
                basic_machine=hppa1.1-winbond
 
879
                os=-proelf
 
880
                ;;
529
881
        xmp)
530
882
                basic_machine=xmp-cray
531
883
                os=-unicos
533
885
        xps | xps100)
534
886
                basic_machine=xps100-honeywell
535
887
                ;;
 
888
        z8k-*-coff)
 
889
                basic_machine=z8k-unknown
 
890
                os=-sim
 
891
                ;;
536
892
        none)
537
893
                basic_machine=none-none
538
894
                os=-none
540
896
 
541
897
# Here we handle the default manufacturer of certain CPU types.  It is in
542
898
# some cases the only manufacturer, in others, it is the most popular.
 
899
        w89k)
 
900
                basic_machine=hppa1.1-winbond
 
901
                ;;
 
902
        op50n)
 
903
                basic_machine=hppa1.1-oki
 
904
                ;;
 
905
        op60c)
 
906
                basic_machine=hppa1.1-oki
 
907
                ;;
543
908
        mips)
544
 
                basic_machine=mips-mips
 
909
                if [ x$os = x-linux-gnu ]; then
 
910
                        basic_machine=mips-unknown
 
911
                else
 
912
                        basic_machine=mips-mips
 
913
                fi
545
914
                ;;
546
915
        romp)
547
916
                basic_machine=romp-ibm
552
921
        vax)
553
922
                basic_machine=vax-dec
554
923
                ;;
 
924
        pdp10)
 
925
                # there are many clones, so DEC is not a safe bet
 
926
                basic_machine=pdp10-unknown
 
927
                ;;
555
928
        pdp11)
556
929
                basic_machine=pdp11-dec
557
930
                ;;
558
931
        we32k)
559
932
                basic_machine=we32k-att
560
933
                ;;
561
 
        sparc)
 
934
        sh3 | sh4)
 
935
                basic_machine=sh-unknown
 
936
                ;;
 
937
        sparc | sparcv9)
562
938
                basic_machine=sparc-sun
563
939
                ;;
564
940
        cydra)
570
946
        orion105)
571
947
                basic_machine=clipper-highlevel
572
948
                ;;
 
949
        mac | mpw | mac-mpw)
 
950
                basic_machine=m68k-apple
 
951
                ;;
 
952
        pmac | pmac-mpw)
 
953
                basic_machine=powerpc-apple
 
954
                ;;
 
955
        c4x*)
 
956
                basic_machine=c4x-none
 
957
                os=-coff
 
958
                ;;
573
959
        *)
574
960
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
575
961
                exit 1
593
979
if [ x"$os" != x"" ]
594
980
then
595
981
case $os in
 
982
        # First match some system type aliases
 
983
        # that might get confused with valid system types.
596
984
        # -solaris* is a basic system type, with this one exception.
597
985
        -solaris1 | -solaris1.*)
598
986
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
600
988
        -solaris)
601
989
                os=-solaris2
602
990
                ;;
 
991
        -svr4*)
 
992
                os=-sysv4
 
993
                ;;
 
994
        -unixware*)
 
995
                os=-sysv4.2uw
 
996
                ;;
603
997
        -gnu/linux*)
604
 
                os=`echo $os | sed -e 's|gnu/linux|linux|'`
 
998
                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
605
999
                ;;
606
1000
        # First accept the basic system types.
607
1001
        # The portable systems comes first.
608
 
        # Each alternative must end in a *, to match a version number.
 
1002
        # Each alternative MUST END IN A *, to match a version number.
609
1003
        # -sysv* is not here because it comes later, after sysvr4.
610
1004
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
611
 
              | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
 
1005
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
612
1006
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
613
 
              | -amigados* | -msdos* | -newsos* | -unicos* | -craympp | -aos* \
614
 
              | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
615
 
              | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
616
 
              | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
617
 
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
618
 
              | -ptx* | -coff* | -winnt*)
 
1007
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
 
1008
              | -aos* \
 
1009
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 
1010
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 
1011
              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
 
1012
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 
1013
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 
1014
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 
1015
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 
1016
              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
 
1017
              | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
 
1018
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 
1019
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
 
1020
        # Remember, each alternative MUST END IN *, to match a version number.
 
1021
                ;;
 
1022
        -qnx*)
 
1023
                case $basic_machine in
 
1024
                    x86-* | i[34567]86-*)
 
1025
                        ;;
 
1026
                    *)
 
1027
                        os=-nto$os
 
1028
                        ;;
 
1029
                esac
 
1030
                ;;
 
1031
        -nto*)
 
1032
                os=-nto-qnx
 
1033
                ;;
 
1034
        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 
1035
              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
 
1036
              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 
1037
                ;;
 
1038
        -mac*)
 
1039
                os=`echo $os | sed -e 's|mac|macos|'`
 
1040
                ;;
 
1041
        -linux*)
 
1042
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
619
1043
                ;;
620
1044
        -sunos5*)
621
1045
                os=`echo $os | sed -e 's|sunos5|solaris2|'`
623
1047
        -sunos6*)
624
1048
                os=`echo $os | sed -e 's|sunos6|solaris3|'`
625
1049
                ;;
 
1050
        -opened*)
 
1051
                os=-openedition
 
1052
                ;;
 
1053
        -wince*)
 
1054
                os=-wince
 
1055
                ;;
626
1056
        -osfrose*)
627
1057
                os=-osfrose
628
1058
                ;;
638
1068
        -acis*)
639
1069
                os=-aos
640
1070
                ;;
 
1071
        -386bsd)
 
1072
                os=-bsd
 
1073
                ;;
641
1074
        -ctix* | -uts*)
642
1075
                os=-sysv
643
1076
                ;;
 
1077
        -ns2 )
 
1078
                os=-nextstep2
 
1079
                ;;
 
1080
        -nsk*)
 
1081
                os=-nsk
 
1082
                ;;
 
1083
        # Preserve the version number of sinix5.
 
1084
        -sinix5.*)
 
1085
                os=`echo $os | sed -e 's|sinix|sysv|'`
 
1086
                ;;
 
1087
        -sinix*)
 
1088
                os=-sysv4
 
1089
                ;;
644
1090
        -triton*)
645
1091
                os=-sysv3
646
1092
                ;;
659
1105
        # This must come after -sysvr4.
660
1106
        -sysv*)
661
1107
                ;;
 
1108
        -ose*)
 
1109
                os=-ose
 
1110
                ;;
 
1111
        -es1800*)
 
1112
                os=-ose
 
1113
                ;;
662
1114
        -xenix)
663
1115
                os=-xenix
664
1116
                ;;
665
 
        -macos)
666
 
                os=-macos
 
1117
        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 
1118
                os=-mint
667
1119
                ;;
668
1120
        -none)
669
1121
                ;;
690
1142
        *-acorn)
691
1143
                os=-riscix1.2
692
1144
                ;;
 
1145
        arm*-rebel)
 
1146
                os=-linux
 
1147
                ;;
 
1148
        arm*-semi)
 
1149
                os=-aout
 
1150
                ;;
 
1151
        pdp10-*)
 
1152
                os=-tops20
 
1153
                ;;
693
1154
        pdp11-*)
694
1155
                os=-none
695
1156
                ;;
696
1157
        *-dec | vax-*)
697
1158
                os=-ultrix4.2
698
1159
                ;;
 
1160
        m68*-apollo)
 
1161
                os=-domain
 
1162
                ;;
699
1163
        i386-sun)
700
1164
                os=-sunos4.0.2
701
1165
                ;;
705
1169
                # default.
706
1170
                # os=-sunos4
707
1171
                ;;
 
1172
        m68*-cisco)
 
1173
                os=-aout
 
1174
                ;;
 
1175
        mips*-cisco)
 
1176
                os=-elf
 
1177
                ;;
 
1178
        mips*-*)
 
1179
                os=-elf
 
1180
                ;;
708
1181
        *-tti)  # must be before sparc entry or we get the wrong os.
709
1182
                os=-sysv3
710
1183
                ;;
711
1184
        sparc-* | *-sun)
712
1185
                os=-sunos4.1.1
713
1186
                ;;
 
1187
        *-be)
 
1188
                os=-beos
 
1189
                ;;
714
1190
        *-ibm)
715
1191
                os=-aix
716
1192
                ;;
 
1193
        *-wec)
 
1194
                os=-proelf
 
1195
                ;;
 
1196
        *-winbond)
 
1197
                os=-proelf
 
1198
                ;;
 
1199
        *-oki)
 
1200
                os=-proelf
 
1201
                ;;
717
1202
        *-hp)
718
1203
                os=-hpux
719
1204
                ;;
724
1209
                os=-sysv
725
1210
                ;;
726
1211
        *-cbm)
727
 
                os=-amigados
 
1212
                os=-amigaos
728
1213
                ;;
729
1214
        *-dg)
730
1215
                os=-dgux
738
1223
        m88k-omron*)
739
1224
                os=-luna
740
1225
                ;;
 
1226
        *-next )
 
1227
                os=-nextstep
 
1228
                ;;
741
1229
        *-sequent)
742
1230
                os=-ptx
743
1231
                ;;
765
1253
        *-sgi)
766
1254
                os=-irix
767
1255
                ;;
 
1256
        *-siemens)
 
1257
                os=-sysv4
 
1258
                ;;
768
1259
        *-masscomp)
769
1260
                os=-rtu
770
1261
                ;;
 
1262
        f30[01]-fujitsu | f700-fujitsu)
 
1263
                os=-uxpv
 
1264
                ;;
 
1265
        *-rom68k)
 
1266
                os=-coff
 
1267
                ;;
 
1268
        *-*bug)
 
1269
                os=-coff
 
1270
                ;;
 
1271
        *-apple)
 
1272
                os=-macos
 
1273
                ;;
 
1274
        *-atari*)
 
1275
                os=-mint
 
1276
                ;;
771
1277
        *)
772
1278
                os=-none
773
1279
                ;;
786
1292
                        -sunos*)
787
1293
                                vendor=sun
788
1294
                                ;;
789
 
                        -lynxos*)
790
 
                                vendor=lynx
791
 
                                ;;
792
1295
                        -aix*)
793
1296
                                vendor=ibm
794
1297
                                ;;
 
1298
                        -beos*)
 
1299
                                vendor=be
 
1300
                                ;;
795
1301
                        -hpux*)
796
1302
                                vendor=hp
797
1303
                                ;;
 
1304
                        -mpeix*)
 
1305
                                vendor=hp
 
1306
                                ;;
798
1307
                        -hiux*)
799
1308
                                vendor=hitachi
800
1309
                                ;;
810
1319
                        -genix*)
811
1320
                                vendor=ns
812
1321
                                ;;
813
 
                        -mvs*)
 
1322
                        -mvs* | -opened*)
814
1323
                                vendor=ibm
815
1324
                                ;;
816
 
          -macos*)
817
 
               vendor=apple
818
 
                                ;;
819
1325
                        -ptx*)
820
1326
                                vendor=sequent
821
1327
                                ;;
 
1328
                        -vxsim* | -vxworks*)
 
1329
                                vendor=wrs
 
1330
                                ;;
 
1331
                        -aux*)
 
1332
                                vendor=apple
 
1333
                                ;;
 
1334
                        -hms*)
 
1335
                                vendor=hitachi
 
1336
                                ;;
 
1337
                        -mpw* | -macos*)
 
1338
                                vendor=apple
 
1339
                                ;;
 
1340
                        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 
1341
                                vendor=atari
 
1342
                                ;;
822
1343
                esac
823
1344
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
824
1345
                ;;
825
1346
esac
826
1347
 
827
1348
echo $basic_machine$os
 
1349
exit 0
 
1350
 
 
1351
# Local variables:
 
1352
# eval: (add-hook 'write-file-hooks 'time-stamp)
 
1353
# time-stamp-start: "timestamp='"
 
1354
# time-stamp-format: "%:y-%02m-%02d"
 
1355
# time-stamp-end: "'"
 
1356
# End: