diff options
author | Jari Aalto <jari.aalto@cante.net> | 1997-06-05 14:59:13 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:50 +0000 |
commit | d166f048818e10cf3799aa24a174fb22835f1acc (patch) | |
tree | 1ca27f9243900f8b236d0cde6a3862002aea9e19 /support | |
parent | ccc6cda312fea9f0468ee65b8f368e9653e1380b (diff) | |
download | android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.gz android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.bz2 android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.zip |
Imported from ../bash-2.01.tar.gz.
Diffstat (limited to 'support')
-rw-r--r-- | support/SYMLINKS | 11 | ||||
-rw-r--r-- | support/bashbug.sh | 42 | ||||
-rwxr-xr-x | support/config.guess | 397 | ||||
-rwxr-xr-x | support/config.sub | 125 | ||||
-rwxr-xr-x | support/mkconffiles | 65 | ||||
-rw-r--r-- | support/mksignames.c | 149 | ||||
-rw-r--r-- | support/mkversion.c | 305 | ||||
-rwxr-xr-x | support/mkversion.sh | 105 | ||||
-rw-r--r-- | support/printenv.c | 47 | ||||
-rwxr-xr-x | support/printenv.sh (renamed from support/printenv) | 0 | ||||
-rw-r--r-- | support/recho.c | 7 | ||||
-rwxr-xr-x | support/xenix-link.sh | 68 |
12 files changed, 714 insertions, 607 deletions
diff --git a/support/SYMLINKS b/support/SYMLINKS index ec2a5c6..c69b77e 100644 --- a/support/SYMLINKS +++ b/support/SYMLINKS @@ -5,16 +5,19 @@ # lib/readline/tilde.c ../tilde/tilde.c lib/readline/tilde.h ../tilde/tilde.h +# +lib/readline/ansi_stdlib.h ../posixheaders/ansi_stdlib.h lib/readline/posixdir.h ../posixheaders/posixdir.h +lib/readline/posixjmp.h ../posixheaders/posixjmp.h lib/readline/posixstat.h ../posixheaders/posixstat.h -lib/readline/ansi_stdlib.h ../posixheaders/ansi_stdlib.h lib/readline/xmalloc.c ../malloc/xmalloc.c # #lib/tilde/memalloc.h ../posixheaders/memalloc.h # +ansi_stdlib.h lib/posixheaders/ansi_stdlib.h +filecntl.h lib/posixheaders/filecntl.h +memalloc.h lib/posixheaders/memalloc.h posixdir.h lib/posixheaders/posixdir.h +posixjmp.h lib/posixheaders/posixjmp.h posixstat.h lib/posixheaders/posixstat.h -ansi_stdlib.h lib/posixheaders/ansi_stdlib.h stdc.h lib/posixheaders/stdc.h -memalloc.h lib/posixheaders/memalloc.h -filecntl.h lib/posixheaders/filecntl.h diff --git a/support/bashbug.sh b/support/bashbug.sh index 6a2a47b..e12fdac 100644 --- a/support/bashbug.sh +++ b/support/bashbug.sh @@ -21,14 +21,33 @@ MACHTYPE="!MACHTYPE!" PATH=/bin:/usr/bin:/usr/local/bin:$PATH export PATH -TEMP=/tmp/bashbug.$$ +TEMP=/tmp/bbug.$$ + +# Figure out how to echo a string without a trailing newline +N=`echo 'hi there\c'` +case "$N" in +*c) n=-n c= ;; +*) n= c='\c' ;; +esac + +BASHTESTERS="bash-testers@po.cwru.edu" case "$RELSTATUS" in alpha*|beta*) BUGBASH=chet@po.cwru.edu ;; *) BUGBASH=bug-bash@prep.ai.mit.edu ;; esac -BUGADDR=${1-$BUGBASH} +case "$RELSTATUS" in +alpha*|beta*) echo "$0: This is a testing release. Would you like your bug report" + echo "$0: to be sent to the bash-testers mailing list?" + echo $n "$0: Send to bash-testers? $c" + read ans + case "$ans" in + y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;; + esac ;; +esac + +BUGADDR="${1-$BUGBASH}" : ${EDITOR=emacs} @@ -82,25 +101,18 @@ EOF chmod u+w $TEMP cp $TEMP $TEMP.x -# Figure out how to echo a string without a trailing newline -N=`echo 'hi there\c'` -case "$N" in -*c) n=-n c= ;; -*) n= c='\c' ;; -esac - trap '' 2 # ignore interrupts while in editor until $EDITOR $TEMP; do echo "$0: editor \`$EDITOR' exited with nonzero status." echo "$0: Perhaps it was interrupted." - echo "$0: Type `y' to give up, and lose your bug report;" - echo "$0: type `n' to re-enter the editor." + echo "$0: Type \`y' to give up, and lose your bug report;" + echo "$0: type \`n' to re-enter the editor." echo $n "$0: Do you want to give up? $c" read ans case "$ans" in - Yy]*) exit 1 ;; + [Yy]*) exit 1 ;; esac done @@ -112,6 +124,12 @@ then exit fi +echo $n "Send bug report? [y/n] $c" +read ans +case "$ans" in +[Nn]*) exit 0 ;; +esac + ${RMAIL} $BUGADDR < $TEMP || { cat $TEMP >> $HOME/dead.bashbug echo "$0: mail failed: report saved in $HOME/dead.bashbug" >&2 diff --git a/support/config.guess b/support/config.guess index 5f8b4bf..69e6169 100755 --- a/support/config.guess +++ b/support/config.guess @@ -1,6 +1,6 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -43,11 +43,11 @@ elif (test -f /usr/5bin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/usr/5bin fi -UNAME=`(uname) 2>/dev/null` || UNAME=unknown # SunOS -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown # sun4m -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown # 4.1.2 -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown # SunOS -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # 13 +UNAME=`(uname) 2>/dev/null` || UNAME=unknown +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown RELEASE=`expr "$UNAME_RELEASE" : '[^0-9]*\([0-9]*\)'` # 4 case "$RELEASE" in @@ -68,87 +68,114 @@ fi # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:V*:*) - # After 1.2, OSF1 uses "V1.3" for uname -r. - echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` - exit 0 ;; - alpha:OSF1:*:*) - # 1.2 uses "1.2" for uname -r. - echo alpha-dec-osf${UNAME_RELEASE} - exit 0 ;; - i[3456]86:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; + # Begin cases added for Bash alpha:NetBSD:*:*) echo alpha-dec-netbsd${UNAME_RELEASE} exit 0 ;; - sparc:NetBSD:*:*) - echo sparc-sun-netbsd${UNAME_RELEASE} + alpha:OpenBSD:*:*) + echo alpha-dec-openbsd${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} + i?86:NetBSD:*:*) + echo ${UNAME_MACHINE}-pc-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} + i?86:OpenBSD:*:*) + echo ${UNAME_MACHINE}-pc-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} + i?86:FreeBSD:*:*) + echo ${UNAME_MACHINE}-pc-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} + sparc:NetBSD:*:*) + echo sparc-unknown-netbsd${UNAME_RELEASE} exit 0 ;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} + sparc:OpenBSD:*:*) + echo sparc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; vax:NetBSD:*:*) echo vax-dec-netbsd${UNAME_RELEASE} exit 0 ;; - i[3456]86:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + vax:OpenBSD:*:*) + echo vax-dec-openbsd${UNAME_RELEASE} exit 0 ;; - alpha:OpenBSD:*:*) - echo alpha-dec-openbsd${UNAME_RELEASE} + mac68k:machten:*:*) + echo mac68k-apple-machten${UNAME_RELEASE} exit 0 ;; - sparc:OpenBSD:*:*) - echo sparc-sun-openbsd${UNAME_RELEASE} + concurrent*:*:*:*) + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo concurrent-concurrent-sysv3 + else + echo concurrent-concurrent-bsd + fi exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-sun-openbsd${UNAME_RELEASE} + ppc*:SunOS:5.*:*) + echo ppc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-atari-openbsd${UNAME_RELEASE} + sparc:UNIX_SV:4.*:*) + echo sparc-unknown-sysv${UNAME_RELEASE} exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-apple-openbsd${UNAME_RELEASE} + mips:UNIX_SV:4.*:*) + echo mips-mips-sysv${UNAME_RELEASE} exit 0 ;; - hp3[0-9][05]:OpenBSD:*:*) - echo m68k-hp-openbsd${UNAME_RELEASE} + mips:OSF*1:*:*) + echo mips-mips-osf1 exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-cbm-openbsd${UNAME_RELEASE} + mips:4.4BSD:*:*) + echo mips-mips-bsd4.4 exit 0 ;; - vax:OpenBSD:*:*) - echo vax-dec-openbsd${UNAME_RELEASE} + MIServer-S:SMP_DC.OSx:*:dcosx) + echo mips-pyramid-sysv4 exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + news*:NEWS*:*:*) + echo mips-sony-newsos${UNAME_RELEASE} exit 0 ;; - mac68k:machten:*:*) - echo mac68k-apple-machten${UNAME_RELEASE} + i?86:NEXTSTEP:*:*) + echo i386-next-nextstep${RELEASE} + exit 0 ;; + *680?0:NEXTSTEP:*:*) + echo m68k-next-nextstep${RELEASE} + exit 0 ;; + *370:AIX:*:*) + echo ibm370-ibm-aix + exit 0 ;; + ksr1:OSF*1:*:*) + echo ksr1-ksr-osf1 + exit 0 ;; + esa:OSF*1:*:* | ESA:OSF*:*:*) + echo esa-ibm-osf1 + exit 0 ;; + DNP*:DNIX:*:*) + echo m68k-dnix-sysv + exit 0 ;; + *3b2*:*:*:*) + echo we32k-att-sysv3 + exit 0 ;; + *:QNX:*:42*) + echo i386-qssl-qnx`echo ${UNAME_VERSION}` + exit 0 ;; + # end cases added for Bash + alpha:OSF1:*:*) + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; - Amiga*:UNIX_System_V:4.*:*) - echo m68k-cbm-sysv${UNAME_RELEASE} + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-cbm-openbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else @@ -156,27 +183,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi exit 0 ;; NILE:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - concurrent*:*:*:*) - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo concurrent-concurrent-sysv3 - else - echo concurrent-concurrent-bsd - fi - exit 0 ;; - ppc*:SunOS:5.*:*) - echo ppc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo pyramid-pyramid-svr4 exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but @@ -196,57 +210,63 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; - sparc:UNIX_SV:4.*:*) - echo sparc-unknown-sysv${UNAME_RELEASE} + atari*:OpenBSD:*:*) + echo m68k-atari-openbsd${UNAME_RELEASE} exit 0 ;; - mips:UNIX_SV:4.*:*) - echo mips-mips-sysv${UNAME_RELEASE} + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; - mips:OSF*1:*:*) - echo mips-mips-osf1 + sun3*:OpenBSD:*:*) + echo m68k-sun-openbsd${UNAME_RELEASE} exit 0 ;; - mips:4.4BSD:*:*) - echo mips-mips-bsd4.4 + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-apple-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - MIServer-S:SMP_DC.OSx:*:dcosx) - echo mips-pyramid-sysv4 + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - news*:NEWS*:*:*) - echo mips-sony-newsos${UNAME_RELEASE} + echo powerpc-harris-powerux exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 @@ -258,17 +278,17 @@ EOF echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -283,12 +303,6 @@ EOF Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; - i?86:NEXTSTEP:*:*) - echo i386-next-nextstep${RELEASE} - exit 0 ;; - *680?0:NEXTSTEP:*:*) - echo m68k-next-nextstep${RELEASE} - exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; @@ -298,9 +312,6 @@ EOF i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; - *370:AIX:*:*) - echo ibm370-ibm-aix - exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >dummy.c @@ -347,7 +358,7 @@ EOF echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -365,7 +376,7 @@ EOF case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?[679] ) HP_ARCH=hppa1.1 ;; + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; 9000/8?? ) HP_ARCH=hppa1.0 ;; esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` @@ -413,6 +424,13 @@ EOF hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-pc-osf1mk + else + echo ${UNAME_MACHINE}-pc-osf1 + fi + exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; @@ -459,8 +477,14 @@ EOF F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp3[0-9][05]:OpenBSD:*:*) + echo m68k-hp-openbsd${UNAME_RELEASE} + exit 0 ;; i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` @@ -473,10 +497,13 @@ EOF exit 0 ;; i*:CYGWIN*:*) echo i386-pc-cygwin32 - exit 0 ;; + exit 0 ;; p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin32 - exit 0 ;; + echo powerpcle-unknown-cygwin32 + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; @@ -484,21 +511,27 @@ EOF # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` - if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then - echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 - elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then - echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 - elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then - echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0 + if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then + echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then + echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then + echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then + echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then + echo "powerpc-unknown-linux-gnu" ; exit 0 elif test "${UNAME_MACHINE}" = "alpha" ; then - echo alpha-unknown-linux ; exit 0 + echo alpha-unknown-linux-gnu ; exit 0 elif test "${UNAME_MACHINE}" = "sparc" ; then - echo sparc-unknown-linux ; exit 0 + echo sparc-unknown-linux-gnu ; exit 0 else - # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us - # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout. + # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us + # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. test ! -d /usr/lib/ldscripts/. \ - && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0 + && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 # Determine whether the default compiler is a.out or elf cat >dummy.c <<EOF main(argc, argv) @@ -506,9 +539,9 @@ int argc; char *argv[]; { #ifdef __ELF__ - printf ("%s-unknown-linux\n", argv[1]); + printf ("%s-pc-linux-gnu\n", argv[1]); #else - printf ("%s-unknown-linuxaout\n", argv[1]); + printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } @@ -521,32 +554,29 @@ EOF i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; - i?86:OSF1:*:*) - echo i386-unknown-osf1 - exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:* | i[34]86:UNIX_SV:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else - echo ${UNAME_MACHINE}-unknown-sysv32 + echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; Intel:Mach:3*:*) - echo i386-unknown-mach3 + echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 @@ -558,12 +588,6 @@ EOF echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; - ksr1:OSF*1:*:*) - echo ksr1-ksr-osf1 - exit 0 ;; - esa:OSF*1:*:* | ESA:OSF*:*:*) - echo esa-ibm-osf1 - exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv @@ -575,9 +599,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; @@ -585,25 +609,22 @@ EOF echo m68k-atari-sysv4 exit 0 ;; m68*:LynxOS:2.*:*) - echo m68k-lynx-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i?86:LynxOS:2.*:*) - echo i386-lynx-lynxos${UNAME_RELEASE} + echo i386-pc-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-lynx-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-lynx-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; *:LynxOS:*:*) echo ${UNAME_MACHINE}-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - DNP*:DNIX:*:*) - echo m68k-dnix-sysv + echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 @@ -617,14 +638,14 @@ EOF fi exit 0 ;; *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; @@ -637,11 +658,8 @@ EOF exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit 0 ;; - *3b2*:*:*:*) - echo we32k-att-sysv3 - exit 0 ;; + echo i586-unisys-sysv4 + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -689,7 +707,7 @@ main () #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -706,7 +724,7 @@ main () #endif #if defined (__386BSD__) - printf ("i386-unknown-bsd\n"); exit (0); + printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) @@ -745,6 +763,7 @@ main () printf ("i860-alliant-bsd\n"); exit (0); #endif +/* Begin cases added for Bash */ #if defined (tahoe) printf ("tahoe-cci-bsd\n"); exit (0); #endif @@ -782,7 +801,7 @@ main () #endif #if defined (qnx) && defined (i386) - printf ("i386-unknown-qnx\n"); exit (0); + printf ("i386-pc-qnx\n"); exit (0); #endif #if defined (gould) @@ -849,6 +868,8 @@ main () printf ("hbullx20-bull-sysv3\n"); exit (0); #endif +/* End cases added for Bash */ + exit (1); } EOF @@ -886,6 +907,7 @@ then esac fi +# Begin cases added for Bash case "$UNAME" in uts) echo uts-amdahl-sysv${UNAME_RELEASE}; exit 0 ;; esac @@ -898,6 +920,7 @@ if [ -f /bin/fxc.info ]; then echo fxc-alliant-concentrix exit 0 fi +# end cases added for Bash #echo '(Unable to guess system type)' 1>&2 diff --git a/support/config.sub b/support/config.sub index cd1299a..e800bb6 100755 --- a/support/config.sub +++ b/support/config.sub @@ -3,7 +3,7 @@ # Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. +# can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -41,6 +41,8 @@ # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] @@ -62,11 +64,21 @@ case $1 in ;; esac -# Separate what the user gave into CPU-COMPANY and OS (if any). -basic_machine=`echo $1 | sed 's/-[^-]*$//'` -if [ $basic_machine != $1 ] -then os=`echo $1 | sed 's/.*-/-/'` -else os=; fi +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also @@ -81,7 +93,8 @@ case $os in -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) os= basic_machine=$1 ;; @@ -90,33 +103,33 @@ case $os in ;; -sco5) os=sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos @@ -127,21 +140,30 @@ case $os in -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; + -psos*) + os=-psos + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ + tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \ | arme[lb] | pyramid \ - | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ - | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | we32k | ns16k | clipper | i370 | sh \ + | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ | pdp11 | mips64el | mips64orion | mips64orionel \ - | sparc) + | sparc | sparclet | sparclite | sparc64) basic_machine=$basic_machine-unknown ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[3456]86) + basic_machine=$basic_machine-pc + ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 @@ -152,11 +174,11 @@ case $basic_machine in | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | c90-* | t90-* \ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* | butterfly-bbn* \ + | mips64el-* | mips64orion-* | mips64orionel-* | f301-* \ + | butterfly-bbn* \ | cadmus-* | ews*-nec | ibmrt-ibm* | masscomp-masscomp \ | tandem-* | symmetric-* | drs6000-icl | *-*ardent | gould-gould \ | concurrent-* | ksr1-* | esa-ibm | fxc-alliant | *370-amdahl \ @@ -164,7 +186,7 @@ case $basic_machine in ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc*) + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) @@ -199,6 +221,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-sysv ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; balance) basic_machine=ns32k-sequent os=-dynix @@ -223,14 +249,6 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; cray | ymp) basic_machine=ymp-cray os=-unicos @@ -239,6 +257,10 @@ case $basic_machine in basic_machine=cray2-cray os=-unicos ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; crds | unos) basic_machine=m68k-crds ;; @@ -323,6 +345,9 @@ case $basic_machine in hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; + hppa-next) + os=-nextstep3 + ;; ibm032-*) basic_machine=ibmrt-ibm ;; @@ -332,19 +357,19 @@ case $basic_machine in ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[3456]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[3456]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[3456]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[3456]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; iris | iris4d) @@ -566,6 +591,9 @@ case $basic_machine in basic_machine=vax-dec os=-vms ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -645,6 +673,8 @@ esac if [ x"$os" != x"" ] then case $os in + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -656,24 +686,29 @@ case $os in os=-sysv4 ;; -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux|'` + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ - | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -qnx*) + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -linux-gnu* | -uxpv* | -qnx* | -powerux) # Remember, each alternative MUST END IN *, to match a version number. ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; @@ -844,6 +879,9 @@ case $basic_machine in *-masscomp) os=-rtu ;; + f301-fujitsu) + os=-uxpv + ;; *) os=-none ;; @@ -892,9 +930,12 @@ case $basic_machine in -ptx*) vendor=sequent ;; - -vxworks*) + -vxsim* | -vxworks*) vendor=wrs ;; + -aux*) + vendor=apple + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/support/mkconffiles b/support/mkconffiles new file mode 100755 index 0000000..0da4288 --- /dev/null +++ b/support/mkconffiles @@ -0,0 +1,65 @@ +#! /bin/sh +# +# mkconffiles - create _distribution and _patchlevel files in preparation +# for recreating `configure' from `configure.in' +# +# options: +# -s srcdir directory where `configure' resides (defaults to `.') +# -d outdir directory where the files should be written (defaults +# to "$srcdir") +# -v verbose +# -n nocreate - don't create the output files +# +# Chet Ramey +# chet@po.cwru.edu + +PROG=`basename $0` + +# defaults +srcdir=. + +distname="_distribution" +patchname="_patchlevel" + +while [ $# -gt 0 ]; do + case "$1" in + -s) shift; srcdir="$1"; shift;; + -d) shift; outdir="$1"; shift;; + -v) shift; verbose=yes ;; + -n) shift; nocreate=yes;; + --) shift; break;; + *) echo "${PROG}: usage: ${PROG} [-s srcdir] [-d outdir] [-nv]" >&2; exit 2;; + esac +done + +if [ ! -f ${srcdir}/configure ]; then + echo "${PROG}: ${srcdir}/configure not found" >&2 + exit 1 +fi + +# default output directory to source directory +if [ -z "$outdir" ]; then + outdir=${srcdir} +fi + +DISTRIB=`grep '^BASHVERS' ${srcdir}/configure | sed 's:.*=::'` +PATCH=`grep '^BASHPATCH' ${srcdir}/configure | sed 's:.*=::'` + +if [ -n "$verbose" ]; then + echo "${PROG}: creating new distribution files for bash-${DISTRIB}.${PATCH} in ${outdir}" +fi + +distout=${outdir}/${distname} +patchout=${outdir}/${patchname} + +if [ -z "$nocreate" ]; then + echo "$DISTRIB" > $distout + echo "$PATCH" > $patchout +fi + +if [ -n "$verbose" ]; then + echo "${PROG}: created $distout and $patchout" +fi + +exit 0 + diff --git a/support/mksignames.c b/support/mksignames.c index 655485b..19fd3f2 100644 --- a/support/mksignames.c +++ b/support/mksignames.c @@ -48,15 +48,101 @@ initialize_signames () signal_names[0] = "EXIT"; /* Place signal names which can be aliases for more common signal - names first. This allows (for example) SIGEMT to overwrite SIGGRANT. */ + names first. This allows (for example) SIGABRT to overwrite SIGLOST. */ +/* AIX */ +#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */ + signal_names[SIGLOST] = "SIGLOST"; +#endif + +#if defined (SIGMSG) /* HFT input data pending */ + signal_names[SIGMSG] = "SIGMSG"; +#endif + +#if defined (SIGDANGER) /* system crash imminent */ + signal_names[SIGDANGER] = "SIGDANGER"; +#endif + +#if defined (SIGMIGRATE) /* migrate process to another CPU */ + signal_names[SIGMIGRATE] = "SIGMIGRATE"; +#endif + +#if defined (SIGPRE) /* programming error */ + signal_names[SIGPRE] = "SIGPRE"; +#endif + +#if defined (SIGVIRT) /* AIX virtual time alarm */ + signal_names[SIGVIRT] = "SIGVIRT"; +#endif + +#if defined (SIGALRM1) /* m:n condition variables */ + signal_names[SIGALRM1] = "SIGALRM1"; +#endif + +#if defined (SIGWAITING) /* m:n scheduling */ + signal_names[SIGWAITING] = "SIGWAITING"; +#endif + #if defined (SIGGRANT) /* HFT monitor mode granted */ signal_names[SIGGRANT] = "SIGGRANT"; #endif +#if defined (SIGKAP) /* keep alive poll from native keyboard */ + signal_names[SIGKAP] = "SIGKAP"; +#endif + #if defined (SIGRETRACT) /* HFT monitor mode retracted */ signal_names[SIGRETRACT] = "SIGRETRACT"; #endif +#if defined (SIGSOUND) /* HFT sound sequence has completed */ + signal_names[SIGSOUND] = "SIGSOUND"; +#endif + +#if defined (SIGSAK) /* Secure Attention Key */ + signal_names[SIGSAK] = "SIGSAK"; +#endif + +/* SunOS5 */ +#if defined (SIGLWP) /* special signal used by thread library */ + signal_names[SIGLWP] = "SIGLWP"; +#endif + +#if defined (SIGFREEZE) /* special signal used by CPR */ + signal_names[SIGFREEZE] = "SIGFREEZE"; +#endif + +#if defined (SIGTHAW) /* special signal used by CPR */ + signal_names[SIGTHAW] = "SIGTHAW"; +#endif + +#if defined (SIGCANCEL) /* thread cancellation signal used by libthread */ + signal_names[SIGCANCEL] = "SIGCANCEL"; +#endif + +/* HP-UX */ +#if defined (SIGDIL) /* DIL signal (?) */ + signal_names[SIGDIL] = "SIGDIL"; +#endif + +/* System V */ +#if defined (SIGCLD) /* Like SIGCHLD. */ + signal_names[SIGCLD] = "SIGCLD"; +#endif + +#if defined (SIGPWR) /* power state indication */ + signal_names[SIGPWR] = "SIGPWR"; +#endif + +#if defined (SIGPOLL) /* Pollable event (for streams) */ + signal_names[SIGPOLL] = "SIGPOLL"; +#endif + +/* Unknown */ +#if defined (SIGWINDOW) + signal_names[SIGWINDOW] = "SIGWINDOW"; +#endif + +/* Common */ #if defined (SIGHUP) /* hangup */ signal_names[SIGHUP] = "SIGHUP"; #endif @@ -77,14 +163,14 @@ initialize_signames () signal_names[SIGTRAP] = "SIGTRAP"; #endif -#if defined (SIGABRT) /* Cause current process to dump core. */ - signal_names[SIGABRT] = "SIGABRT"; -#endif - #if defined (SIGIOT) /* IOT instruction */ signal_names[SIGIOT] = "SIGIOT"; #endif +#if defined (SIGABRT) /* Cause current process to dump core. */ + signal_names[SIGABRT] = "SIGABRT"; +#endif + #if defined (SIGEMT) /* EMT instruction */ signal_names[SIGEMT] = "SIGEMT"; #endif @@ -121,18 +207,6 @@ initialize_signames () signal_names[SIGTERM] = "SIGTERM"; #endif -#if defined (SIGCLD) /* Like SIGCHLD. */ - signal_names[SIGCLD] = "SIGCLD"; -#endif - -#if defined (SIGPWR) /* Magic thing for some machines. */ - signal_names[SIGPWR] = "SIGPWR"; -#endif - -#if defined (SIGPOLL) /* For keyboard input? */ - signal_names[SIGPOLL] = "SIGPOLL"; -#endif - #if defined (SIGURG) /* urgent condition on IO channel */ signal_names[SIGURG] = "SIGURG"; #endif @@ -185,8 +259,9 @@ initialize_signames () signal_names[SIGWINCH] = "SIGWINCH"; #endif -#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */ - signal_names[SIGLOST] = "SIGLOST"; +/* 4.4 BSD */ +#if defined (SIGINFO) /* information request */ + signal_names[SIGINFO] = "SIGINFO"; #endif #if defined (SIGUSR1) /* user defined signal 1 */ @@ -197,42 +272,6 @@ initialize_signames () signal_names[SIGUSR2] = "SIGUSR2"; #endif -#if defined (SIGMSG) /* HFT input data pending */ - signal_names[SIGMSG] = "SIGMSG"; -#endif - -#if defined (SIGPWR) /* power failure imminent (save your data) */ - signal_names[SIGPWR] = "SIGPWR"; -#endif - -#if defined (SIGDANGER) /* system crash imminent */ - signal_names[SIGDANGER] = "SIGDANGER"; -#endif - -#if defined (SIGMIGRATE) /* migrate process to another CPU */ - signal_names[SIGMIGRATE] = "SIGMIGRATE"; -#endif - -#if defined (SIGPRE) /* programming error */ - signal_names[SIGPRE] = "SIGPRE"; -#endif - -#if defined (SIGSOUND) /* HFT sound sequence has completed */ - signal_names[SIGSOUND] = "SIGSOUND"; -#endif - -#if defined (SIGWINDOW) - signal_names[SIGWINDOW] = "SIGWINDOW"; -#endif - -#if defined (SIGDIL) - signal_names[SIGDIL] = "SIGDIL"; -#endif - -#if defined (SIGSAK) /* Secure Attention Key */ - signal_names[SIGSAK] = "SIGSAK"; -#endif - for (i = 0; i < NSIG; i++) if (signal_names[i] == (char *)NULL) { diff --git a/support/mkversion.c b/support/mkversion.c deleted file mode 100644 index 8164a8f..0000000 --- a/support/mkversion.c +++ /dev/null @@ -1,305 +0,0 @@ -/* Simple program to make new version numbers for the shell. - Big deal, but it was getting out of hand to do everything - in the makefile. */ - -/* Copyright (C) 1989 Free Software Foundation, Inc. - -This file is part of GNU Bash, the Bourne Again SHell. - -Bash is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 1, or (at your option) any later -version. - -Bash is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License along -with Bash; see the file COPYING. If not, write to the Free Software -Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "config.h" - -#include <sys/types.h> -#include "posixstat.h" -#include <stdio.h> -#include "bashansi.h" - -char *progname; -char *dir; -char *status; - -FILE *must_open (); - -main (argc, argv) - int argc; - char **argv; -{ - FILE *file; - float distver = 0.0; - int buildver = 0, patchlevel = 0; - int dist = 0, build = 0, patch = 0; - int dist_inc = 0, build_inc = 0, patch_inc = 0; - int dot_dist_needs_making = 0; - int arg_index = 1; - struct stat sb; - - progname = argv[0]; - - status = dir = (char *)0; - while (arg_index < argc && argv[arg_index][0] == '-') - { - if (strcmp (argv[arg_index], "-dist") == 0) - { - dist++; - dist_inc++; - } - else if (strcmp (argv[arg_index], "-build") == 0) - { - build++; - build_inc++; - } - else if (strcmp (argv[arg_index], "-patch") == 0) - { - patch++; - patch_inc++; - } - else if (strcmp (argv[arg_index], "-dir") == 0) - { - dir = argv[++arg_index]; - if (dir == 0) - { - fprintf (stderr, "%s: `-dir' requires an argument\n", progname); - exit (1); - } - if (stat (dir, &sb) < 0) - { - fprintf (stderr, "%s: cannot stat %s\n", progname, dir); - exit (1); - } - if ((sb.st_mode & S_IFMT) != S_IFDIR) - { - fprintf (stderr, "%s: not a directory\n", progname); - exit (1); - } - } - else if (strcmp (argv[arg_index], "-status") == 0) - { - status = argv[++arg_index]; - if (status == 0) - { - fprintf (stderr, "%s: `-status' requires an argument\n", progname); - exit (1); - } - } - else - { - fprintf (stderr, "%s: unknown option: %s\n", progname, argv[arg_index]); - fprintf (stderr, "usage: %s [-dist|-patch|-build] [-dir directory]\n", progname); - exit (1); - } - arg_index++; - } - - if (get_float_from_file (".distribution", &distver, 1) == 0) - dot_dist_needs_making++; - - if (get_int_from_file (".patchlevel", &patchlevel, 1) == 0) - { - patchlevel = 0; - patch_inc = 0; - } - - if (get_int_from_file (".build", &buildver, 0) == 0) - buildver = 0; - - /* Setting distribution version. */ - if (dist && arg_index < argc) - if (sscanf (argv[arg_index], "%f", &distver) != 1) - { - fprintf (stderr, "%s: Bad input `%s'. Expected float value for -dist.\n", - progname, argv[arg_index]); - exit (1); - } - else - { - arg_index++; - dist_inc = 0; - } - - /* Setting patchlevel via argument. */ - if (patch && arg_index < argc) - if (sscanf (argv[arg_index], "%d", &patchlevel) != 1) - { - fprintf (stderr, "%s: Bad input `%s'. Expected int value for -patch.\n", - progname, argv[arg_index]); - exit (1); - } - else - { - arg_index++; - patch_inc = 0; - } - - if (build && arg_index < argc) - if (sscanf (argv[arg_index], "%d", &buildver) != 1) - { - fprintf (stderr, "%s: Bad input `%s'. Expected int value for -build.\n", - progname, argv[arg_index]); - exit (1); - } - else - { - arg_index++; - build_inc = 0; - } - - if (dot_dist_needs_making && !distver) - { - fprintf (stderr, "%s: There is no `.distribution' file to infer from.\n", progname); - exit (1); - } - - if (dist_inc) - distver = distver + 0.01; - - if (patch_inc) - patchlevel++; - - if (build_inc) - buildver++; - - file = must_open ("newversion.h", "w"); - - /* Output the leading comment. */ - fprintf (file, -"/* Version control for the shell. This file gets changed when you say\n\ - `make newversion' to the Makefile. It is created by mkversion. */\n"); - - fprintf (file, "\n/* The distribution version number of this shell. */\n"); - fprintf (file, "#define DISTVERSION \"%.2f\"\n", distver); - - fprintf (file, "\n/* The patch level of this version of the shell. */\n"); - fprintf (file, "#define PATCHLEVEL %d\n", patchlevel); - - fprintf (file, "\n/* The last built version of this shell. */\n"); - fprintf (file, "#define BUILDVERSION %d\n", buildver); - - if (status) - { - fprintf (file, "\n/* The release status of this shell. */\n"); - fprintf (file, "#define RELSTATUS \"%s\"\n", status); - } - - fprintf (file, "\n/* A version string for use by sccs and the what command. */\n\n"); - if (status) - fprintf (file, "#define SCCSVERSION \"@(#)Bash version %.2f.%d(%d) %s GNU\"\n\n", - distver, patchlevel, buildver, status); - else - fprintf (file, "#define SCCSVERSION \"@(#)Bash version %.2f.%d(%d) GNU\"\n\n", - distver, patchlevel, buildver); - - fclose (file); - - file = must_open (".build", "w"); - fprintf (file, "%d\n", buildver); - fclose (file); - - /* Making a new distribution. */ - if (dist) - { - file = must_open (".distribution", "w"); - fprintf (file, "%.2f\n", distver); - fclose (file); - } - - /* Releasing a new patch level. */ - if (patch) - { - file = must_open (".patchlevel", "w"); - fprintf (file, "%d\n", patchlevel); - fclose (file); - } - - exit (0); -} - -char * -makename (fn, from_srcdir) - char *fn; -{ - char *ret; - int dlen; - - dlen = (from_srcdir && dir) ? strlen (dir) + 1 : 0; - ret = (char *)malloc (dlen + strlen (fn) + 1); - if (ret == 0) - { - fprintf (stderr, "%s: malloc failed\n", progname); - exit (1); - } - if (from_srcdir && dir) - sprintf (ret, "%s/%s", dir, fn); - else - (void)strcpy (ret, fn); - - return ret; -} - -get_float_from_file (filename, var, from_srcdir) - char *filename; - float *var; - int from_srcdir; -{ - FILE *stream; - int result; - char *name; - - name = makename (filename, from_srcdir); - stream = fopen (name, "r"); - free (name); - if (stream == (FILE *)NULL) - return (0); - result = fscanf (stream, "%f\n", var); - fclose (stream); - return (result == 1); -} - -get_int_from_file (filename, var, from_srcdir) - char *filename; - int *var, from_srcdir; -{ - FILE *stream; - int result; - char *name; - - name = makename (filename, from_srcdir); - stream = fopen (name, "r"); - free (name); - if (stream == (FILE *)NULL) - return (0); - result = fscanf (stream, "%d\n", var); - fclose (stream); - return (result == 1); -} - -FILE * -must_open (name, mode) - char *name, *mode; -{ - FILE *temp = fopen (name, mode); - - if (!temp) - { - fprintf (stderr, "%s: Cannot open `%s' for mode `%s'.\n", - progname, name, mode); - fprintf - (stderr, - "Perhaps you don't have %s permission to the file or directory.\n", - (strcmp (mode, "w") == 0) ? "write" : "read"); - exit (3); - } - return (temp); -} diff --git a/support/mkversion.sh b/support/mkversion.sh new file mode 100755 index 0000000..6adbe4c --- /dev/null +++ b/support/mkversion.sh @@ -0,0 +1,105 @@ +#! /bin/sh + +# Simple program to make new version numbers for the shell. +# Big deal, but it was getting out of hand to do everything +# in the makefile. This creates a file named by the -o option, +# otherwise everything is echoed to the standard output. + +PROGNAME=`basename $0` +USAGE="$PROGNAME [-b] -d version -p patchlevel [-s status]" + +while [ $# -gt 0 ]; do + case "$1" in + -o) shift; OUTFILE=$1; shift ;; + -b) shift; inc_build=yes ;; + -s) shift; rel_status=$1; shift ;; + -p) shift; patch_level=$1; shift ;; + -d) shift; dist_version=$1; shift ;; + *) echo "$PROGNAME: usage: $USAGE" >&2 ; exit 2 ;; + esac +done + +# Required arguments +if [ -z "$dist_version" ]; then + echo "${PROGNAME}: required argument -d missing" >&2 + echo "$PROGNAME: usage: $USAGE" >&2 + exit 1 +fi + +if [ -z "$patch_level" ]; then + echo "${PROGNAME}: required argument -p missing" >&2 + echo "$PROGNAME: usage: $USAGE" >&2 + exit 1 +fi + +# Defaults +if [ -z "$rel_status" ]; then + rel_status="release" +fi + +build_ver= +if [ -r .build ]; then + build_ver=`cat .build` +fi +if [ -z "$build_ver" ]; then + build_ver=0 +fi + +# increment the build version if that's what's required + +if [ -n "$inc_build" ]; then + build_ver=`expr $build_ver + 1` +fi + +# If we have an output file specified, make it the standard output +if [ -n "$OUTFILE" ]; then + if exec >$OUTFILE; then + : + else + echo "${PROGNAME}: cannot redirect standard output to $OUTFILE" >&2 + exit 1 + fi +fi + +# Output the leading comment. +echo "/* Version control for the shell. This file gets changed when you say" +echo " \`make version.h' to the Makefile. It is created by mkversion. */" + +# Output the distribution version +float_dist=`echo $dist_version | awk '{printf "%.2f\n", $1}'` + +echo +echo "/* The distribution version number of this shell. */" +echo "#define DISTVERSION \"${float_dist}\"" + +# Output the patch level +echo +echo "/* The patch level of this version of the shell. */" +echo "#define PATCHLEVEL ${patch_level}" + +# Output the build version +echo +echo "/* The last built version of this shell. */" +echo "#define BUILDVERSION ${build_ver}" + +# Output the release status +echo +echo "/* The release status of this shell. */" +echo "#define RELSTATUS \"${rel_status}\"" + +# Output the SCCS version string +sccs_string="${float_dist}.${patch_level}(${build_ver}) ${rel_status} GNU" +echo +echo "/* A version string for use by sccs and the what command. */" +echo "#define SCCSVERSION \"@(#)Bash version ${sccs_string}\"" + +if [ -n "$inc_build" ]; then + # Make sure we can write to .build + if [ -f .build ] && [ ! -w .build ]; then + echo "$PROGNAME: cannot write to .build, not incrementing build version" >&2 + else + echo "$build_ver" > .build + fi +fi + +exit 0 diff --git a/support/printenv.c b/support/printenv.c new file mode 100644 index 0000000..0355f85 --- /dev/null +++ b/support/printenv.c @@ -0,0 +1,47 @@ +/* printenv -- minimal clone of BSD printenv(1). + + usage: printenv [varname] + + Chet Ramey + chet@po.cwru.edu +*/ + +extern char **environ; + +int +main (argc, argv) + int argc; + char **argv; +{ + register char **envp, *eval; + int len; + + argv++; + argc--; + + /* printenv */ + if (argc == 0) + { + for (envp = environ; *envp; envp++) + puts (*envp); + exit (0); + } + + /* printenv varname */ + len = strlen (*argv); + for (envp = environ; *envp; envp++) + { + if (**argv == **envp && strncmp (*envp, *argv, len) == 0) + { + eval = *envp + len; + /* If the environment variable doesn't have an `=', ignore it. */ + if (*eval == '=') + { + puts (eval + 1); + exit (0); + } + } + } + exit (1); +} + diff --git a/support/printenv b/support/printenv.sh index 8aebd43..8aebd43 100755 --- a/support/printenv +++ b/support/printenv.sh diff --git a/support/recho.c b/support/recho.c index 847fa2c..141c763 100644 --- a/support/recho.c +++ b/support/recho.c @@ -1,5 +1,8 @@ #include <stdio.h> +void strprint(); + +int main(argc, argv) int argc; char **argv; @@ -11,13 +14,14 @@ char **argv; strprint(argv[i]); printf(">\n"); } + exit(0); } +void strprint(str) char *str; { register char *s; - int c; for (s = str; s && *s; s++) { if (*s < ' ') { @@ -29,5 +33,4 @@ char *str; } else putchar(*s); } - return(0); } diff --git a/support/xenix-link.sh b/support/xenix-link.sh new file mode 100755 index 0000000..8565563 --- /dev/null +++ b/support/xenix-link.sh @@ -0,0 +1,68 @@ +: +# link bash for Xenix under SCO Unix +# +# For xenix 2.2: +# CC="cc -xenix -lx" ./configure +# edit config.h: +# comment out the define for HAVE_DIRENT_H +# enable the define for HAVE_SYS_NDIR_H to 1 +# make +# CC="cc -xenix -lx" ./link.sh +# +# For xenix 2.3: +# CC="cc -x2.3" ./configure +# make +# CC="cc -x2.3" ./link.sh + +set -x + +rm -f bash + +if [ -z "$CC" ] +then + if [ -f /unix -a ! -f /xenix ] + then + CC="cc -xenix" + else + CC=gcc + fi +fi + +try_dir=no +try_23=no +try_x=yes + +case "$CC" in +*-ldir*) try_dir=yes ;; +esac + +case "$CC" in +*-lx*) try_23=no ; try_x=yes ;; +esac + +case "$CC" in +*-x2.3*|*-l2.3*) try_23=yes ; try_dir=yes ;; +esac + +libs= +try="socket" +if [ $try_dir = yes ] ; then try="$try dir" ; fi +if [ $try_23 = yes ] ; then try="$try 2.3" ; fi +if [ $try_x = yes ] ; then try="$try x" ; fi +for name in $try +do + if [ -r "/lib/386/Slib${name}.a" ] ; then libs="$libs -l$name" ; fi +done + +$CC -o bash shell.o eval.o y.tab.o \ +general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o \ +copy_cmd.o error.o expr.o flags.o nojobs.o subst.o hashcmd.o hashlib.o \ +mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o \ +version.o alias.o array.o braces.o bracecomp.o bashhist.o bashline.o \ +getcwd.o siglist.o vprint.o oslib.o list.o stringlib.o locale.o \ +xmalloc.o builtins/libbuiltins.a \ +lib/readline/libreadline.a lib/readline/libhistory.a \ +-ltermcap lib/glob/libglob.a lib/tilde/libtilde.a lib/malloc/libmalloc.a \ +$libs + +ls -l bash |