diff options
author | Per Bothner <per@bothner.com> | 1994-08-26 21:38:29 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1994-08-26 21:38:29 +0000 |
commit | 6f023e8aef3d418c3b7d0f06a6f67d98453faf79 (patch) | |
tree | 45cd285f54905c8415cfa9181e61530c39d7c32e /config.guess | |
parent | 0ffe881431f4eb3f042cd45de6d9ac94a5538d26 (diff) | |
download | gdb-6f023e8aef3d418c3b7d0f06a6f67d98453faf79.zip gdb-6f023e8aef3d418c3b7d0f06a6f67d98453faf79.tar.gz gdb-6f023e8aef3d418c3b7d0f06a6f67d98453faf79.tar.bz2 |
* config.guess: More merges from the FSF.
Diffstat (limited to 'config.guess')
-rwxr-xr-x | config.guess | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/config.guess b/config.guess index 08825b4..ef8474b 100755 --- a/config.guess +++ b/config.guess @@ -39,6 +39,8 @@ 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 +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -308,7 +310,7 @@ esac #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >dummy.c <<EOF -main() +main () { #if defined (sony) #if defined (MIPSEB) @@ -316,59 +318,62 @@ main() I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else - printf("m68k-sony-newsos\n"); exit(0); + printf ("m68k-sony-newsos\n"); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix"); exit (0); #endif -#if defined(hp300) && !defined(hpux) - printf("m68k-hp-bsd\n"); exit(0); +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); #endif -#if defined(NeXT) -#if !defined(__ARCHITECTURE__) +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif - printf("%s-next-nextstep\n", __ARCHITECTURE__); exit(0); + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-neststep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); + exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) - printf("ns32k-encore-sysv\n"); exit(0); + printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) - printf("ns32k-encore-mach\n"); exit(0); + printf ("ns32k-encore-mach\n"); exit (0); #else - printf("ns32k-encore-bsd\n"); exit(0); + printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif -#if defined(__386BSD__) - printf("i386-unknown-bsd\n"); exit(0); +#if defined (__386BSD__) + printf ("i386-unknown-bsd\n"); exit (0); #endif -#if defined(sequent) -#if defined(i386) - printf("i386-sequent-dynix\n"); exit(0); +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) - printf("ns32k-sequent-dynix\n"); exit(0); + printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif -#if defined(_SEQUENT_) - printf("i386-sequent-ptx\n"); exit(0); +#if defined (_SEQUENT_) + printf ("i386-sequent-ptx\n"); exit (0); #endif -#if defined(vax) -#if !defined(ultrix) - printf("vax-dec-bsd\n"); exit(0); +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); #else - printf("vax-dec-ultrix\n"); exit(0); + printf ("vax-dec-ultrix\n"); exit (0); #endif #endif @@ -380,7 +385,7 @@ main() } EOF -${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy # Apollos put the system type in the environment. |