1 --- nfs-utils-1.0.7.orig/config.sub
2 +++ nfs-utils-1.0.7/config.sub
5 # Configuration validation subroutine script.
6 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
7 -# Free Software Foundation, Inc.
8 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
9 +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
11 -timestamp='2001-03-19'
12 +timestamp='2005-02-10'
14 # This file is (in principle) common to ALL GNU software.
15 # The presence of a machine in this file suggests that SOME GNU software
17 # configuration script generated by Autoconf, you may include it under
18 # the same distribution terms that you use for the rest of that program.
20 -# Please send patches to <config-patches@gnu.org>.
21 +# Please send patches to <config-patches@gnu.org>. Submit a context
22 +# diff and a properly formatted ChangeLog entry.
24 # Configuration subroutine to validate and canonicalize a configuration type.
25 # Supply the specified configuration type as an argument.
28 GNU config.sub ($timestamp)
30 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
31 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
32 Free Software Foundation, Inc.
34 This is free software; see the source for copying conditions. There is NO
36 # Here we must recognize all the valid KERNEL-OS combinations.
37 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
39 - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
40 + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
41 + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
43 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
46 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
47 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
48 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
50 + -apple | -axis | -knuth | -cray)
71 - basic_machine=i370-ibm
75 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
77 case $basic_machine in
78 # Recognize the basic CPU types without company name.
79 # Some are omitted here because they have special meanings below.
80 - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
81 - | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
82 - | pyramid | mn10200 | mn10300 | tron | a29k \
83 - | 580 | i960 | h8300 \
84 - | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
85 - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
87 - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
89 - | we32k | ns16k | clipper | i370 | sh | sh[34] \
90 - | powerpc | powerpcle \
91 - | 1750a | dsp16xx | pdp10 | pdp11 \
92 - | mips16 | mips64 | mipsel | mips64el \
93 - | mips64orion | mips64orionel | mipstx39 | mipstx39el \
94 - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
95 - | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
96 - | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
97 - | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
101 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
102 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
104 + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
106 + | d10v | d30v | dlx | dsp16xx \
108 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
109 + | i370 | i860 | i960 | ia64 \
111 + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
112 + | mips | mipsbe | mipseb | mipsel | mipsle \
114 + | mips64 | mips64el \
115 + | mips64vr | mips64vrel \
116 + | mips64orion | mips64orionel \
117 + | mips64vr4100 | mips64vr4100el \
118 + | mips64vr4300 | mips64vr4300el \
119 + | mips64vr5000 | mips64vr5000el \
120 + | mipsisa32 | mipsisa32el \
121 + | mipsisa32r2 | mipsisa32r2el \
122 + | mipsisa64 | mipsisa64el \
123 + | mipsisa64r2 | mipsisa64r2el \
124 + | mipsisa64sb1 | mipsisa64sb1el \
125 + | mipsisa64sr71k | mipsisa64sr71kel \
126 + | mipstx39 | mipstx39el \
127 + | mn10200 | mn10300 \
130 + | openrisc | or32 \
131 + | pdp10 | pdp11 | pj | pjl \
132 + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
134 + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
136 + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
138 + | tahoe | thumb | tic4x | tic80 | tron \
141 + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
143 basic_machine=$basic_machine-unknown
145 m6811 | m68hc11 | m6812 | m68hc12)
146 @@ -245,13 +276,13 @@
147 basic_machine=$basic_machine-unknown
150 - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
151 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
154 # We use `pc' rather than `unknown'
155 # because (1) that's what they normally are, and
156 # (2) the word "unknown" tends to confuse beginning users.
157 - i[234567]86 | x86_64)
159 basic_machine=$basic_machine-pc
161 # Object if more than one company name word.
162 @@ -260,30 +291,62 @@
165 # Recognize the basic CPU types with company name.
166 - # FIXME: clean up the formatting here.
167 - vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
168 - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
169 - | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
170 - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
171 - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
173 - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
174 - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
175 - | hppa2.0n-* | hppa64-* \
176 - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
178 - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
179 - | clipper-* | orion-* \
180 - | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
181 - | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
182 - | mips64el-* | mips64orion-* | mips64orionel-* \
183 - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
184 - | mipstx39-* | mipstx39el-* | mcore-* \
185 - | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
187 - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
188 - | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
189 - | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
192 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
193 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
194 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
195 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
198 + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
199 + | clipper-* | craynv-* | cydra-* \
200 + | d10v-* | d30v-* | dlx-* \
202 + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
203 + | h8300-* | h8500-* \
204 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
205 + | i*86-* | i860-* | i960-* | ia64-* \
206 + | ip2k-* | iq2000-* \
207 + | m32r-* | m32rle-* \
208 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
209 + | m88110-* | m88k-* | maxq-* | mcore-* \
210 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
212 + | mips64-* | mips64el-* \
213 + | mips64vr-* | mips64vrel-* \
214 + | mips64orion-* | mips64orionel-* \
215 + | mips64vr4100-* | mips64vr4100el-* \
216 + | mips64vr4300-* | mips64vr4300el-* \
217 + | mips64vr5000-* | mips64vr5000el-* \
218 + | mipsisa32-* | mipsisa32el-* \
219 + | mipsisa32r2-* | mipsisa32r2el-* \
220 + | mipsisa64-* | mipsisa64el-* \
221 + | mipsisa64r2-* | mipsisa64r2el-* \
222 + | mipsisa64sb1-* | mipsisa64sb1el-* \
223 + | mipsisa64sr71k-* | mipsisa64sr71kel-* \
224 + | mipstx39-* | mipstx39el-* \
227 + | none-* | np1-* | ns16k-* | ns32k-* \
229 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
230 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
232 + | romp-* | rs6000-* \
233 + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
234 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
235 + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
236 + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
237 + | tahoe-* | thumb-* \
238 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
240 + | v850-* | v850e-* | vax-* \
242 + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
243 + | xstormy16-* | xtensa-* \
247 # Recognize the various machine names and aliases which stand
248 # for a CPU type and a company and sometimes even an OS.
250 basic_machine=a29k-amd
254 + basic_machine=abacus-unknown
257 basic_machine=m68010-adobe
260 basic_machine=a29k-none
264 + basic_machine=x86_64-pc
267 + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
270 basic_machine=580-amdahl
273 basic_machine=ns32k-sequent
277 + basic_machine=c90-cray
281 basic_machine=c1-convex
283 @@ -366,30 +442,45 @@
284 basic_machine=c38-convex
288 - basic_machine=ymp-cray
290 + basic_machine=j90-cray
294 - basic_machine=cray2-cray
297 + basic_machine=craynv-cray
301 - basic_machine=${basic_machine}-cray
304 + basic_machine=cr16c-unknown
308 basic_machine=m68k-crds
310 + crisv32 | crisv32-* | etraxfs*)
311 + basic_machine=crisv32-axis
313 cris | cris-* | etrax*)
314 basic_machine=cris-axis
317 + basic_machine=crx-unknown
321 basic_machine=m68k-da30
323 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
324 basic_machine=mips-dec
326 + decsystem10* | dec10*)
327 + basic_machine=pdp10-dec
330 + decsystem20* | dec20*)
331 + basic_machine=pdp10-dec
334 delta | 3300 | motorola-3300 | motorola-delta \
335 | 3300-motorola | delta-motorola)
336 basic_machine=m68k-motorola
338 basic_machine=m88k-motorola
342 + basic_machine=i586-pc
346 basic_machine=rs6000-bull
348 @@ -506,23 +601,23 @@
349 basic_machine=hppa1.1-hp
354 basic_machine=i370-ibm
356 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
359 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
364 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
369 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
374 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
377 @@ -570,28 +665,20 @@
378 basic_machine=m68k-atari
382 - basic_machine=mipsel-unknown
386 - basic_machine=mips-unknown
390 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
393 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
396 - basic_machine=mmix-knuth
400 basic_machine=m68k-rom68k
404 + basic_machine=powerpc-unknown
408 basic_machine=i386-pc
411 basic_machine=hppa1.1-oki
415 + basic_machine=or32-unknown
419 + basic_machine=powerpc-ibm
423 basic_machine=m68000-ericsson
425 @@ -693,42 +788,58 @@
427 basic_machine=m68k-tti
431 basic_machine=ns32k-pc532
433 - pentium | p5 | k5 | k6 | nexgen)
434 + pentium | p5 | k5 | k6 | nexgen | viac3)
435 basic_machine=i586-pc
437 - pentiumpro | p6 | 6x86 | athlon)
438 + pentiumpro | p6 | 6x86 | athlon | athlon_*)
439 basic_machine=i686-pc
441 - pentiumii | pentium2)
442 + pentiumii | pentium2 | pentiumiii | pentium3)
443 basic_machine=i686-pc
445 - pentium-* | p5-* | k5-* | k6-* | nexgen-*)
447 + basic_machine=i786-pc
449 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
450 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
452 pentiumpro-* | p6-* | 6x86-* | athlon-*)
453 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
455 - pentiumii-* | pentium2-*)
456 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
457 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
460 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
463 basic_machine=pn-gould
465 power) basic_machine=power-ibm
467 ppc) basic_machine=powerpc-unknown
470 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
472 ppcle | powerpclittle | ppc-le | powerpc-little)
473 basic_machine=powerpcle-unknown
476 ppcle-* | powerpclittle-*)
477 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
479 + ppc64) basic_machine=powerpc64-unknown
481 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
483 + ppc64le | powerpc64little | ppc64-le | powerpc64-little)
484 + basic_machine=powerpc64le-unknown
486 + ppc64le-* | powerpc64little-*)
487 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
490 basic_machine=i386-ibm
492 @@ -746,10 +857,26 @@
494 basic_machine=romp-ibm
497 + basic_machine=s390-ibm
500 + basic_machine=s390x-ibm
503 basic_machine=a29k-amd
507 + basic_machine=mipsisa64sb1-unknown
510 + basic_machine=mipsisa64sb1el-unknown
513 + basic_machine=mips-sei
517 basic_machine=i386-sequent
520 basic_machine=sh-hitachi
525 + basic_machine=sh64-unknown
527 + sparclite-wrs | simso-wrs)
528 basic_machine=sparclite-wrs
531 @@ -824,22 +954,42 @@
535 - basic_machine=t3e-cray
536 + basic_machine=alphaev5-cray
540 + basic_machine=t90-cray
544 basic_machine=tic54x-unknown
548 + basic_machine=tic55x-unknown
552 + basic_machine=tic6x-unknown
556 basic_machine=mipstx39-unknown
559 basic_machine=mipstx39el-unknown
562 + basic_machine=pdp10-xkl
566 basic_machine=m68k-ncr
569 + basic_machine=s390x-ibm
573 basic_machine=a29k-amd
579 - basic_machine=f301-fujitsu
581 + basic_machine=f301-fujitsu
584 basic_machine=i960-wrs
586 @@ -883,13 +1033,17 @@
587 basic_machine=hppa1.1-winbond
591 - basic_machine=xmp-cray
594 + basic_machine=i686-pc
599 basic_machine=xps100-honeywell
602 + basic_machine=ymp-cray
606 basic_machine=z8k-unknown
608 @@ -910,16 +1064,12 @@
610 basic_machine=hppa1.1-oki
613 - if [ x$os = x-linux-gnu ]; then
614 - basic_machine=mips-unknown
616 - basic_machine=mips-mips
620 basic_machine=romp-ibm
623 + basic_machine=mmix-knuth
626 basic_machine=rs6000-ibm
628 @@ -936,13 +1086,16 @@
630 basic_machine=we32k-att
633 + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
634 basic_machine=sh-unknown
638 + basic_machine=sh64-unknown
640 + sparc | sparcv8 | sparcv9 | sparcv9b)
641 basic_machine=sparc-sun
645 basic_machine=cydra-cydrome
650 basic_machine=powerpc-apple
653 - basic_machine=c4x-none
656 + # Make sure to match an already-canonicalized machine name.
659 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
660 @@ -1013,28 +1165,35 @@
662 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
663 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
664 - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
665 - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
666 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
667 + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
668 + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
669 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
670 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
671 + | -chorusos* | -chorusrdb* \
672 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
673 - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
674 - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
675 + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
676 + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
677 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
678 - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
679 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
680 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
681 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
682 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
683 # Remember, each alternative MUST END IN *, to match a version number.
686 case $basic_machine in
687 - x86-* | i[34567]86-*)
699 + os=`echo $os | sed -e 's|nto|nto-qnx|'`
701 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
702 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
703 @@ -1043,6 +1202,9 @@
705 os=`echo $os | sed -e 's|mac|macos|'`
711 os=`echo $os | sed -e 's|linux|linux-gnu|'`
713 @@ -1055,6 +1217,9 @@
723 @@ -1073,14 +1238,23 @@
748 @@ -1092,6 +1266,9 @@
758 @@ -1119,8 +1296,17 @@
762 - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
764 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
778 @@ -1153,10 +1339,14 @@
785 + # This must come before the *-dec entry.
794 @@ -1183,6 +1373,9 @@
801 *-tti) # must be before sparc entry or we get the wrong os.
804 @@ -1195,6 +1388,9 @@
814 @@ -1246,19 +1442,19 @@
838 @@ -1327,10 +1523,16 @@
848 - -vxsim* | -vxworks*)
852 + -vxsim* | -vxworks* | -windiss*)
856 @@ -1345,6 +1547,9 @@
857 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
864 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
866 --- nfs-utils-1.0.7.orig/config.guess
867 +++ nfs-utils-1.0.7/config.guess
870 # Attempt to guess a canonical system name.
871 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
872 -# Free Software Foundation, Inc.
873 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
874 +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
876 -timestamp='2001-03-16'
877 +timestamp='2005-03-24'
879 # This file is free software; you can redistribute it and/or modify it
880 # under the terms of the GNU General Public License as published by
882 # configuration script generated by Autoconf, you may include it under
883 # the same distribution terms that you use for the rest of that program.
885 -# Written by Per Bothner <bothner@cygnus.com>.
886 -# Please send patches to <config-patches@gnu.org>.
887 +# Originally written by Per Bothner <per@bothner.com>.
888 +# Please send patches to <config-patches@gnu.org>. Submit a context
889 +# diff and a properly formatted ChangeLog entry.
891 # This script attempts to guess a canonical system name similar to
892 # config.sub. If it succeeds, it prints the system name on stdout, and
894 GNU config.guess ($timestamp)
896 Originally written by Per Bothner.
897 -Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
898 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
899 Free Software Foundation, Inc.
901 This is free software; see the source for copying conditions. There is NO
906 +trap 'exit 1' 1 2 15
909 -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
910 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
911 +# compiler to aid in system detection is discouraged as it requires
912 +# temporary files to be created and, as you can see below, it is a
913 +# headache to deal with in a portable fashion.
915 -# CC_FOR_BUILD -- compiler used by this script.
916 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
917 # use `HOST_CC' if defined, but it is deprecated.
919 +# Portable tmp directory creation inspired by the Autoconf team.
922 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
923 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
925 + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
926 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
927 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
928 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
930 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
931 case $CC_FOR_BUILD,$HOST_CC,$CC in
932 - ,,) echo "int dummy(){}" > $dummy.c
933 - for c in cc gcc c89 ; do
934 - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
935 - if test $? = 0 ; then
936 - CC_FOR_BUILD="$c"; break
939 - rm -f $dummy.c $dummy.o $dummy.rel
940 + ,,) echo "int x;" > $dummy.c ;
941 + for c in cc gcc c89 c99 ; do
942 + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
943 + CC_FOR_BUILD="$c"; break ;
946 if test x"$CC_FOR_BUILD" = x ; then
947 - CC_FOR_BUILD=no_compiler_found
948 + CC_FOR_BUILD=no_compiler_found ;
951 ,,*) CC_FOR_BUILD=$CC ;;
952 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
956 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
957 -# (ghazi@noc.rutgers.edu 8/24/94.)
958 +# (ghazi@noc.rutgers.edu 1994-08-24)
959 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
960 PATH=$PATH:/.attbin ; export PATH
962 @@ -127,29 +140,31 @@
964 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
966 - # Netbsd (nbsd) targets should (where applicable) match one or
967 + # NetBSD (nbsd) targets should (where applicable) match one or
968 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
969 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
970 # switched to ELF, *-*-netbsd* would select the old
971 # object file format. This provides both forward
972 # compatibility and a consistent mechanism for selecting the
973 # object file format.
974 - # Determine the machine/vendor (is the vendor relevant).
975 - case "${UNAME_MACHINE}" in
976 - amiga) machine=m68k-unknown ;;
977 - arm32) machine=arm-unknown ;;
978 - atari*) machine=m68k-atari ;;
979 - sun3*) machine=m68k-sun ;;
980 - mac68k) machine=m68k-apple ;;
981 - macppc) machine=powerpc-apple ;;
982 - hp3[0-9][05]) machine=m68k-hp ;;
983 - ibmrt|romp-ibm) machine=romp-ibm ;;
984 - *) machine=${UNAME_MACHINE}-unknown ;;
986 + # Note: NetBSD doesn't particularly care about the vendor
987 + # portion of the name. We always set it to "unknown".
988 + sysctl="sysctl -n hw.machine_arch"
989 + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
990 + /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
991 + case "${UNAME_MACHINE_ARCH}" in
992 + armeb) machine=armeb-unknown ;;
993 + arm*) machine=arm-unknown ;;
994 + sh3el) machine=shl-unknown ;;
995 + sh3eb) machine=sh-unknown ;;
996 + *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
998 # The Operating System including object format, if it has switched
999 # to ELF recently, or will in the future.
1000 - case "${UNAME_MACHINE}" in
1001 - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
1002 + case "${UNAME_MACHINE_ARCH}" in
1003 + arm*|i386|m68k|ns32k|sh3*|sparc|vax)
1004 + eval $set_cc_for_build
1005 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
1006 | grep __ELF__ >/dev/null
1008 @@ -165,70 +180,123 @@
1012 - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1013 + # Debian GNU/NetBSD machines have a different userland, and
1014 + # thus, need a distinct triplet. However, they do not need
1015 + # kernel version information, so it can be replaced with a
1016 + # suitable tag, in the style of linux-gnu.
1017 + case "${UNAME_VERSION}" in
1022 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1025 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
1026 # contains redundant information, the shorter form:
1027 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
1028 echo "${machine}-${os}${release}"
1030 + amd64:OpenBSD:*:*)
1031 + echo x86_64-unknown-openbsd${UNAME_RELEASE}
1033 + amiga:OpenBSD:*:*)
1034 + echo m68k-unknown-openbsd${UNAME_RELEASE}
1037 + echo arm-unknown-openbsd${UNAME_RELEASE}
1039 + hp300:OpenBSD:*:*)
1040 + echo m68k-unknown-openbsd${UNAME_RELEASE}
1042 + luna88k:OpenBSD:*:*)
1043 + echo m88k-unknown-openbsd${UNAME_RELEASE}
1045 + mac68k:OpenBSD:*:*)
1046 + echo m68k-unknown-openbsd${UNAME_RELEASE}
1048 + macppc:OpenBSD:*:*)
1049 + echo powerpc-unknown-openbsd${UNAME_RELEASE}
1051 + mvme68k:OpenBSD:*:*)
1052 + echo m68k-unknown-openbsd${UNAME_RELEASE}
1054 + mvme88k:OpenBSD:*:*)
1055 + echo m88k-unknown-openbsd${UNAME_RELEASE}
1057 + mvmeppc:OpenBSD:*:*)
1058 + echo powerpc-unknown-openbsd${UNAME_RELEASE}
1061 + echo mips64-unknown-openbsd${UNAME_RELEASE}
1064 + echo m68k-unknown-openbsd${UNAME_RELEASE}
1067 + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
1070 + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
1072 + macppc:MirBSD:*:*)
1073 + echo powerppc-unknown-mirbsd${UNAME_RELEASE}
1076 + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
1079 - if test $UNAME_RELEASE = "V4.0"; then
1080 + case $UNAME_RELEASE in
1082 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
1086 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
1089 + # According to Compaq, /usr/sbin/psrinfo has been available on
1090 + # OSF/1 and Tru64 systems produced since 1995. I hope that
1091 + # covers most systems running today. This code pipes the CPU
1092 + # types through head -n 1, so we only detect the type of CPU 0.
1093 + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
1094 + case "$ALPHA_CPU_TYPE" in
1096 + UNAME_MACHINE="alpha" ;;
1098 + UNAME_MACHINE="alpha" ;;
1099 + "LCA4 (21066/21068)")
1100 + UNAME_MACHINE="alpha" ;;
1102 + UNAME_MACHINE="alphaev5" ;;
1104 + UNAME_MACHINE="alphaev56" ;;
1105 + "EV5.6 (21164PC)")
1106 + UNAME_MACHINE="alphapca56" ;;
1107 + "EV5.7 (21164PC)")
1108 + UNAME_MACHINE="alphapca57" ;;
1110 + UNAME_MACHINE="alphaev6" ;;
1112 + UNAME_MACHINE="alphaev67" ;;
1113 + "EV6.8CB (21264C)")
1114 + UNAME_MACHINE="alphaev68" ;;
1115 + "EV6.8AL (21264B)")
1116 + UNAME_MACHINE="alphaev68" ;;
1117 + "EV6.8CX (21264D)")
1118 + UNAME_MACHINE="alphaev68" ;;
1119 + "EV6.9A (21264/EV69A)")
1120 + UNAME_MACHINE="alphaev69" ;;
1122 + UNAME_MACHINE="alphaev7" ;;
1124 + UNAME_MACHINE="alphaev79" ;;
1126 + # A Pn.n version is a patched version.
1127 # A Vn.n version is a released version.
1128 # A Tn.n version is a released field test version.
1129 # A Xn.n version is an unreleased experimental baselevel.
1130 # 1.2 uses "1.2" for uname -r.
1131 - cat <<EOF >$dummy.s
1134 - .byte 37,100,45,37,120,10,0 # "%d-%x\n"
1141 - .frame \$30,16,\$26,0
1144 - .long 0x47e03d80 # implver \$0
1146 - .long 0x47e20c21 # amask \$2,\$1
1147 - lda \$16,\$Lformat
1156 - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
1157 - if test "$?" = 0 ; then
1158 - case `./$dummy` in
1160 - UNAME_MACHINE="alpha"
1163 - UNAME_MACHINE="alphaev5"
1166 - UNAME_MACHINE="alphaev56"
1169 - UNAME_MACHINE="alphapca56"
1172 - UNAME_MACHINE="alphaev6"
1175 - UNAME_MACHINE="alphaev67"
1179 - rm -f $dummy.s $dummy
1180 - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1181 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1183 Alpha\ *:Windows_NT*:*)
1184 # How do we know it's Interix rather than the generic POSIX subsystem?
1185 @@ -242,33 +310,21 @@
1186 Amiga*:UNIX_System_V:4.0:*)
1187 echo m68k-unknown-sysv4
1189 - amiga:OpenBSD:*:*)
1190 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1192 *:[Aa]miga[Oo][Ss]:*:*)
1193 echo ${UNAME_MACHINE}-unknown-amigaos
1195 - arc64:OpenBSD:*:*)
1196 - echo mips64el-unknown-openbsd${UNAME_RELEASE}
1199 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
1201 - hkmips:OpenBSD:*:*)
1202 - echo mips-unknown-openbsd${UNAME_RELEASE}
1205 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
1208 - echo mips-unknown-openbsd${UNAME_RELEASE}
1210 - wgrisc:OpenBSD:*:*)
1211 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
1212 + *:[Mm]orph[Oo][Ss]:*:*)
1213 + echo ${UNAME_MACHINE}-unknown-morphos
1216 echo i370-ibm-openedition
1219 + echo s390-ibm-zvmoe
1222 + echo powerpc-ibm-os400
1224 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
1225 echo arm-acorn-riscix${UNAME_RELEASE}
1227 @@ -286,6 +342,13 @@
1229 echo pyramid-pyramid-svr4
1231 + DRS?6000:unix:4.0:6*)
1232 + echo sparc-icl-nx6
1234 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
1235 + case `/usr/bin/uname -p` in
1236 + sparc) echo sparc-icl-nx7 && exit 0 ;;
1239 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1242 echo m68k-sun-sunos${UNAME_RELEASE}
1245 - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
1246 + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
1247 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
1248 case "`/bin/arch`" in
1252 echo sparc-auspex-sunos${UNAME_RELEASE}
1254 - atari*:OpenBSD:*:*)
1255 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1257 # The situation for MiNT is a little confusing. The machine name
1258 # can be virtually everything (everything which is not
1259 # "atarist" or "atariste" at least should have a processor
1260 @@ -357,17 +417,8 @@
1261 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
1262 echo m68k-unknown-mint${UNAME_RELEASE}
1264 - sun3*:OpenBSD:*:*)
1265 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1267 - mac68k:OpenBSD:*:*)
1268 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1270 - mvme68k:OpenBSD:*:*)
1271 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1273 - mvme88k:OpenBSD:*:*)
1274 - echo m88k-unknown-openbsd${UNAME_RELEASE}
1276 + echo m68k-apple-machten${UNAME_RELEASE}
1278 powerpc:machten:*:*)
1279 echo powerpc-apple-machten${UNAME_RELEASE}
1281 echo clipper-intergraph-clix${UNAME_RELEASE}
1283 mips:*:*:UMIPS | mips:*:*:RISCos)
1284 + eval $set_cc_for_build
1285 sed 's/^ //' << EOF >$dummy.c
1287 #include <stdio.h> /* for printf() prototype */
1288 @@ -406,12 +458,20 @@
1292 - $CC_FOR_BUILD $dummy.c -o $dummy \
1293 - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
1294 - && rm -f $dummy.c $dummy && exit 0
1295 - rm -f $dummy.c $dummy
1296 + $CC_FOR_BUILD -o $dummy $dummy.c \
1297 + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
1299 echo mips-mips-riscos${UNAME_RELEASE}
1301 + Motorola:PowerMAX_OS:*:*)
1302 + echo powerpc-motorola-powermax
1304 + Motorola:*:4.3:PL8-*)
1305 + echo powerpc-harris-powermax
1307 + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
1308 + echo powerpc-harris-powermax
1310 Night_Hawk:Power_UNIX:*:*)
1311 echo powerpc-harris-powerunix
1314 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
1315 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
1316 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
1325 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
1326 + eval $set_cc_for_build
1327 sed 's/^ //' << EOF >$dummy.c
1328 #include <sys/systemcfg.h>
1334 - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
1335 - rm -f $dummy.c $dummy
1336 + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
1337 echo rs6000-ibm-aix3.2.5
1338 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
1339 echo rs6000-ibm-aix3.2.4
1344 - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
1345 + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
1346 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
1349 @@ -533,10 +593,8 @@
1350 9000/31? ) HP_ARCH=m68000 ;;
1351 9000/[34]?? ) HP_ARCH=m68k ;;
1352 9000/[678][0-9][0-9])
1353 - case "${HPUX_REV}" in
1355 - if [ -x /usr/bin/getconf ]; then
1356 - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
1357 + if [ -x /usr/bin/getconf ]; then
1358 + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
1359 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
1360 case "${sc_cpu_version}" in
1361 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
1362 @@ -545,12 +603,13 @@
1363 case "${sc_kernel_bits}" in
1364 32) HP_ARCH="hppa2.0n" ;;
1365 64) HP_ARCH="hppa2.0w" ;;
1366 + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
1371 - if [ "${HP_ARCH}" = "" ]; then
1372 - sed 's/^ //' << EOF >$dummy.c
1374 + if [ "${HP_ARCH}" = "" ]; then
1375 + eval $set_cc_for_build
1376 + sed 's/^ //' << EOF >$dummy.c
1378 #define _HPUX_SOURCE
1380 @@ -583,11 +642,21 @@
1384 - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
1385 - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
1386 - rm -f $dummy.c $dummy
1388 + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
1389 + test -z "$HP_ARCH" && HP_ARCH=hppa
1392 + if [ ${HP_ARCH} = "hppa2.0w" ]
1394 + # avoid double evaluation of $set_cc_for_build
1395 + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
1396 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
1398 + HP_ARCH="hppa2.0w"
1403 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
1407 echo ia64-hp-hpux${HPUX_REV}
1410 + eval $set_cc_for_build
1411 sed 's/^ //' << EOF >$dummy.c
1418 - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
1419 - rm -f $dummy.c $dummy
1420 + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
1421 echo unknown-hitachi-hiuxwe2
1423 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
1425 9000/8??:4.3bsd:*:*)
1429 + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
1430 echo hppa1.0-hp-mpeix
1432 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
1439 if [ -x /usr/sbin/sysversion ] ; then
1440 echo ${UNAME_MACHINE}-unknown-osf1mk
1444 echo hppa1.1-hp-lites
1446 - hppa*:OpenBSD:*:*)
1447 - echo hppa-unknown-openbsd
1449 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
1452 @@ -670,42 +736,39 @@
1453 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
1457 - echo xmp-cray-unicos
1460 - echo ymp-cray-unicos${UNAME_RELEASE}
1461 + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1464 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
1465 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
1466 - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
1467 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
1468 + -e 's/\.[^.]*$/.X/'
1471 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1474 - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1477 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1480 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1483 - echo cray2-cray-unicos
1486 + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1488 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
1489 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1490 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
1491 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
1492 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
1494 - hp300:OpenBSD:*:*)
1495 - echo m68k-unknown-openbsd${UNAME_RELEASE}
1496 + 5000:UNIX_System_V:4.*:*)
1497 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
1498 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
1499 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
1501 - i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
1502 + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
1503 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
1508 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1511 - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1514 echo ${UNAME_MACHINE}-pc-cygwin
1516 @@ -729,15 +789,24 @@
1518 echo ${UNAME_MACHINE}-pc-pw32
1520 + x86:Interix*:[34]*)
1521 + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
1523 + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
1524 + echo i${UNAME_MACHINE}-pc-mks
1526 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
1527 # How do we know it's Interix rather than the generic POSIX subsystem?
1528 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
1529 # UNAME_MACHINE based on the output of uname instead of i386?
1530 - echo i386-pc-interix
1531 + echo i586-pc-interix
1534 echo ${UNAME_MACHINE}-pc-uwin
1536 + amd64:CYGWIN*:*:*)
1537 + echo x86_64-unknown-cygwin
1540 echo powerpcle-unknown-cygwin
1542 @@ -745,112 +814,93 @@
1543 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1547 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
1550 + # other systems with GNU libc and userland
1551 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
1554 echo ${UNAME_MACHINE}-pc-minix
1557 echo ${UNAME_MACHINE}-unknown-linux-gnu
1560 + echo cris-axis-linux-gnu
1562 + crisv32:Linux:*:*)
1563 + echo crisv32-axis-linux-gnu
1566 + echo frv-unknown-linux-gnu
1569 - echo ${UNAME_MACHINE}-unknown-linux
1570 + echo ${UNAME_MACHINE}-unknown-linux-gnu
1573 + echo ${UNAME_MACHINE}-unknown-linux-gnu
1576 echo ${UNAME_MACHINE}-unknown-linux-gnu
1579 - cat >$dummy.c <<EOF
1581 -#include <stdio.h> /* for printf() prototype */
1582 -int main (int argc, char *argv[]) {
1584 -int main (argc, argv) int argc; char *argv[]; {
1587 - printf ("%s-unknown-linux-gnu\n", argv[1]);
1590 - printf ("%sel-unknown-linux-gnu\n", argv[1]);
1594 + eval $set_cc_for_build
1595 + sed 's/^ //' << EOF >$dummy.c
1599 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
1602 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
1609 - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
1610 - rm -f $dummy.c $dummy
1611 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
1612 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
1615 - # Determine Lib Version
1616 - cat >$dummy.c <<EOF
1617 -#include <features.h>
1618 -#if defined(__GLIBC__)
1619 -extern char __libc_version[];
1620 -extern char __libc_release[];
1626 -#if defined(__GLIBC__)
1627 - printf("%s %s\n", __libc_version, __libc_release);
1629 - printf("unknown\n");
1634 + eval $set_cc_for_build
1635 + sed 's/^ //' << EOF >$dummy.c
1639 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
1642 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
1650 - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
1651 - if test "$?" = 0 ; then
1652 - ./$dummy | grep 1\.99 > /dev/null
1653 - if test "$?" = 0 ; then LIBC="libc1" ; fi
1655 - rm -f $dummy.c $dummy
1656 - echo powerpc-unknown-linux-gnu${LIBC}
1657 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
1658 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
1661 + echo powerpc-unknown-linux-gnu
1664 + echo powerpc64-unknown-linux-gnu
1667 - cat <<EOF >$dummy.s
1670 - .byte 37,100,45,37,120,10,0 # "%d-%x\n"
1676 - .frame \$30,16,\$26,0
1679 - .long 0x47e03d80 # implver \$0
1681 - .long 0x47e20c21 # amask \$2,\$1
1682 - lda \$16,\$Lformat
1692 - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
1693 - if test "$?" = 0 ; then
1694 - case `./$dummy` in
1695 - 0-0) UNAME_MACHINE="alpha" ;;
1696 - 1-0) UNAME_MACHINE="alphaev5" ;;
1697 - 1-1) UNAME_MACHINE="alphaev56" ;;
1698 - 1-101) UNAME_MACHINE="alphapca56" ;;
1699 - 2-303) UNAME_MACHINE="alphaev6" ;;
1700 - 2-307) UNAME_MACHINE="alphaev67" ;;
1702 - objdump --private-headers $dummy | \
1703 - grep ld.so.1 > /dev/null
1704 - if test "$?" = 0 ; then
1708 - rm -f $dummy.s $dummy
1709 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
1710 + EV5) UNAME_MACHINE=alphaev5 ;;
1711 + EV56) UNAME_MACHINE=alphaev56 ;;
1712 + PCA56) UNAME_MACHINE=alphapca56 ;;
1713 + PCA57) UNAME_MACHINE=alphapca56 ;;
1714 + EV6) UNAME_MACHINE=alphaev6 ;;
1715 + EV67) UNAME_MACHINE=alphaev67 ;;
1716 + EV68*) UNAME_MACHINE=alphaev68 ;;
1718 + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
1719 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
1720 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
1722 parisc:Linux:*:* | hppa:Linux:*:*)
1724 s390:Linux:*:* | s390x:Linux:*:*)
1725 echo ${UNAME_MACHINE}-ibm-linux
1728 + echo ${UNAME_MACHINE}-unknown-linux-gnu
1731 echo ${UNAME_MACHINE}-unknown-linux-gnu
1733 @@ -876,78 +929,69 @@
1735 echo x86_64-unknown-linux-gnu
1739 # The BFD linker knows what the default object file format is, so
1740 # first see if it will tell us. cd to the root directory to prevent
1741 # problems with other programs or directories called `ld' in the path.
1742 - ld_supported_emulations=`cd /; ld --help 2>&1 \
1743 - | sed -ne '/supported emulations:/!d
1744 + # Set LC_ALL=C to ensure ld outputs messages in English.
1745 + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
1746 + | sed -ne '/supported targets:/!d
1748 - s/.*supported emulations: *//
1749 + s/.*supported targets: *//
1752 - case "$ld_supported_emulations" in
1754 - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
1758 + case "$ld_supported_targets" in
1760 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
1764 + echo "${UNAME_MACHINE}-pc-linux-gnuaout"
1767 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
1771 - # Either a pre-BFD a.out linker (linux-gnuoldld)
1772 - # or one that does not give us useful --help.
1773 - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
1774 - # If ld does not provide *any* "supported emulations:"
1775 - # that means it is gnuoldld.
1776 - test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
1777 - case "${UNAME_MACHINE}" in
1786 + # Either a pre-BFD a.out linker (linux-gnuoldld) or
1787 + # one that does not give us useful --help.
1788 + echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
1791 # Determine whether the default compiler is a.out or elf
1792 - cat >$dummy.c <<EOF
1793 -#include <features.h>
1795 -#include <stdio.h> /* for printf() prototype */
1796 - int main (int argc, char *argv[]) {
1798 - int main (argc, argv) int argc; char *argv[]; {
1802 -# if __GLIBC__ >= 2
1803 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
1805 - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
1808 - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
1811 - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
1815 + eval $set_cc_for_build
1816 + sed 's/^ //' << EOF >$dummy.c
1817 + #include <features.h>
1820 + # if __GLIBC__ >= 2
1829 + #ifdef __INTEL_COMPILER
1835 + #ifdef __dietlibc__
1839 - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
1840 - rm -f $dummy.c $dummy
1841 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
1842 + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
1843 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
1845 -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
1846 -# are messed up and put the nodename in both sysname and nodename.
1847 - i?86:DYNIX/ptx:4*:*)
1848 + i*86:DYNIX/ptx:4*:*)
1849 + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1850 + # earlier versions are messed up and put the nodename in both
1851 + # sysname and nodename.
1852 echo i386-sequent-sysv4
1854 - i?86:UNIX_SV:4.2MP:2.*)
1855 + i*86:UNIX_SV:4.2MP:2.*)
1856 # Unixware is an offshoot of SVR4, but it has its own version
1857 # number series starting with 2...
1858 # I am not positive that other SVR4 systems won't match this,
1859 @@ -955,7 +999,27 @@
1860 # Use sysv4.2uw... so that sysv4* matches it.
1861 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1863 - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
1865 + # If we were able to find `uname', then EMX Unix compatibility
1866 + # is probably installed.
1867 + echo ${UNAME_MACHINE}-pc-os2-emx
1869 + i*86:XTS-300:*:STOP)
1870 + echo ${UNAME_MACHINE}-unknown-stop
1873 + echo ${UNAME_MACHINE}-unknown-atheos
1875 + i*86:syllable:*:*)
1876 + echo ${UNAME_MACHINE}-pc-syllable
1878 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1879 + echo i386-unknown-lynxos${UNAME_RELEASE}
1882 + echo ${UNAME_MACHINE}-pc-msdosdjgpp
1884 + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1885 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1886 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1887 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1888 @@ -963,36 +1027,32 @@
1889 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1893 - # Fixed at (any) Pentium or better
1894 - UNAME_MACHINE=i586
1895 - if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
1896 - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
1898 - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
1901 + case `/bin/uname -X | grep "^Machine"` in
1902 + *486*) UNAME_MACHINE=i486 ;;
1903 + *Pentium) UNAME_MACHINE=i586 ;;
1904 + *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1906 + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1910 if test -f /usr/options/cb.name; then
1911 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1912 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1913 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1914 - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
1915 - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
1916 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
1917 + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1918 + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1919 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1920 && UNAME_MACHINE=i586
1921 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
1922 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1923 && UNAME_MACHINE=i686
1924 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
1925 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1926 && UNAME_MACHINE=i686
1927 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1929 echo ${UNAME_MACHINE}-pc-sysv32
1933 - echo ${UNAME_MACHINE}-pc-msdosdjgpp
1936 # Left here for compatibility:
1937 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1938 @@ -1016,9 +1076,15 @@
1940 echo m68010-convergent-sysv
1942 - M68*:*:R3V[567]*:*)
1943 + mc68k:UNIX:SYSTEM5:3.51m)
1944 + echo m68k-convergent-sysv
1946 + M680?0:D-NIX:5.3:*)
1947 + echo m68k-diab-dnix
1949 + M68*:*:R3V[5678]*:*)
1950 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1951 - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
1952 + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1954 test -r /etc/.relid \
1955 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1956 @@ -1029,22 +1095,19 @@
1957 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1958 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1959 && echo i486-ncr-sysv4 && exit 0 ;;
1960 - m68*:LynxOS:2.*:*)
1961 + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1962 echo m68k-unknown-lynxos${UNAME_RELEASE}
1964 mc68030:UNIX_System_V:4.*:*)
1965 echo m68k-atari-sysv4
1967 - i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
1968 - echo i386-unknown-lynxos${UNAME_RELEASE}
1970 TSUNAMI:LynxOS:2.*:*)
1971 echo sparc-unknown-lynxos${UNAME_RELEASE}
1973 rs6000:LynxOS:2.*:*)
1974 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1976 - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
1977 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1978 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1980 SM[BE]S:UNIX_SV:*:*)
1981 @@ -1064,8 +1127,8 @@
1985 - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1986 - # says <Richard.M.Bartel@ccMail.Census.GOV>
1987 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1988 + # says <Richard.M.Bartel@ccMail.Census.GOV>
1989 echo i586-unisys-sysv4
1991 *:UNIX_System_V:4*:FTX*)
1992 @@ -1077,6 +1140,10 @@
1993 # From seanf@swdc.stratus.com.
1994 echo i860-stratus-sysv4
1997 + # From Paul.Green@stratus.com.
1998 + echo hppa1.1-stratus-vos
2001 echo m68k-apple-aux${UNAME_RELEASE}
2003 @@ -1105,6 +1172,9 @@
2005 echo sx5-nec-superux${UNAME_RELEASE}
2007 + SX-6:SUPER-UX:*:*)
2008 + echo sx6-nec-superux${UNAME_RELEASE}
2010 Power*:Rhapsody:*:*)
2011 echo powerpc-apple-rhapsody${UNAME_RELEASE}
2013 @@ -1112,18 +1182,28 @@
2014 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
2017 - echo `uname -p`-apple-darwin${UNAME_RELEASE}
2018 + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
2019 + case $UNAME_PROCESSOR in
2020 + *86) UNAME_PROCESSOR=i686 ;;
2021 + unknown) UNAME_PROCESSOR=powerpc ;;
2023 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
2025 *:procnto*:*:* | *:QNX:[0123456789]*:*)
2026 - if test "${UNAME_MACHINE}" = "x86pc"; then
2027 + UNAME_PROCESSOR=`uname -p`
2028 + if test "$UNAME_PROCESSOR" = "x86"; then
2029 + UNAME_PROCESSOR=i386
2032 - echo `uname -p`-${UNAME_MACHINE}-nto-qnx
2033 + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
2038 - NSR-[KW]:NONSTOP_KERNEL:*:*)
2039 + NSE-?:NONSTOP_KERNEL:*:*)
2040 + echo nse-tandem-nsk${UNAME_RELEASE}
2042 + NSR-?:NONSTOP_KERNEL:*:*)
2043 echo nsr-tandem-nsk${UNAME_RELEASE}
2046 @@ -1146,11 +1226,6 @@
2048 echo ${UNAME_MACHINE}-unknown-plan9
2051 - # If we were able to find `uname', then EMX Unix compatibility
2052 - # is probably installed.
2053 - echo ${UNAME_MACHINE}-pc-os2-emx
2056 echo pdp10-unknown-tops10
2058 @@ -1169,11 +1244,28 @@
2060 echo pdp10-unknown-its
2063 + echo mips-sei-seiux${UNAME_RELEASE}
2066 + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
2069 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
2070 + case "${UNAME_MACHINE}" in
2071 + A*) echo alpha-dec-vms && exit 0 ;;
2072 + I*) echo ia64-dec-vms && exit 0 ;;
2073 + V*) echo vax-dec-vms && exit 0 ;;
2076 + echo i386-pc-xenix
2080 #echo '(No uname command or uname output not recognized.)' 1>&2
2081 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
2083 +eval $set_cc_for_build
2086 # include <sys/types.h>
2087 @@ -1288,8 +1380,7 @@
2091 -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
2092 -rm -f $dummy.c $dummy
2093 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
2095 # Apollos put the system type in the environment.
2097 @@ -1328,7 +1419,9 @@
2098 the operating system you are using. It is advised that you
2099 download the most up to date version of the config scripts from
2101 - ftp://ftp.gnu.org/pub/gnu/config/
2102 + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
2104 + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
2106 If the version you run ($0) is already up to date, please
2107 send the following data and any information you think might be
2108 --- nfs-utils-1.0.7.orig/debian/control
2109 +++ nfs-utils-1.0.7/debian/control
2114 -Maintainer: Chip Salzenberg <chip@debian.org>
2115 +Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
2116 Build-Depends: debhelper (>= 4.1.16), libwrap0-dev, libevent-dev, libnfsidmap-dev, libkrb5-dev
2117 -Standards-Version: 3.1.1.1
2118 +Standards-Version: 3.6.1
2120 Package: nfs-kernel-server
2124 Depends: nfs-common, ${shlibs:Depends}
2125 Replaces: nfs-kernel-server
2126 -Description: NFS benchmark program.
2127 +Description: NFS benchmark program
2129 Upstream: SourceForge project "nfs", CVS module nfs-utils.
2130 --- nfs-utils-1.0.7.orig/debian/nfs-common.default
2131 +++ nfs-utils-1.0.7/debian/nfs-common.default
2133 # If so, set this variable to either "yes" or "no".
2136 -# If you are not using NFSv4 and wish to disable the idmapd daemon
2137 -# then uncomment the following line
2139 +# If you are not using NFSv4 and wish to disable the idmapd daemon,
2140 +# then set NEED_IDMAPD to "no".
2143 # If you are not running NFS with RPCSEC_GSS security, and wish to
2144 -# disable the gssd client daemon then uncomment the following line
2146 +# disable the gssd client daemon, then set NEED_GSSD to "no".
2148 --- nfs-utils-1.0.7.orig/debian/changelog
2149 +++ nfs-utils-1.0.7/debian/changelog
2151 +nfs-utils (1:1.0.7-3) unstable; urgency=medium
2153 + * New maintainer, closes: #303559.
2155 + -- Anibal Monsalve Salazar <anibal@debian.org> Fri, 08 Apr 2005 11:25:17 +1000
2157 +nfs-utils (1:1.0.7-2) unstable; urgency=low
2159 + * Orphaning package.
2160 + * Upstream CVS sync:
2161 + > Support "no_acl" export option, for the few specially patched
2162 + kernels that understand it. (Closes: #253824)
2163 + > Fix FTBTS on amd64. (Closes: #297729)
2164 + > Update config.{guess,sub}. (Closes: #300552)
2166 + -- Chip Salzenberg <chip@debian.org> Thu, 7 Apr 2005 09:07:24 -0400
2168 +nfs-utils (1:1.0.7-1) unstable; urgency=medium
2170 + * Acknowledge NMU; thanks to joeyh. (closes: #287053)
2171 + * New upstream version:
2172 + > Add support for NFSv4.
2173 + > Ignore SIGPIPE, fixing a remote DOS. Note that the previous
2174 + NMU already fixed this bug. (CAN-2004-1014)
2175 + > At long last, fix "erroneous SM_UNMON" warnings. (closes: #165744)
2177 + -- Chip Salzenberg <chip@debian.org> Tue, 11 Jan 2005 23:31:05 -0500
2179 nfs-utils (1:1.0.6-3) unstable; urgency=medium
2181 * Remove obsolete debconf-related files in debian/rules, because source
2182 --- nfs-utils-1.0.7.orig/debian/nfs-kernel-server.default
2183 +++ nfs-utils-1.0.7/debian/nfs-kernel-server.default
2187 # If you are not running NFS with RPCSEC_GSS security, and wish to
2188 -# disable the gssd server daemon then uncomment the following line
2190 +# disable the gssd server daemon, then set NEED_SVCGSSD to "no".
2192 --- nfs-utils-1.0.7.orig/debian/rules
2193 +++ nfs-utils-1.0.7/debian/rules
2196 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
2197 +# Copyright (c) 2005 by Anibal Monsalve Salazar.
2199 # Uncomment this to turn on verbose mode.
2200 -#export DH_VERBOSE=1
2201 +export DH_VERBOSE=1
2203 # You can use gcc 2.7.2 if it's installed,
2204 # but I don't think that's necessary any more.
2205 --- nfs-utils-1.0.7.orig/configure.in
2206 +++ nfs-utils-1.0.7/configure.in
2208 AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME),,$KRBLIB)
2211 - CFLAGS=$CFLAGS `K5CONFIG --cflags`
2212 + CFLAGS=$CFLAGS `$K5CONFIG --cflags`
2215 dnl We didn't find a usable Kerberos environment
2216 --- nfs-utils-1.0.7.orig/support/include/xlog.h
2217 +++ nfs-utils-1.0.7/support/include/xlog.h
2222 +/* These are logged always. L_FATAL also does exit(1) */
2223 #define L_FATAL 0x0100
2224 #define L_ERROR 0x0200
2225 #define L_WARNING 0x0400
2226 #define L_NOTICE 0x0800
2227 #define L_ALL 0xFF00
2229 +/* These are logged if enabled with xlog_[s]config */
2230 +/* NB: code does not expect ORing together D_ and L_ */
2231 #define D_GENERAL 0x0001 /* general debug info */
2232 #define D_CALL 0x0002
2233 #define D_AUTH 0x0004
2237 void xlog_open(char *progname);
2238 -void xlog_background(void);
2239 +void xlog_stderr(int on);
2240 +void xlog_syslog(int on);
2241 void xlog_config(int fac, int on);
2242 void xlog_sconfig(char *, int on);
2243 int xlog_enabled(int fac);
2244 --- nfs-utils-1.0.7.orig/support/export/client.c
2245 +++ nfs-utils-1.0.7/support/export/client.c
2248 if (clp->m_type == MCL_SUBNETWORK) {
2249 char *cp = strchr(clp->m_hostname, '/');
2250 + static char slash32[] = "/32";
2252 + if(!cp) cp = slash32;
2254 clp->m_addrlist[0].s_addr = inet_addr(clp->m_hostname);
2255 if (strchr(cp + 1, '.')) {
2256 @@ -443,5 +445,12 @@
2257 if (*sp == '\\' && sp[1])
2261 + /* check for N.N.N.N */
2263 + if(!isdigit(*sp) || strtoul(sp, &sp, 10) > 255 || *sp != '.') return MCL_FQDN;
2264 + sp++; if(!isdigit(*sp) || strtoul(sp, &sp, 10) > 255 || *sp != '.') return MCL_FQDN;
2265 + sp++; if(!isdigit(*sp) || strtoul(sp, &sp, 10) > 255 || *sp != '.') return MCL_FQDN;
2266 + sp++; if(!isdigit(*sp) || strtoul(sp, &sp, 10) > 255 || *sp != '\0') return MCL_FQDN;
2267 + /* we lie here a bit. but technically N.N.N.N == N.N.N.N/32 :) */
2268 + return MCL_SUBNETWORK;
2270 --- nfs-utils-1.0.7.orig/support/rpc/svc_auth_gss.c
2271 +++ nfs-utils-1.0.7/support/rpc/svc_auth_gss.c
2273 return (AUTH_FAILED);
2275 auth->svc_ah_ops = &svc_auth_gss_ops;
2276 - SVCAUTH_PRIVATE(auth) = gd;
2277 + auth->svc_ah_private = (caddr_t)gd;
2278 rqst->rq_xprt->xp_auth = auth;
2280 else gd = SVCAUTH_PRIVATE(rqst->rq_xprt->xp_auth);
2281 --- nfs-utils-1.0.7.orig/support/nfs/cacheio.c
2282 +++ nfs-utils-1.0.7/support/nfs/cacheio.c
2283 @@ -205,16 +205,17 @@
2289 new = realloc(*buf, *lenp);
2292 - nl = read(fd, *buf +len, *lenp - len);
2295 + nl = read(fd, *buf + len, *lenp - len);
2301 - (*buf)[len-1] = 0;
2302 + (*buf)[len-1] = '\0';
2306 --- nfs-utils-1.0.7.orig/support/nfs/xlog.c
2307 +++ nfs-utils-1.0.7/support/nfs/xlog.c
2310 #undef VERBOSE_PRINTF
2312 -static int foreground = 1; /* not a daemon initially */
2313 +static int log_stderr = 1;
2314 +static int log_syslog = 1;
2315 static int logging = 0; /* enable/disable DEBUG logs */
2316 static int logmask = 0; /* What will be logged */
2317 static char log_name[256]; /* name of this program */
2318 static int log_pid = -1; /* PID of this program */
2319 -static FILE *log_fp = (FILE *)NULL; /* fp for the log file */
2321 static void xlog_toggle(int sig);
2322 static struct xlog_debugfac debugnames[] = {
2324 xlog_open(char *progname)
2326 openlog(progname, LOG_PID, LOG_DAEMON);
2329 - if (log_fp != NULL)
2330 - setbuf(log_fp, NULL);
2333 strncpy(log_name, progname, sizeof (log_name) - 1);
2334 log_name [sizeof (log_name) - 1] = '\0';
2339 -xlog_background(void)
2340 +xlog_stderr(int on)
2346 +xlog_syslog(int on)
2353 @@ -126,17 +127,13 @@
2357 -/* Write something to the system logfile. */
2358 +/* Write something to the system logfile and/or stderr */
2360 xlog(int kind, const char *fmt, ...)
2364 - int logged = 1, n;
2365 -#ifdef VERBOSE_PRINTF
2371 if (!(kind & (L_ALL)) && !(logging && (kind & logmask)))
2373 @@ -148,40 +145,44 @@
2374 if ((n = strlen(buff)) > 0 && buff[n-1] == '\n')
2379 - syslog(LOG_ERR, "%s", buff);
2382 - syslog(LOG_ERR, "%s", buff);
2385 - syslog(LOG_WARNING, "%s", buff);
2388 - syslog(LOG_NOTICE, "%s", buff);
2396 + syslog(LOG_ERR, "%s", buff);
2399 + syslog(LOG_ERR, "%s", buff);
2402 + syslog(LOG_WARNING, "%s", buff);
2405 + syslog(LOG_NOTICE, "%s", buff);
2409 + syslog(LOG_DEBUG, "%s", buff);
2413 - if (!logged || foreground) {
2414 - if (!logged && log_fp == NULL) {
2415 - syslog(LOG_DEBUG, "%s", buff);
2416 - } else if (log_fp != NULL) {
2419 #ifdef VERBOSE_PRINTF
2421 - tm = localtime(&now);
2422 - fprintf(log_fp, "%s[%d] %02d/%02d/%02d %02d:%02d %s\n",
2423 - log_name, log_pid,
2424 - tm->tm_mon + 1, tm->tm_mday,
2425 - tm->tm_year, tm->tm_hour, tm->tm_min,
2431 + tm = localtime(&now);
2432 + fprintf(stderr, "%s[%d] %04d-%02d-%02d %02d:%02d:%02d %s\n",
2433 + log_name, log_pid,
2434 + tm->tm_year+1900, tm->tm_mon + 1, tm->tm_mday,
2435 + tm->tm_hour, tm->tm_min, tm->tm_sec,
2438 - fprintf(log_fp, "%s: %s\n", log_name, buff);
2439 + fprintf(stderr, "%s: %s\n", log_name, buff);
2444 if (kind == L_FATAL)
2447 --- nfs-utils-1.0.7.orig/support/nfs/exports.c
2448 +++ nfs-utils-1.0.7/support/nfs/exports.c
2451 fprintf(fp, "%ssecure_locks,", (ep->e_flags & NFSEXP_NOAUTHNLM)?
2453 + fprintf(fp, "%sacl,", (ep->e_flags & NFSEXP_NOACL)?
2455 if (ep->e_flags & NFSEXP_FSID) {
2456 fprintf(fp, "fsid=%d,", ep->e_fsid);
2458 @@ -374,6 +376,10 @@
2459 ep->e_flags &= ~NFSEXP_NOAUTHNLM;
2460 else if (strcmp(opt, "insecure_locks") == 0)
2461 ep->e_flags |= NFSEXP_NOAUTHNLM;
2462 + else if (strcmp(opt, "acl") == 0)
2463 + ep->e_flags &= ~NFSEXP_NOACL;
2464 + else if (strcmp(opt, "no_acl") == 0)
2465 + ep->e_flags |= NFSEXP_NOACL;
2466 else if (strncmp(opt, "mapping=", 8) == 0)
2467 ep->e_maptype = parsemaptype(opt+8);
2468 else if (strcmp(opt, "map_identity") == 0) /* old style */
2469 --- nfs-utils-1.0.7.orig/configure
2470 +++ nfs-utils-1.0.7/configure
2471 @@ -2134,7 +2134,7 @@
2475 - CFLAGS=$CFLAGS `K5CONFIG --cflags`
2476 + CFLAGS=$CFLAGS `$K5CONFIG --cflags`
2479 if test "x$KRBDIR" = "x"; then
2480 --- nfs-utils-1.0.7.orig/utils/exportfs/exportfs.c
2481 +++ nfs-utils-1.0.7/utils/exportfs/exportfs.c
2483 c = dumpopt(c, "no_subtree_check");
2484 if (ep->e_flags & NFSEXP_NOAUTHNLM)
2485 c = dumpopt(c, "insecure_locks");
2486 + if (ep->e_flags & NFSEXP_NOACL)
2487 + c = dumpopt(c, "no_acl");
2488 if (ep->e_flags & NFSEXP_FSID)
2489 c = dumpopt(c, "fsid=%d", ep->e_fsid);
2490 if (ep->e_mountpoint)
2491 --- nfs-utils-1.0.7.orig/utils/exportfs/exports.man
2492 +++ nfs-utils-1.0.7/utils/exportfs/exports.man
2494 -.TH EXPORTS 5 "28 October 1999"
2496 +.TH EXPORTS 5 "4 March 2005" "Linux" "Linux File Formats Manual"
2498 exports \- NFS file systems being exported (for Kernel based NFS)
2502 .IR no_subtree_check
2503 This option disables subtree checking, which has mild security
2504 -implications, but can improve reliability is some circumstances.
2505 +implications, but can improve reliability in some circumstances.
2507 If a subdirectory of a filesystem is exported, but the whole
2508 filesystem isn't then whenever a NFS request arrives, the server must
2510 directories to which only root has access can only be accessed if the
2511 filesystem is exported with
2513 -(see below), even the file itself allows more general access.
2514 +(see below), even if the file itself allows more general access.
2516 As a general guide, a home directory filesystem, which is normally
2517 exported at the root and may see lots of file renames, should be
2518 @@ -223,6 +222,21 @@
2524 +On some specially patched kernels, and when exporting filesystems that
2525 +support ACLs, this option tells nfsd not to reveal ACLs to clients, so
2526 +they will see only a subset of actual permissions on the given file
2527 +system. This option is safe for filesystems used by NFSv2 clients and
2528 +old NFSv3 clients that perform access decisions locally. Current
2529 +NFSv3 clients use the ACCESS RPC to perform all access decisions on
2530 +the server. Note that the
2532 +option only has effect on kernels specially patched to support it, and
2533 +when exporting filesystems with ACL support. The default is to export
2534 +with ACL support (i.e. by default,
2540 @@ -487,6 +501,12 @@
2551 '''An error parsing the file is reported using syslogd(8) as level NOTICE from
2552 '''a DAEMON whenever nfsd(8) or mountd(8) is started up. Any unknown
2553 --- nfs-utils-1.0.7.orig/utils/svcgssd/Makefile
2554 +++ nfs-utils-1.0.7/utils/svcgssd/Makefile
2556 LIBS = -Wl,-rpath=$(KRBDIR)/lib -lrpc -lgssapi -ldl $(KRBLIB) -lnfsidmap
2560 - - ln ../gssd/err_util.c
2561 - - ln ../gssd/gss_util.c
2562 - - ln ../gssd/gss_oids.c
2563 - - ln ../gssd/context.c
2564 - - ln ../gssd/context_heimdal.c
2565 +LINKED = err_util.c gss_util.c gss_oids.c context.c context_heimdal.c
2567 +predep :: $(LINKED)
2570 + ln -s ../gssd/$@ .
2573 + for f in $(LINKED); do \
2574 + if [ -L "$$f" ]; then \
2575 + echo "rm -f $$f"; \
2580 include $(TOP)rules.mk
2582 --- nfs-utils-1.0.7.orig/utils/statd/rmtcall.c
2583 +++ nfs-utils-1.0.7/utils/statd/rmtcall.c
2586 memset(&sin, 0, sizeof(sin));
2587 sin.sin_family = AF_INET;
2588 - sin.sin_port = port;
2589 + sin.sin_addr.s_addr = INADDR_ANY;
2591 * If a local hostname is given (-n option to statd), bind to the address
2592 * specified. This is required to support clients that ignore the mon_name in
2595 sin.sin_addr = *(struct in_addr *) hp->h_addr;
2598 + sin.sin_port = htons(port);
2599 + if (bind(sockfd, &sin, sizeof(sin)) == 0)
2601 + note(N_CRIT, "statd: failed to bind to outgoing port, %d\n"
2602 + " falling back on randomly chosen port\n", port);
2604 if (bindresvport(sockfd, &sin) < 0) {
2606 "process_hosts: can't bind to reserved port\n");
2613 --- nfs-utils-1.0.7.orig/utils/lockd/lockd.man
2614 +++ nfs-utils-1.0.7/utils/lockd/lockd.man
2619 -.\" Copyright (C) 2000 Chip Salzenberg <chip@valinux.com>
2620 +.\" Copyright (C) 2000 Chip Salzenberg <chip@debian.org>
2622 .TH rpc.lockd 8 "25 Feb 2000"
2624 --- nfs-utils-1.0.7.orig/utils/mountd/mountd.c
2625 +++ nfs-utils-1.0.7/utils/mountd/mountd.c
2629 /* Initialize logging. */
2630 -/* xlog_open("mountd"); */
2631 + if (!foreground) xlog_stderr(0);
2632 + xlog_open("mountd");
2634 sa.sa_handler = SIG_IGN;
2637 if (fd > 2) (void) close(fd);
2640 - xlog_background();
2644 --- nfs-utils-1.0.7.orig/ChangeLog
2645 +++ nfs-utils-1.0.7/ChangeLog
2647 +2005-04-07 Chip Salzenberg <chip@pobox.com>
2649 + * debian/changelog: Version 1.0.7-2.
2651 +2005-04-06 Chip Salzenberg <chip@pobox.com>
2653 + * config.guess, config.sub: Update.
2655 + * support/rpc/svc_auth_gss.c (_svcauth_gss): Avoid using a cast as
2656 + an lvalue, as it is non-portable.
2658 + * support/nfs/exports.c (parseopts): Accept "acl" option to mean
2659 + ~NFSEXP_NOACL, and "no_acl" to mean NFSEXP_NOACL.
2660 + (putexportent): Report NFSEXP_NOACL as "no_acl", and ~NFSEXP_NOACL
2662 + * utils/exportfs/exportfs.c (dump): Report NFSEXP_NOACL as
2664 + * utils/exportfs/exports.man: Document "no_acl".
2666 +2005-03-14 NeilBrown <neilb@cse.unsw.edu.au>
2667 + Denis Vlasenko <vda@ilport.com.ua>
2668 + * support/export/client.c(client_init and client_gettype):
2669 + treat N.N.N.N as a special case of MCL_SUBNETWORK instead of
2672 +2005-03-06 G. Allen Morris III <gam3@gam3.net>
2673 + * support/nfs/cacheio.c(readline): Could not read lines greater
2674 + than 128 bytes. [1157791]
2675 + * utils/exportfs/exports.man: Added a SEE ALSO section and
2676 + fixed 2 typos. [1018450]
2678 +2005-02-28 Trond Myklebust <trond.myklebust@fys.uio.no>
2679 + * utils/statd/rmtcall.c(statd_get_socket): If a port number is
2680 + explicitly given, make sure to try to bind to that.
2682 +2005-01-11 Chip Salzenberg <chip@pobox.com>
2684 + * debian/changelog: Version 1.0.7-1.
2685 + * debian/nfs-common.default (NEED_IDMAPD, NEED_GSSD):
2686 + Disable by default, on advice of upstream.
2687 + * debian/nfs-kernel-server.default (NEED_SVCGSSD):
2690 + * utils/svcgssd/Makefile (predep): Symbolically link duplicated
2692 + (distclean): Remove symlinks to duplicated files.
2694 2004-12-17 NeilBrown <neilb@cse.unsw.edu.au>