diff options
author | Jari Aalto <jari.aalto@cante.net> | 2001-04-06 19:14:31 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:53 +0000 |
commit | 28ef6c316f1aff914bb95ac09787a3c83c1815fd (patch) | |
tree | 2812fe7ffc9beec4f99856906ddfcafda54cf16a /support | |
parent | bb70624e964126b7ac4ff085ba163a9c35ffa18f (diff) | |
download | android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.gz android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.bz2 android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.zip |
Imported from ../bash-2.05.tar.gz.
Diffstat (limited to 'support')
-rw-r--r-- | support/bashbug.sh | 14 | ||||
-rwxr-xr-x | support/config.guess | 17 | ||||
-rwxr-xr-x | support/config.sub | 10 | ||||
-rw-r--r-- | support/mksignames.c | 13 | ||||
-rwxr-xr-x | support/rlvers.sh | 18 | ||||
-rwxr-xr-x | support/shobj-conf | 67 |
6 files changed, 111 insertions, 28 deletions
diff --git a/support/bashbug.sh b/support/bashbug.sh index cab105d..1064cb4 100644 --- a/support/bashbug.sh +++ b/support/bashbug.sh @@ -21,7 +21,17 @@ MACHTYPE="!MACHTYPE!" PATH=/bin:/usr/bin:/usr/local/bin:$PATH export PATH +# If the OS supplies a program to make temp files with semi-random names, +# use it. TEMP=/tmp/bbug.$$ +for d in /bin /usr/bin /usr/local/bin ; do + if [ -x $d/mktemp ]; then + TEMP=`$d/mktemp -t bbug ` ; break; + elif [ -x $d/tempfile ]; then + TEMP=` $d/tempfile --prefix bbug --mode 600 `; break + fi +done + USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]" VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}" @@ -91,7 +101,9 @@ esac BUGADDR="${1-$BUGBASH}" if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then - if [ -x /usr/local/bin/ce ]; then + if [ -x /usr/bin/editor ]; then + DEFEDITOR=editor + elif [ -x /usr/local/bin/ce ]; then DEFEDITOR=ce elif [ -x /usr/local/bin/emacs ]; then DEFEDITOR=emacs diff --git a/support/config.guess b/support/config.guess index ad5983e..6a2c9ff 100755 --- a/support/config.guess +++ b/support/config.guess @@ -168,10 +168,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:Windows:NT:*:SP*) echo intel-pc-opennt exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; # end cases added for Bash alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + # TEST CHANGED FOR BASH to handle `letter version' releases + UNAME_MAJOR=`echo "$UNAME_RELEASE" | sed -e 's/^.\([0-9]\).*/\1/'` + if test X"$UNAME_MAJOR" != X"" && test $UNAME_MAJOR = 4 ; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + elif test X"$UNAME_MAJOR" != X"" && test $UNAME_MAJOR -gt 4 ; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. @@ -703,7 +710,7 @@ EOF echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin32 + echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 @@ -1058,6 +1065,12 @@ EOF *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; + Power*:Darwin:*:*) + echo powerpc-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo ${UNAME_MACHINE}-apple-darwin${UNAME_RELEASE} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/support/config.sub b/support/config.sub index 7d0c026..6cc1150 100755 --- a/support/config.sub +++ b/support/config.sub @@ -173,7 +173,7 @@ case $basic_machine in | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v) + | thumb | d10v | s390) basic_machine=$basic_machine-unknown ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) @@ -676,6 +676,10 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390-*) + basic_machine=s390-ibm + os=-linux + ;; sa29200) basic_machine=a29k-amd os=-udi @@ -946,13 +950,13 @@ case $os in | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; # BEGIN CASES ADDED FOR Bash - -qnx* | -powerux* | -superux* ) + -qnx* | -powerux* | -superux* | -darwin* | -nonstopux*) ;; # END CASES ADDED FOR Bash -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ diff --git a/support/mksignames.c b/support/mksignames.c index cfc3508..6b3196e 100644 --- a/support/mksignames.c +++ b/support/mksignames.c @@ -34,8 +34,19 @@ char *signal_names[2 * NSIG]; +#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0])) + char *progname; +/* AIX 4.3 defines SIGRTMIN and SIGRTMAX as 888 and 999 respectively. + I don't want to allocate so much unused space for the intervening signal + numbers, so we just punt if SIGRTMAX is past the bounds of the + signal_names array (handled in configure). */ +#if defined (SIGRTMAX) && defined (UNUSABLE_RT_SIGNALS) +# undef SIGRTMAX +# undef SIGRTMIN +#endif + #if defined (SIGRTMAX) || defined (SIGRTMIN) # define RTLEN 14 # define RTLIM 256 @@ -49,7 +60,7 @@ initialize_signames () int rtmin, rtmax, rtcnt; #endif - for (i = 1; i < sizeof(signal_names)/sizeof(signal_names[0]); i++) + for (i = 1; i < signal_names_size; i++) signal_names[i] = (char *)NULL; /* `signal' 0 is what we do on exit. */ diff --git a/support/rlvers.sh b/support/rlvers.sh index ea85afa..a6d751f 100755 --- a/support/rlvers.sh +++ b/support/rlvers.sh @@ -5,17 +5,22 @@ # PROGNAME=`basename $0` -TDIR=/tmp/rlvers + +: ${TMPDIR:=/tmp} +TDIR=$TMPDIR/rlvers # defaults CC=cc RL_LIBDIR=/usr/local/lib +RL_INCDIR=/usr/local/include TERMCAP_LIB="-ltermcap" +# cannot rely on the presence of getopts while [ $# -gt 0 ]; do case "$1" in -C) shift ; CC="$1"; shift ;; + -I) shift ; RL_INCDIR="$1" ; shift ;; -L) shift ; RL_LIBDIR="$1" ; shift ;; -T) shift ; TERMCAP_LIB="$1" ; shift ;; -v) shift ; verbose=y ;; @@ -64,7 +69,15 @@ main() } EOF -if eval ${CC} -L${RL_LIBDIR} -o $TDIR/rlvers $TDIR/rlvers.c -lreadline ${TERMCAP_LIB}; +opwd=`pwd` + +cd $TDIR || { + echo "${PROGNAME}: cannot cd to $TDIR" >&2 + echo 0 + exit 1 +} + +if eval ${CC} -L${RL_LIBDIR} -I${RL_INCDIR} -o $TDIR/rlvers $TDIR/rlvers.c -lreadline ${TERMCAP_LIB}; then v=`$TDIR/rlvers` else @@ -80,4 +93,5 @@ unknown | "") echo 0 ;; *) echo "$v" ;; esac +cd $opwd exit 0 diff --git a/support/shobj-conf b/support/shobj-conf index 6649c70..5abef8a 100755 --- a/support/shobj-conf +++ b/support/shobj-conf @@ -43,7 +43,7 @@ while [ $# -gt 0 ]; do done case "${host_os}-${SHOBJ_CC}" in -sunos4*-gcc*) +sunos4*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD=/usr/bin/ld SHOBJ_LDFLAGS='-assert pure-text' @@ -59,7 +59,7 @@ sunos4*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; -sunos5*-gcc*|solaris2*-gcc*) +sunos5*-*gcc*|solaris2*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' @@ -97,7 +97,7 @@ freebsd2* | netbsd* | openbsd*) # ;; # FreeBSD-3.x ELF -freebsd3*) +freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' @@ -113,13 +113,13 @@ freebsd3*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' fi ;; - -linux*) +# All versions of Linux or the semi-mythical GNU Hurd. +linux*|gnu*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' - SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' + SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; @@ -158,10 +158,11 @@ bsdi4*) SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; -osf*-gcc*) +osf*-*gcc*) # Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' @@ -178,7 +179,7 @@ osf*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -aix4.[2-9]*-gcc*) # lightly tested by jik@cisco.com +aix4.[2-9]*-*gcc*) # lightly tested by jik@cisco.com SHOBJ_CFLAGS=-fpic SHOBJ_LD='ld' SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' @@ -203,7 +204,7 @@ aix4.[2-9]*) # # THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface # -irix[56]*-gcc*) +irix[56]*-*gcc*) SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' @@ -216,14 +217,15 @@ irix[56]*) SHOBJ_CFLAGS='-K PIC' SHOBJ_LD=ld # SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@' -# Change from David Kaelbling <drk@sgi.com> +# Change from David Kaelbling <drk@sgi.com>. If you have problems, +# remove the `-no_unresolved' SHOBJ_LDFLAGS='-shared -no_unresolved -soname $@' SHLIB_XLDFLAGS='-rpath $(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -hpux9*-gcc*) +hpux9*-*gcc*) # must use gcc; the bundled cc cannot compile PIC code SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' @@ -239,7 +241,7 @@ hpux9*) SHLIB_STATUS=unsupported ;; -hpux10*-gcc*) +hpux10*-*gcc*) # must use gcc; the bundled cc cannot compile PIC code SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' @@ -253,14 +255,27 @@ hpux10*-gcc*) hpux10*) SHOBJ_STATUS=unsupported SHLIB_STATUS=unsupported + + # If you are using the HP ANSI C compiler, you can uncomment and use + # this code +# SHOBJ_STATUS=unsupported +# SHLIB_STATUS=unsupported +# +# SHOBJ_CFLAGS='+z' +# SHOBJ_LD='ld' +# SHOBJ_LDFLAGS='-b' +# +# SHLIB_XLDFLAGS='' +# SHLIB_LIBSUFF='sl' +# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -hpux11*-gcc*) +hpux11*-*gcc*) # must use gcc; the bundled cc cannot compile PIC code SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' # SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@' - SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s -Wl,+h,$@' + SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@' SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' SHLIB_LIBSUFF='sl' @@ -270,9 +285,23 @@ hpux11*-gcc*) hpux11*) SHOBJ_STATUS=unsupported SHLIB_STATUS=unsupported + + # If you are using the HP ANSI C compiler, you can uncomment and use + # this code +# SHOBJ_STATUS=unsupported +# SHLIB_STATUS=unsupported +# +# SHOBJ_CFLAGS='+z' +# SHOBJ_LD='ld' +# SHOBJ_LDFLAGS='-b' +# +# SHLIB_XLDFLAGS='' +# SHLIB_LIBSUFF='sl' +# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; -sysv4*-gcc*) +sysv4*-*gcc*) SHOBJ_CFLAGS=-shared SHOBJ_LDFLAGS='-shared -h $@' SHOBJ_LD='${CC}' @@ -288,7 +317,7 @@ sysv4*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -sco3.2v5*-gcc*) +sco3.2v5*-*gcc*) SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' @@ -304,7 +333,7 @@ sco3.2v5*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -sysv5uw7*-gcc*) +sysv5uw7*-*gcc*) SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' @@ -320,7 +349,7 @@ sysv5uw7*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -dgux*-gcc*) +dgux*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' @@ -344,7 +373,7 @@ msdos*) # # Rely on correct gcc configuration for everything else # -*-gcc*) +*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' |