/[public]/psiconv/trunk/config.sub
ViewVC logotype

Diff of /psiconv/trunk/config.sub

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2 Revision 96
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script, version 1.1. 2# Configuration validation subroutine script, version 1.1.
3# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
4# Free Software Foundation, Inc.
5#
4# This file is (in principle) common to ALL GNU software. 6# This file is (in principle) common to ALL GNU software.
5# The presence of a machine in this file suggests that SOME GNU software 7# 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. 8# can handle that machine. It does not imply ALL GNU software can.
7# 9#
8# This file is free software; you can redistribute it and/or modify 10# This file is free software; you can redistribute it and/or modify
23# As a special exception to the GNU General Public License, if you 25# As a special exception to the GNU General Public License, if you
24# distribute this file as part of a program that contains a 26# distribute this file as part of a program that contains a
25# configuration script generated by Autoconf, you may include it under 27# configuration script generated by Autoconf, you may include it under
26# the same distribution terms that you use for the rest of that program. 28# the same distribution terms that you use for the rest of that program.
27 29
30# Written by Per Bothner <bothner@cygnus.com>.
31# Please send patches to <config-patches@gnu.org>.
32#
28# Configuration subroutine to validate and canonicalize a configuration type. 33# Configuration subroutine to validate and canonicalize a configuration type.
29# Supply the specified configuration type as an argument. 34# 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. 35# 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. 36# Otherwise, we print the canonical config type on stdout and succeed.
32 37
66 71
67# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 72# 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. 73# Here we must recognize all the valid KERNEL-OS combinations.
69maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 74maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
70case $maybe_os in 75case $maybe_os in
71 linux-gnu*) 76 nto-qnx* | linux-gnu*)
72 os=-$maybe_os 77 os=-$maybe_os
73 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 78 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
74 ;; 79 ;;
75 *) 80 *)
76 basic_machine=`echo $1 | sed 's/-[^-]*$//'` 81 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
103 basic_machine=$1 108 basic_machine=$1
104 ;; 109 ;;
105 -scout) 110 -scout)
106 ;; 111 ;;
107 -wrs) 112 -wrs)
108 os=vxworks 113 os=-vxworks
109 basic_machine=$1 114 basic_machine=$1
110 ;; 115 ;;
111 -hiux*) 116 -hiux*)
112 os=-hiuxwe2 117 os=-hiuxwe2
113 ;; 118 ;;
153 -windowsnt*) 158 -windowsnt*)
154 os=`echo $os | sed -e 's/windowsnt/winnt/'` 159 os=`echo $os | sed -e 's/windowsnt/winnt/'`
155 ;; 160 ;;
156 -psos*) 161 -psos*)
157 os=-psos 162 os=-psos
163 ;;
164 -mint | -mint[0-9]*)
165 basic_machine=m68k-atari
166 os=-mint
158 ;; 167 ;;
159esac 168esac
160 169
161# Decode aliases for certain CPU-COMPANY combinations. 170# Decode aliases for certain CPU-COMPANY combinations.
162case $basic_machine in 171case $basic_machine in
163 # Recognize the basic CPU types without company name. 172 # Recognize the basic CPU types without company name.
164 # Some are omitted here because they have special meanings below. 173 # Some are omitted here because they have special meanings below.
165 tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ 174 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
166 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ 175 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
167 | 580 | i960 | h8300 \ 176 | 580 | i960 | h8300 \
177 | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
168 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ 178 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
179 | hppa64 \
169 | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ 180 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
181 | alphaev6[78] \
170 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ 182 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
171 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ 183 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
172 | mips64orion | mips64orionel | mipstx39 | mipstx39el \ 184 | mips64orion | mips64orionel | mipstx39 | mipstx39el \
173 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ 185 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
174 | mips64vr5000 | miprs64vr5000el \ 186 | mips64vr5000 | miprs64vr5000el | mcore \
175 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ 187 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
176 | thumb | d10v) 188 | thumb | d10v | fr30 | avr)
177 basic_machine=$basic_machine-unknown 189 basic_machine=$basic_machine-unknown
178 ;; 190 ;;
179 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) 191 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
180 ;; 192 ;;
181 193
182 # We use `pc' rather than `unknown' 194 # We use `pc' rather than `unknown'
183 # because (1) that's what they normally are, and 195 # because (1) that's what they normally are, and
184 # (2) the word "unknown" tends to confuse beginning users. 196 # (2) the word "unknown" tends to confuse beginning users.
189 *-*-*) 201 *-*-*)
190 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 202 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
191 exit 1 203 exit 1
192 ;; 204 ;;
193 # Recognize the basic CPU types with company name. 205 # Recognize the basic CPU types with company name.
206 # FIXME: clean up the formatting here.
194 vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ 207 vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
195 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ 208 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
196 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ 209 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
197 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ 210 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
198 | xmp-* | ymp-* \ 211 | xmp-* | ymp-* \
212 | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
199 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ 213 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
214 | hppa2.0n-* | hppa64-* \
200 | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ 215 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
216 | alphaev6[78]-* \
201 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ 217 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
202 | clipper-* | orion-* \ 218 | clipper-* | orion-* \
203 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ 219 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
204 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ 220 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
205 | mips64el-* | mips64orion-* | mips64orionel-* \ 221 | mips64el-* | mips64orion-* | mips64orionel-* \
206 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ 222 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
207 | mipstx39-* | mipstx39el-* \ 223 | mipstx39-* | mipstx39el-* | mcore-* \
208 | f301-* | armv*-* | t3e-* \ 224 | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
209 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ 225 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
210 | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) 226 | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
227 | bs2000-*)
211 ;; 228 ;;
212 # Recognize the various machine names and aliases which stand 229 # Recognize the various machine names and aliases which stand
213 # for a CPU type and a company and sometimes even an OS. 230 # for a CPU type and a company and sometimes even an OS.
214 386bsd) 231 386bsd)
215 basic_machine=i386-unknown 232 basic_machine=i386-unknown
423 basic_machine=hppa1.1-hp 440 basic_machine=hppa1.1-hp
424 os=-proelf 441 os=-proelf
425 ;; 442 ;;
426 i370-ibm* | ibm*) 443 i370-ibm* | ibm*)
427 basic_machine=i370-ibm 444 basic_machine=i370-ibm
428 os=-mvs
429 ;; 445 ;;
430# I'm not sure what "Sysv32" means. Should this be sysv3.2? 446# I'm not sure what "Sysv32" means. Should this be sysv3.2?
431 i[34567]86v32) 447 i[34567]86v32)
432 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 448 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
433 os=-sysv32 449 os=-sysv32
486 os=-sysv 502 os=-sysv
487 ;; 503 ;;
488 miniframe) 504 miniframe)
489 basic_machine=m68000-convergent 505 basic_machine=m68000-convergent
490 ;; 506 ;;
491 *mint | *MiNT) 507 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
492 basic_machine=m68k-atari 508 basic_machine=m68k-atari
493 os=-mint 509 os=-mint
494 ;; 510 ;;
495 mipsel*-linux*) 511 mipsel*-linux*)
496 basic_machine=mipsel-unknown 512 basic_machine=mipsel-unknown
504 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 520 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
505 ;; 521 ;;
506 mips3*) 522 mips3*)
507 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 523 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
508 ;; 524 ;;
525 mmix*)
526 basic_machine=mmix-knuth
527 os=-mmixware
528 ;;
509 monitor) 529 monitor)
510 basic_machine=m68k-rom68k 530 basic_machine=m68k-rom68k
511 os=-coff 531 os=-coff
512 ;; 532 ;;
513 msdos) 533 msdos)
514 basic_machine=i386-unknown 534 basic_machine=i386-unknown
515 os=-msdos 535 os=-msdos
516 ;; 536 ;;
537 mvs)
538 basic_machine=i370-ibm
539 os=-mvs
540 ;;
517 ncr3000) 541 ncr3000)
518 basic_machine=i486-ncr 542 basic_machine=i486-ncr
519 os=-sysv4 543 os=-sysv4
520 ;; 544 ;;
521 netbsd386) 545 netbsd386)
522 basic_machine=i386-unknown 546 basic_machine=i386-unknown
523 os=-netbsd 547 os=-netbsd
524 ;; 548 ;;
525 netwinder) 549 netwinder)
526 basic_machine=armv4l-corel 550 basic_machine=armv4l-rebel
527 os=-linux 551 os=-linux
528 ;; 552 ;;
529 news | news700 | news800 | news900) 553 news | news700 | news800 | news900)
530 basic_machine=m68k-sony 554 basic_machine=m68k-sony
531 os=-newsos 555 os=-newsos
572 os=-mon960 596 os=-mon960
573 ;; 597 ;;
574 np1) 598 np1)
575 basic_machine=np1-gould 599 basic_machine=np1-gould
576 ;; 600 ;;
601 nsr-tandem)
602 basic_machine=nsr-tandem
603 ;;
577 op50n-* | op60c-*) 604 op50n-* | op60c-*)
578 basic_machine=hppa1.1-oki 605 basic_machine=hppa1.1-oki
579 os=-proelf 606 os=-proelf
580 ;; 607 ;;
581 OSE68000 | ose68000) 608 OSE68000 | ose68000)
715 sun4) 742 sun4)
716 basic_machine=sparc-sun 743 basic_machine=sparc-sun
717 ;; 744 ;;
718 sun386 | sun386i | roadrunner) 745 sun386 | sun386i | roadrunner)
719 basic_machine=i386-sun 746 basic_machine=i386-sun
747 ;;
748 sv1)
749 basic_machine=sv1-cray
750 os=-unicos
720 ;; 751 ;;
721 symmetry) 752 symmetry)
722 basic_machine=i386-sequent 753 basic_machine=i386-sequent
723 os=-dynix 754 os=-dynix
724 ;; 755 ;;
905 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 936 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
906 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 937 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
907 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 938 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
908 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 939 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
909 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 940 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
910 | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) 941 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
942 | -openstep* | -oskit*)
911 # Remember, each alternative MUST END IN *, to match a version number. 943 # Remember, each alternative MUST END IN *, to match a version number.
944 ;;
945 -qnx*)
946 case $basic_machine in
947 x86-* | i[34567]86-*)
948 ;;
949 *)
950 os=-nto$os
951 ;;
952 esac
953 ;;
954 -nto*)
955 os=-nto-qnx
912 ;; 956 ;;
913 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 957 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
914 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 958 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
915 | -macos* | -mpw* | -magic* | -mon960* | -lnews*) 959 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
916 ;; 960 ;;
917 -mac*) 961 -mac*)
918 os=`echo $os | sed -e 's|mac|macos|'` 962 os=`echo $os | sed -e 's|mac|macos|'`
919 ;; 963 ;;
920 -linux*) 964 -linux*)
924 os=`echo $os | sed -e 's|sunos5|solaris2|'` 968 os=`echo $os | sed -e 's|sunos5|solaris2|'`
925 ;; 969 ;;
926 -sunos6*) 970 -sunos6*)
927 os=`echo $os | sed -e 's|sunos6|solaris3|'` 971 os=`echo $os | sed -e 's|sunos6|solaris3|'`
928 ;; 972 ;;
973 -opened*)
974 os=-openedition
975 ;;
976 -wince*)
977 os=-wince
978 ;;
929 -osfrose*) 979 -osfrose*)
930 os=-osfrose 980 os=-osfrose
931 ;; 981 ;;
932 -osf*) 982 -osf*)
933 os=-osf 983 os=-osf
947 -ctix* | -uts*) 997 -ctix* | -uts*)
948 os=-sysv 998 os=-sysv
949 ;; 999 ;;
950 -ns2 ) 1000 -ns2 )
951 os=-nextstep2 1001 os=-nextstep2
1002 ;;
1003 -nsk)
1004 os=-nsk
952 ;; 1005 ;;
953 # Preserve the version number of sinix5. 1006 # Preserve the version number of sinix5.
954 -sinix5.*) 1007 -sinix5.*)
955 os=`echo $os | sed -e 's|sinix|sysv|'` 1008 os=`echo $os | sed -e 's|sinix|sysv|'`
956 ;; 1009 ;;
1010 1063
1011case $basic_machine in 1064case $basic_machine in
1012 *-acorn) 1065 *-acorn)
1013 os=-riscix1.2 1066 os=-riscix1.2
1014 ;; 1067 ;;
1015 arm*-corel) 1068 arm*-rebel)
1016 os=-linux 1069 os=-linux
1017 ;; 1070 ;;
1018 arm*-semi) 1071 arm*-semi)
1019 os=-aout 1072 os=-aout
1020 ;; 1073 ;;
1184 vendor=omron 1237 vendor=omron
1185 ;; 1238 ;;
1186 -genix*) 1239 -genix*)
1187 vendor=ns 1240 vendor=ns
1188 ;; 1241 ;;
1189 -mvs*) 1242 -mvs* | -opened*)
1190 vendor=ibm 1243 vendor=ibm
1191 ;; 1244 ;;
1192 -ptx*) 1245 -ptx*)
1193 vendor=sequent 1246 vendor=sequent
1194 ;; 1247 ;;

Legend:
Removed from v.2  
changed lines
  Added in v.96

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26