Make checking the linux installed headers optional (instead of systematic).
1 # Backport glibc-2.3.2's config.sub to glibc-2.1.3
2 # Should fix nonfatal but annoying like
3 # checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
4 # ../glibc-2.1.3/configure: line 1227: test: i686-unknown-linux-gnu: unary operator expected
5 # checking build system type... Configuration name missing.
8 --- glibc-2.1.3/scripts/config.sub 2004-03-24 13:27:06.000000000 -0800
9 +++ glibc-2.3.2/scripts/config.sub 2002-07-10 00:24:32.000000000 -0700
12 -# Configuration validation subroutine script, version 1.1.
13 -# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
14 +# Configuration validation subroutine script.
15 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
16 +# 2000, 2001, 2002 Free Software Foundation, Inc.
18 +timestamp='2002-07-03'
20 # This file is (in principle) common to ALL GNU software.
21 # The presence of a machine in this file suggests that SOME GNU software
22 # can handle that machine. It does not imply ALL GNU software can.
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.
27 +# Please send patches to <config-patches@gnu.org>. Submit a context
28 +# diff and a properly formatted ChangeLog entry.
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.
34 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
35 # It is wrong to echo any other type of specification.
39 - echo Configuration name missing. 1>&2
40 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
41 - echo "or $0 ALIAS" 1>&2
42 - echo where ALIAS is a recognized configuration type. 1>&2
45 +me=`echo "$0" | sed -e 's,.*/,,'`
47 -# First pass through any local machine types.
56 +Usage: $0 [OPTION] CPU-MFR-OPSYS
59 +Canonicalize a configuration name.
62 + -h, --help print this help, then exit
63 + -t, --time-stamp print date of last modification, then exit
64 + -v, --version print version number, then exit
66 +Report bugs and patches to <config-patches@gnu.org>."
69 +GNU config.sub ($timestamp)
71 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
72 +Free Software Foundation, Inc.
74 +This is free software; see the source for copying conditions. There is NO
75 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
78 +Try \`$me --help' for more information."
81 +while test $# -gt 0 ; do
83 + --time-stamp | --time* | -t )
84 + echo "$timestamp" ; exit 0 ;;
86 + echo "$version" ; exit 0 ;;
87 + --help | --h* | -h )
88 + echo "$usage"; exit 0 ;;
89 + -- ) # Stop option processing
91 + - ) # Use stdin as input.
94 + echo "$me: invalid option $1$help"
98 + # First pass through any local machine types.
108 + 0) echo "$me: missing argument$help" >&2
111 + *) echo "$me: too many arguments$help" >&2
115 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
116 # Here we must recognize all the valid KERNEL-OS combinations.
117 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
120 + nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
122 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
125 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
126 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
127 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
148 @@ -166,27 +224,58 @@
149 case $basic_machine in
150 # Recognize the basic CPU types without company name.
151 # Some are omitted here because they have special meanings below.
152 - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
153 - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
154 - | 580 | i960 | h8300 \
155 - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
156 - | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
157 - | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
158 - | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
159 - | mips64orion | mips64orionel | mipstx39 | mipstx39el \
160 - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
161 - | mips64vr5000 | miprs64vr5000el | mcore \
162 - | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
163 - | thumb | d10v | fr30)
166 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
167 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
168 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
170 + | d10v | d30v | dlx | dsp16xx \
172 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
173 + | i370 | i860 | i960 | ia64 \
175 + | m32r | m68000 | m68k | m88k | mcore \
176 + | mips | mipsbe | mipseb | mipsel | mipsle \
178 + | mips64 | mips64el \
179 + | mips64orion | mips64orionel \
180 + | mips64vr4100 | mips64vr4100el \
181 + | mips64vr4300 | mips64vr4300el \
182 + | mips64vr5000 | mips64vr5000el \
183 + | mipsisa32 | mipsisa32el \
184 + | mipsisa64 | mipsisa64el \
185 + | mipsisa64sb1 | mipsisa64sb1el \
186 + | mipstx39 | mipstx39el \
187 + | mn10200 | mn10300 \
189 + | openrisc | or32 \
190 + | pdp10 | pdp11 | pj | pjl \
191 + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
193 + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
195 + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
197 + | tahoe | thumb | tic80 | tron \
200 + | x86 | xscale | xstormy16 | xtensa \
202 + basic_machine=$basic_machine-unknown
204 + m6811 | m68hc11 | m6812 | m68hc12)
205 + # Motorola 68HC11/12.
206 basic_machine=$basic_machine-unknown
209 - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
210 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
213 # We use `pc' rather than `unknown'
214 # because (1) that's what they normally are, and
215 # (2) the word "unknown" tends to confuse beginning users.
218 basic_machine=$basic_machine-pc
220 # Object if more than one company name word.
221 @@ -195,24 +284,54 @@
224 # Recognize the basic CPU types with company name.
225 - # FIXME: clean up the formatting here.
226 - vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
227 - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
228 - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
229 - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
231 - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
232 - | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
233 - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
234 - | clipper-* | orion-* \
235 - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
236 - | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
237 - | mips64el-* | mips64orion-* | mips64orionel-* \
238 - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
239 - | mipstx39-* | mipstx39el-* | mcore-* \
240 - | f301-* | armv*-* | t3e-* \
241 - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
242 - | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
245 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
246 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
247 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
248 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
251 + | c[123]* | c30-* | [cjt]90-* | c54x-* \
252 + | clipper-* | cydra-* \
253 + | d10v-* | d30v-* | dlx-* \
255 + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
256 + | h8300-* | h8500-* \
257 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
258 + | i*86-* | i860-* | i960-* | ia64-* \
261 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
262 + | m88110-* | m88k-* | mcore-* \
263 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
265 + | mips64-* | mips64el-* \
266 + | mips64orion-* | mips64orionel-* \
267 + | mips64vr4100-* | mips64vr4100el-* \
268 + | mips64vr4300-* | mips64vr4300el-* \
269 + | mips64vr5000-* | mips64vr5000el-* \
270 + | mipsisa32-* | mipsisa32el-* \
271 + | mipsisa64-* | mipsisa64el-* \
272 + | mipsisa64sb1-* | mipsisa64sb1el-* \
273 + | mipstx39 | mipstx39el \
274 + | none-* | np1-* | ns16k-* | ns32k-* \
276 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
277 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
279 + | romp-* | rs6000-* \
280 + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
281 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
282 + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
283 + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
284 + | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
285 + | v850-* | v850e-* | vax-* \
287 + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
292 # Recognize the various machine names and aliases which stand
293 # for a CPU type and a company and sometimes even an OS.
294 @@ -249,14 +368,14 @@
298 - basic_machine=m68k-cbm
299 + basic_machine=m68k-unknown
302 - basic_machine=m68k-cbm
303 + basic_machine=m68k-unknown
307 - basic_machine=m68k-cbm
308 + basic_machine=m68k-unknown
313 basic_machine=ns32k-sequent
317 + basic_machine=c90-cray
321 basic_machine=c1-convex
323 @@ -295,27 +418,30 @@
324 basic_machine=c38-convex
328 - basic_machine=ymp-cray
332 - basic_machine=cray2-cray
336 - basic_machine=c90-cray
338 + basic_machine=j90-cray
342 basic_machine=m68k-crds
344 + cris | cris-* | etrax*)
345 + basic_machine=cris-axis
348 basic_machine=m68k-da30
350 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
351 basic_machine=mips-dec
353 + decsystem10* | dec10*)
354 + basic_machine=pdp10-dec
357 + decsystem20* | dec20*)
358 + basic_machine=pdp10-dec
361 delta | 3300 | motorola-3300 | motorola-delta \
362 | 3300-motorola | delta-motorola)
363 basic_machine=m68k-motorola
365 basic_machine=tron-gmicro
369 + basic_machine=i386-pc
373 basic_machine=hppa1.1-hitachi
375 @@ -432,19 +562,19 @@
376 basic_machine=i370-ibm
378 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
381 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
386 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
391 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
396 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
400 basic_machine=i386-unknown
404 - basic_machine=i386-unknown
407 - i386-mingw32 | mingw32)
408 - basic_machine=i386-unknown
412 - basic_machine=i386-qnx
415 basic_machine=mips-sgi
418 basic_machine=ns32k-utek
422 + basic_machine=i386-pc
426 basic_machine=m68000-convergent
428 @@ -499,26 +622,26 @@
429 basic_machine=m68k-atari
433 - basic_machine=mipsel-unknown
437 - basic_machine=mips-unknown
441 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
444 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
447 + basic_machine=mmix-knuth
451 basic_machine=m68k-rom68k
455 + basic_machine=powerpc-unknown
459 - basic_machine=i386-unknown
460 + basic_machine=i386-pc
464 @@ -582,13 +705,24 @@
465 basic_machine=i960-intel
469 + basic_machine=mips-compaq
473 basic_machine=np1-gould
476 + basic_machine=nsr-tandem
479 basic_machine=hppa1.1-oki
483 + basic_machine=or32-unknown
487 basic_machine=m68000-ericsson
489 @@ -614,28 +748,28 @@
491 basic_machine=ns32k-pc532
493 - pentium | p5 | k5 | k6 | nexen)
494 + pentium | p5 | k5 | k6 | nexgen | viac3)
495 basic_machine=i586-pc
497 - pentiumpro | p6 | 6x86)
498 + pentiumpro | p6 | 6x86 | athlon)
499 basic_machine=i686-pc
501 pentiumii | pentium2)
502 - basic_machine=i786-pc
503 + basic_machine=i686-pc
505 - pentium-* | p5-* | k5-* | k6-* | nexen-*)
506 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
507 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
509 - pentiumpro-* | p6-* | 6x86-*)
510 + pentiumpro-* | p6-* | 6x86-* | athlon-*)
511 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
513 pentiumii-* | pentium2-*)
514 - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
515 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
518 basic_machine=pn-gould
520 - power) basic_machine=rs6000-ibm
521 + power) basic_machine=power-ibm
523 ppc) basic_machine=powerpc-unknown
526 ppcle-* | powerpclittle-*)
527 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
529 + ppc64) basic_machine=powerpc64-unknown
531 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
533 + ppc64le | powerpc64little | ppc64-le | powerpc64-little)
534 + basic_machine=powerpc64le-unknown
536 + ppc64le-* | powerpc64little-*)
537 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
540 basic_machine=i386-ibm
543 + basic_machine=i586-unknown
547 basic_machine=m68k-rom68k
551 basic_machine=romp-ibm
554 + basic_machine=s390-ibm
557 + basic_machine=s390x-ibm
560 basic_machine=a29k-amd
563 basic_machine=sh-hitachi
567 + sparclite-wrs | simso-wrs)
568 basic_machine=sparclite-wrs
571 @@ -729,20 +883,40 @@
572 sun386 | sun386i | roadrunner)
573 basic_machine=i386-sun
576 + basic_machine=sv1-cray
580 basic_machine=i386-sequent
584 + basic_machine=alpha-cray
588 - basic_machine=t3e-cray
589 + basic_machine=alphaev5-cray
593 + basic_machine=t90-cray
597 + basic_machine=tic54x-unknown
601 basic_machine=mipstx39-unknown
604 basic_machine=mipstx39el-unknown
607 + basic_machine=pdp10-xkl
611 basic_machine=m68k-ncr
613 @@ -789,13 +963,17 @@
614 basic_machine=hppa1.1-winbond
618 - basic_machine=xmp-cray
621 + basic_machine=i386-pc
622 + os=-windows32-msvcrt
625 basic_machine=xps100-honeywell
628 + basic_machine=ymp-cray
632 basic_machine=z8k-unknown
636 basic_machine=hppa1.1-oki
639 - if [ x$os = x-linux-gnu ]; then
640 - basic_machine=mips-unknown
642 - basic_machine=mips-mips
646 basic_machine=romp-ibm
648 @@ -832,13 +1003,23 @@
650 basic_machine=vax-dec
653 + # there are many clones, so DEC is not a safe bet
654 + basic_machine=pdp10-unknown
657 basic_machine=pdp11-dec
660 basic_machine=we32k-att
663 + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
664 + basic_machine=sh-unknown
667 + basic_machine=sh64-unknown
669 + sparc | sparcv9 | sparcv9b)
670 basic_machine=sparc-sun
674 basic_machine=c4x-none
678 + # Make sure to match an already-canonicalized machine name.
681 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
683 @@ -916,14 +1100,31 @@
684 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
685 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
686 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
687 + | -chorusos* | -chorusrdb* \
688 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
689 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
690 - | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
691 + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
692 + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
693 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
694 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
695 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
696 # Remember, each alternative MUST END IN *, to match a version number.
699 + case $basic_machine in
710 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
711 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
712 - | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
713 + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
716 os=`echo $os | sed -e 's|mac|macos|'`
727 @@ -955,15 +1159,24 @@
749 # Preserve the version number of sinix5.
751 os=`echo $os | sed -e 's|sinix|sysv|'`
762 @@ -1001,7 +1211,7 @@
767 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
771 @@ -1035,6 +1245,10 @@
775 + # This must come before the *-dec entry.
782 @@ -1062,6 +1276,9 @@
789 *-tti) # must be before sparc entry or we get the wrong os.
792 @@ -1143,7 +1360,7 @@
797 + f30[01]-fujitsu | f700-fujitsu)
801 @@ -1209,7 +1426,7 @@
805 - -vxsim* | -vxworks*)
806 + -vxsim* | -vxworks* | -windiss*)
810 @@ -1221,12 +1438,23 @@
815 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
822 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
826 echo $basic_machine$os
830 +# eval: (add-hook 'write-file-hooks 'time-stamp)
831 +# time-stamp-start: "timestamp='"
832 +# time-stamp-format: "%:y-%02m-%02d"
833 +# time-stamp-end: "'"