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