/[ascend]/trunk/base/autotools/config/config.guess
ViewVC logotype

Diff of /trunk/base/autotools/config/config.guess

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 135 by johnpye, Wed Dec 21 04:37:33 2005 UTC revision 136 by johnpye, Wed Dec 21 04:52:43 2005 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2  # Attempt to guess a canonical system name.  # Attempt to guess a canonical system name.
3  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4  #   2000, 2001, 2002 Free Software Foundation, Inc.  #   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5    
6  timestamp='2002-03-20'  timestamp='2003-10-03'
7    
8  # This file is free software; you can redistribute it and/or modify it  # This file is free software; you can redistribute it and/or modify it
9  # under the terms of the GNU General Public License as published by  # under the terms of the GNU General Public License as published by
# Line 24  timestamp='2002-03-20' Line 24  timestamp='2002-03-20'
24  # configuration script generated by Autoconf, you may include it under  # configuration script generated by Autoconf, you may include it under
25  # the same distribution terms that you use for the rest of that program.  # the same distribution terms that you use for the rest of that program.
26    
 #####################################################################  
 # This file contains changes for Apache, clearly marked below.  
 # These changes are hereby donated to the public domain.  
 #####################################################################  
   
27  # Originally written by Per Bothner <per@bothner.com>.  # Originally written by Per Bothner <per@bothner.com>.
28  # Please send patches to <config-patches@gnu.org>.  Submit a context  # Please send patches to <config-patches@gnu.org>.  Submit a context
29  # diff and a properly formatted ChangeLog entry.  # diff and a properly formatted ChangeLog entry.
# Line 93  if test $# != 0; then Line 88  if test $# != 0; then
88    exit 1    exit 1
89  fi  fi
90    
91    trap 'exit 1' 1 2 15
92    
93  dummy=dummy-$$  # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
94  trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15  # compiler to aid in system detection is discouraged as it requires
95    # temporary files to be created and, as you can see below, it is a
96    # headache to deal with in a portable fashion.
97    
 # CC_FOR_BUILD -- compiler used by this script.  
98  # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still  # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
99  # use `HOST_CC' if defined, but it is deprecated.  # use `HOST_CC' if defined, but it is deprecated.
100    
101  set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in  # Portable tmp directory creation inspired by the Autoconf team.
102   ,,)    echo "int dummy(){}" > $dummy.c ;  
103    set_cc_for_build='
104    trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
105    trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
106    : ${TMPDIR=/tmp} ;
107     { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
108     { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
109     { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
110     { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
111    dummy=$tmp/dummy ;
112    tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
113    case $CC_FOR_BUILD,$HOST_CC,$CC in
114     ,,)    echo "int x;" > $dummy.c ;
115      for c in cc gcc c89 c99 ; do      for c in cc gcc c89 c99 ; do
116        ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;        if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
       if test $? = 0 ; then  
117           CC_FOR_BUILD="$c"; break ;           CC_FOR_BUILD="$c"; break ;
118        fi ;        fi ;
119      done ;      done ;
     rm -f $dummy.c $dummy.o $dummy.rel ;  
120      if test x"$CC_FOR_BUILD" = x ; then      if test x"$CC_FOR_BUILD" = x ; then
121        CC_FOR_BUILD=no_compiler_found ;        CC_FOR_BUILD=no_compiler_found ;
122      fi      fi
123      ;;      ;;
124   ,,*)   CC_FOR_BUILD=$CC ;;   ,,*)   CC_FOR_BUILD=$CC ;;
125   ,*,*)  CC_FOR_BUILD=$HOST_CC ;;   ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
126  esac'  esac ;'
127    
128  # This is needed to find uname on a Pyramid OSx when run in the BSD universe.  # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
129  # (ghazi@noc.rutgers.edu 1994-08-24)  # (ghazi@noc.rutgers.edu 1994-08-24)
# Line 147  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ Line 154  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
154      UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \      UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
155          /usr/sbin/$sysctl 2>/dev/null || echo unknown)`          /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
156      case "${UNAME_MACHINE_ARCH}" in      case "${UNAME_MACHINE_ARCH}" in
157            armeb) machine=armeb-unknown ;;
158          arm*) machine=arm-unknown ;;          arm*) machine=arm-unknown ;;
159          sh3el) machine=shl-unknown ;;          sh3el) machine=shl-unknown ;;
160          sh3eb) machine=sh-unknown ;;          sh3eb) machine=sh-unknown ;;
# Line 172  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ Line 180  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
180          ;;          ;;
181      esac      esac
182      # The OS release      # The OS release
183      release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`      # Debian GNU/NetBSD machines have a different userland, and
184        # thus, need a distinct triplet. However, they do not need
185        # kernel version information, so it can be replaced with a
186        # suitable tag, in the style of linux-gnu.
187        case "${UNAME_VERSION}" in
188            Debian*)
189            release='-gnu'
190            ;;
191            *)
192            release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
193            ;;
194        esac
195      # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:      # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
196      # contains redundant information, the shorter form:      # contains redundant information, the shorter form:
197      # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.      # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
# Line 221  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ Line 240  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
240      if test $UNAME_RELEASE = "V4.0"; then      if test $UNAME_RELEASE = "V4.0"; then
241          UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`          UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
242      fi      fi
243        # According to Compaq, /usr/sbin/psrinfo has been available on
244        # OSF/1 and Tru64 systems produced since 1995.  I hope that
245        # covers most systems running today.  This code pipes the CPU
246        # types through head -n 1, so we only detect the type of CPU 0.
247        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
248        case "$ALPHA_CPU_TYPE" in
249            "EV4 (21064)")
250            UNAME_MACHINE="alpha" ;;
251            "EV4.5 (21064)")
252            UNAME_MACHINE="alpha" ;;
253            "LCA4 (21066/21068)")
254            UNAME_MACHINE="alpha" ;;
255            "EV5 (21164)")
256            UNAME_MACHINE="alphaev5" ;;
257            "EV5.6 (21164A)")
258            UNAME_MACHINE="alphaev56" ;;
259            "EV5.6 (21164PC)")
260            UNAME_MACHINE="alphapca56" ;;
261            "EV5.7 (21164PC)")
262            UNAME_MACHINE="alphapca57" ;;
263            "EV6 (21264)")
264            UNAME_MACHINE="alphaev6" ;;
265            "EV6.7 (21264A)")
266            UNAME_MACHINE="alphaev67" ;;
267            "EV6.8CB (21264C)")
268            UNAME_MACHINE="alphaev68" ;;
269            "EV6.8AL (21264B)")
270            UNAME_MACHINE="alphaev68" ;;
271            "EV6.8CX (21264D)")
272            UNAME_MACHINE="alphaev68" ;;
273            "EV6.9A (21264/EV69A)")
274            UNAME_MACHINE="alphaev69" ;;
275            "EV7 (21364)")
276            UNAME_MACHINE="alphaev7" ;;
277            "EV7.9 (21364A)")
278            UNAME_MACHINE="alphaev79" ;;
279        esac
280      # A Vn.n version is a released version.      # A Vn.n version is a released version.
281      # A Tn.n version is a released field test version.      # A Tn.n version is a released field test version.
282      # A Xn.n version is an unreleased experimental baselevel.      # A Xn.n version is an unreleased experimental baselevel.
283      # 1.2 uses "1.2" for uname -r.      # 1.2 uses "1.2" for uname -r.
     cat <<EOF >$dummy.s  
     .data  
 \$Lformat:  
     .byte 37,100,45,37,120,10,0 # "%d-%x\n"  
   
     .text  
     .globl main  
     .align 4  
     .ent main  
 main:  
     .frame \$30,16,\$26,0  
     ldgp \$29,0(\$27)  
     .prologue 1  
     .long 0x47e03d80 # implver \$0  
     lda \$2,-1  
     .long 0x47e20c21 # amask \$2,\$1  
     lda \$16,\$Lformat  
     mov \$0,\$17  
     not \$1,\$18  
     jsr \$26,printf  
     ldgp \$29,0(\$26)  
     mov 0,\$16  
     jsr \$26,exit  
     .end main  
 EOF  
     eval $set_cc_for_build  
     $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null  
     if test "$?" = 0 ; then  
         case `./$dummy` in  
             0-0)  
                 UNAME_MACHINE="alpha"  
                 ;;  
             1-0)  
                 UNAME_MACHINE="alphaev5"  
                 ;;  
             1-1)  
                 UNAME_MACHINE="alphaev56"  
                 ;;  
             1-101)  
                 UNAME_MACHINE="alphapca56"  
                 ;;  
             2-303)  
                 UNAME_MACHINE="alphaev6"  
                 ;;  
             2-307)  
                 UNAME_MACHINE="alphaev67"  
                 ;;  
             2-1307)  
                 UNAME_MACHINE="alphaev68"  
                 ;;  
         esac  
     fi  
     rm -f $dummy.s $dummy  
284      echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`      echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
285      exit 0 ;;      exit 0 ;;
286        Alpha*:OpenVMS:*:*)
287        echo alpha-hp-vms
288        exit 0 ;;
289      Alpha\ *:Windows_NT*:*)      Alpha\ *:Windows_NT*:*)
290      # How do we know it's Interix rather than the generic POSIX subsystem?      # How do we know it's Interix rather than the generic POSIX subsystem?
291      # Should we change UNAME_MACHINE based on the output of uname instead      # Should we change UNAME_MACHINE based on the output of uname instead
# Line 298  EOF Line 304  EOF
304      *:[Mm]orph[Oo][Ss]:*:*)      *:[Mm]orph[Oo][Ss]:*:*)
305      echo ${UNAME_MACHINE}-unknown-morphos      echo ${UNAME_MACHINE}-unknown-morphos
306      exit 0 ;;      exit 0 ;;
 #########################  
 # Apache changes  
 #  
 #   *:OS/390:*:*)  
 #      echo i370-ibm-openedition  
 #      exit 0 ;;  
     *:OS390:*:* | *:OS/390:*:*)  
        echo s390-ibm-os390  
        exit 0 ;;  
     *:OS400:*:* | *:OS/400:*:*)  
        echo as400-ibm-os400  
        exit 0 ;;  
     *:OS/2:*:*)  
        echo "i386-pc-os2_emx"  
        exit 0;;  
 #  
 # end Apache changes  
 #########################  
307      *:OS/390:*:*)      *:OS/390:*:*)
308      echo i370-ibm-openedition      echo i370-ibm-openedition
309      exit 0 ;;      exit 0 ;;
# Line 336  EOF Line 324  EOF
324      NILE*:*:*:dcosx)      NILE*:*:*:dcosx)
325      echo pyramid-pyramid-svr4      echo pyramid-pyramid-svr4
326      exit 0 ;;      exit 0 ;;
327        DRS?6000:unix:4.0:6*)
328        echo sparc-icl-nx6
329        exit 0 ;;
330        DRS?6000:UNIX_SV:4.2*:7*)
331        case `/usr/bin/uname -p` in
332            sparc) echo sparc-icl-nx7 && exit 0 ;;
333        esac ;;
334      sun4H:SunOS:5.*:*)      sun4H:SunOS:5.*:*)
335      echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`      echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336      exit 0 ;;      exit 0 ;;
# Line 442  EOF Line 437  EOF
437        exit (-1);        exit (-1);
438      }      }
439  EOF  EOF
440      $CC_FOR_BUILD $dummy.c -o $dummy \      $CC_FOR_BUILD -o $dummy $dummy.c \
441        && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \        && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
442        && rm -f $dummy.c $dummy && exit 0        && exit 0
     rm -f $dummy.c $dummy  
443      echo mips-mips-riscos${UNAME_RELEASE}      echo mips-mips-riscos${UNAME_RELEASE}
444      exit 0 ;;      exit 0 ;;
445      Motorola:PowerMAX_OS:*:*)      Motorola:PowerMAX_OS:*:*)
446      echo powerpc-motorola-powermax      echo powerpc-motorola-powermax
447      exit 0 ;;      exit 0 ;;
448        Motorola:*:4.3:PL8-*)
449        echo powerpc-harris-powermax
450        exit 0 ;;
451        Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
452        echo powerpc-harris-powermax
453        exit 0 ;;
454      Night_Hawk:Power_UNIX:*:*)      Night_Hawk:Power_UNIX:*:*)
455      echo powerpc-harris-powerunix      echo powerpc-harris-powerunix
456      exit 0 ;;      exit 0 ;;
# Line 523  EOF Line 523  EOF
523              exit(0);              exit(0);
524              }              }
525  EOF  EOF
526          $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0          $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
         rm -f $dummy.c $dummy  
527          echo rs6000-ibm-aix3.2.5          echo rs6000-ibm-aix3.2.5
528      elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then      elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
529          echo rs6000-ibm-aix3.2.4          echo rs6000-ibm-aix3.2.4
# Line 622  EOF Line 621  EOF
621                    exit (0);                    exit (0);
622                }                }
623  EOF  EOF
624              (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`              (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
625              if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi              test -z "$HP_ARCH" && HP_ARCH=hppa
             rm -f $dummy.c $dummy  
626          fi ;;          fi ;;
627      esac      esac
628        if [ ${HP_ARCH} = "hppa2.0w" ]
629        then
630            # avoid double evaluation of $set_cc_for_build
631            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
632            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
633            then
634            HP_ARCH="hppa2.0w"
635            else
636            HP_ARCH="hppa64"
637            fi
638        fi
639      echo ${HP_ARCH}-hp-hpux${HPUX_REV}      echo ${HP_ARCH}-hp-hpux${HPUX_REV}
640      exit 0 ;;      exit 0 ;;
641      ia64:HP-UX:*:*)      ia64:HP-UX:*:*)
# Line 660  EOF Line 669  EOF
669        exit (0);        exit (0);
670      }      }
671  EOF  EOF
672      $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0      $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
     rm -f $dummy.c $dummy  
673      echo unknown-hitachi-hiuxwe2      echo unknown-hitachi-hiuxwe2
674      exit 0 ;;      exit 0 ;;
675      9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )      9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
# Line 719  EOF Line 727  EOF
727      CRAY*TS:*:*:*)      CRAY*TS:*:*:*)
728      echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'      echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
729      exit 0 ;;      exit 0 ;;
     CRAY*T3D:*:*:*)  
     echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'  
     exit 0 ;;  
730      CRAY*T3E:*:*:*)      CRAY*T3E:*:*:*)
731      echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'      echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
732      exit 0 ;;      exit 0 ;;
733      CRAY*SV1:*:*:*)      CRAY*SV1:*:*:*)
734      echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'      echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
735      exit 0 ;;      exit 0 ;;
736        *:UNICOS/mp:*:*)
737        echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
738        exit 0 ;;
739      F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)      F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
740      FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`      FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
741          FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`          FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
# Line 743  EOF Line 751  EOF
751      *:BSD/OS:*:*)      *:BSD/OS:*:*)
752      echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}      echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
753      exit 0 ;;      exit 0 ;;
754      *:FreeBSD:*:*)      *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
755      echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`      # Determine whether the default compiler uses glibc.
756        eval $set_cc_for_build
757        sed 's/^    //' << EOF >$dummy.c
758        #include <features.h>
759        #if __GLIBC__ >= 2
760        LIBC=gnu
761        #else
762        LIBC=
763        #endif
764    EOF
765        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
766        # GNU/FreeBSD systems have a "k" prefix to indicate we are using
767        # FreeBSD's kernel, but not the complete OS.
768        case ${LIBC} in gnu) kernel_only='k' ;; esac
769        echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
770      exit 0 ;;      exit 0 ;;
771      i*:CYGWIN*:*)      i*:CYGWIN*:*)
772      echo ${UNAME_MACHINE}-pc-cygwin      echo ${UNAME_MACHINE}-pc-cygwin
# Line 755  EOF Line 777  EOF
777      i*:PW*:*)      i*:PW*:*)
778      echo ${UNAME_MACHINE}-pc-pw32      echo ${UNAME_MACHINE}-pc-pw32
779      exit 0 ;;      exit 0 ;;
780      x86:Interix*:3*)      x86:Interix*:[34]*)
781      echo i386-pc-interix3      echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
782        exit 0 ;;
783        [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
784        echo i${UNAME_MACHINE}-pc-mks
785      exit 0 ;;      exit 0 ;;
786      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
787      # How do we know it's Interix rather than the generic POSIX subsystem?      # How do we know it's Interix rather than the generic POSIX subsystem?
788      # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we      # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
789      # UNAME_MACHINE based on the output of uname instead of i386?      # UNAME_MACHINE based on the output of uname instead of i386?
790      echo i386-pc-interix      echo i586-pc-interix
791      exit 0 ;;      exit 0 ;;
792      i*:UWIN*:*)      i*:UWIN*:*)
793      echo ${UNAME_MACHINE}-pc-uwin      echo ${UNAME_MACHINE}-pc-uwin
# Line 782  EOF Line 807  EOF
807      arm*:Linux:*:*)      arm*:Linux:*:*)
808      echo ${UNAME_MACHINE}-unknown-linux-gnu      echo ${UNAME_MACHINE}-unknown-linux-gnu
809      exit 0 ;;      exit 0 ;;
810        cris:Linux:*:*)
811        echo cris-axis-linux-gnu
812        exit 0 ;;
813      ia64:Linux:*:*)      ia64:Linux:*:*)
814      echo ${UNAME_MACHINE}-unknown-linux-gnu      echo ${UNAME_MACHINE}-unknown-linux-gnu
815      exit 0 ;;      exit 0 ;;
# Line 805  EOF Line 833  EOF
833      #endif      #endif
834  EOF  EOF
835      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
836      rm -f $dummy.c      test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
837      test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0      ;;
838        mips64:Linux:*:*)
839        eval $set_cc_for_build
840        sed 's/^    //' << EOF >$dummy.c
841        #undef CPU
842        #undef mips64
843        #undef mips64el
844        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
845        CPU=mips64el
846        #else
847        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
848        CPU=mips64
849        #else
850        CPU=
851        #endif
852        #endif
853    EOF
854        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
855        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
856      ;;      ;;
857      ppc:Linux:*:*)      ppc:Linux:*:*)
858      echo powerpc-unknown-linux-gnu      echo powerpc-unknown-linux-gnu
# Line 842  EOF Line 888  EOF
888      s390:Linux:*:* | s390x:Linux:*:*)      s390:Linux:*:* | s390x:Linux:*:*)
889      echo ${UNAME_MACHINE}-ibm-linux      echo ${UNAME_MACHINE}-ibm-linux
890      exit 0 ;;      exit 0 ;;
891        sh64*:Linux:*:*)
892            echo ${UNAME_MACHINE}-unknown-linux-gnu
893        exit 0 ;;
894      sh*:Linux:*:*)      sh*:Linux:*:*)
895      echo ${UNAME_MACHINE}-unknown-linux-gnu      echo ${UNAME_MACHINE}-unknown-linux-gnu
896      exit 0 ;;      exit 0 ;;
# Line 868  EOF Line 917  EOF
917          ;;          ;;
918        a.out-i386-linux)        a.out-i386-linux)
919          echo "${UNAME_MACHINE}-pc-linux-gnuaout"          echo "${UNAME_MACHINE}-pc-linux-gnuaout"
920          exit 0 ;;                exit 0 ;;
921        coff-i386)        coff-i386)
922          echo "${UNAME_MACHINE}-pc-linux-gnucoff"          echo "${UNAME_MACHINE}-pc-linux-gnucoff"
923          exit 0 ;;          exit 0 ;;
# Line 899  EOF Line 948  EOF
948      LIBC=gnuaout      LIBC=gnuaout
949      #endif      #endif
950      #endif      #endif
951        #ifdef __dietlibc__
952        LIBC=dietlibc
953        #endif
954  EOF  EOF
955      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     rm -f $dummy.c  
956      test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0      test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
957      test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0      test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
958      ;;      ;;
# Line 919  EOF Line 970  EOF
970          # Use sysv4.2uw... so that sysv4* matches it.          # Use sysv4.2uw... so that sysv4* matches it.
971      echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}      echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
972      exit 0 ;;      exit 0 ;;
973        i*86:OS/2:*:*)
974        # If we were able to find `uname', then EMX Unix compatibility
975        # is probably installed.
976        echo ${UNAME_MACHINE}-pc-os2-emx
977        exit 0 ;;
978        i*86:XTS-300:*:STOP)
979        echo ${UNAME_MACHINE}-unknown-stop
980        exit 0 ;;
981        i*86:atheos:*:*)
982        echo ${UNAME_MACHINE}-unknown-atheos
983        exit 0 ;;
984        i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
985        echo i386-unknown-lynxos${UNAME_RELEASE}
986        exit 0 ;;
987        i*86:*DOS:*:*)
988        echo ${UNAME_MACHINE}-pc-msdosdjgpp
989        exit 0 ;;
990      i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)      i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
991      UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`      UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
992      if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then      if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
# Line 940  EOF Line 1008  EOF
1008          UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`          UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1009          echo ${UNAME_MACHINE}-pc-isc$UNAME_REL          echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1010      elif /bin/uname -X 2>/dev/null >/dev/null ; then      elif /bin/uname -X 2>/dev/null >/dev/null ; then
1011          UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`          UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1012          (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486          (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1013          (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \          (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1014              && UNAME_MACHINE=i586              && UNAME_MACHINE=i586
1015          (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \          (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1016              && UNAME_MACHINE=i686              && UNAME_MACHINE=i686
1017          (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \          (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1018              && UNAME_MACHINE=i686              && UNAME_MACHINE=i686
1019          echo ${UNAME_MACHINE}-pc-sco$UNAME_REL          echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1020      else      else
1021          echo ${UNAME_MACHINE}-pc-sysv32          echo ${UNAME_MACHINE}-pc-sysv32
1022      fi      fi
1023      exit 0 ;;      exit 0 ;;
     i*86:*DOS:*:*)  
     echo ${UNAME_MACHINE}-pc-msdosdjgpp  
     exit 0 ;;  
1024      pc:*:*:*)      pc:*:*:*)
1025      # Left here for compatibility:      # Left here for compatibility:
1026          # uname -m prints for DJGPP always 'pc', but it prints nothing about          # uname -m prints for DJGPP always 'pc', but it prints nothing about
# Line 979  EOF Line 1044  EOF
1044      # "miniframe"      # "miniframe"
1045      echo m68010-convergent-sysv      echo m68010-convergent-sysv
1046      exit 0 ;;      exit 0 ;;
1047        mc68k:UNIX:SYSTEM5:3.51m)
1048        echo m68k-convergent-sysv
1049        exit 0 ;;
1050        M680?0:D-NIX:5.3:*)
1051        echo m68k-diab-dnix
1052        exit 0 ;;
1053      M68*:*:R3V[567]*:*)      M68*:*:R3V[567]*:*)
1054      test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;      test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1055      3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)      3[34]??:*: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)
1056      OS_REL=''      OS_REL=''
1057      test -r /etc/.relid \      test -r /etc/.relid \
1058      && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`      && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
# Line 998  EOF Line 1069  EOF
1069      mc68030:UNIX_System_V:4.*:*)      mc68030:UNIX_System_V:4.*:*)
1070      echo m68k-atari-sysv4      echo m68k-atari-sysv4
1071      exit 0 ;;      exit 0 ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)  
     echo i386-unknown-lynxos${UNAME_RELEASE}  
     exit 0 ;;  
1072      TSUNAMI:LynxOS:2.*:*)      TSUNAMI:LynxOS:2.*:*)
1073      echo sparc-unknown-lynxos${UNAME_RELEASE}      echo sparc-unknown-lynxos${UNAME_RELEASE}
1074      exit 0 ;;      exit 0 ;;
# Line 1072  EOF Line 1140  EOF
1140      SX-5:SUPER-UX:*:*)      SX-5:SUPER-UX:*:*)
1141      echo sx5-nec-superux${UNAME_RELEASE}      echo sx5-nec-superux${UNAME_RELEASE}
1142      exit 0 ;;      exit 0 ;;
1143        SX-6:SUPER-UX:*:*)
1144        echo sx6-nec-superux${UNAME_RELEASE}
1145        exit 0 ;;
1146      Power*:Rhapsody:*:*)      Power*:Rhapsody:*:*)
1147      echo powerpc-apple-rhapsody${UNAME_RELEASE}      echo powerpc-apple-rhapsody${UNAME_RELEASE}
1148      exit 0 ;;      exit 0 ;;
# Line 1079  EOF Line 1150  EOF
1150      echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}      echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1151      exit 0 ;;      exit 0 ;;
1152      *:Darwin:*:*)      *:Darwin:*:*)
1153      echo `uname -p`-apple-darwin${UNAME_RELEASE}      case `uname -p` in
1154            *86) UNAME_PROCESSOR=i686 ;;
1155            powerpc) UNAME_PROCESSOR=powerpc ;;
1156        esac
1157        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1158      exit 0 ;;      exit 0 ;;
1159      *:procnto*:*:* | *:QNX:[0123456789]*:*)      *:procnto*:*:* | *:QNX:[0123456789]*:*)
1160      UNAME_PROCESSOR=`uname -p`      UNAME_PROCESSOR=`uname -p`
# Line 1092  EOF Line 1167  EOF
1167      *:QNX:*:4*)      *:QNX:*:4*)
1168      echo i386-pc-qnx      echo i386-pc-qnx
1169      exit 0 ;;      exit 0 ;;
1170      NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)      NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
1171      echo nsr-tandem-nsk${UNAME_RELEASE}      echo nsr-tandem-nsk${UNAME_RELEASE}
1172      exit 0 ;;      exit 0 ;;
1173      *:NonStop-UX:*:*)      *:NonStop-UX:*:*)
# Line 1115  EOF Line 1190  EOF
1190      fi      fi
1191      echo ${UNAME_MACHINE}-unknown-plan9      echo ${UNAME_MACHINE}-unknown-plan9
1192      exit 0 ;;      exit 0 ;;
     i*86:OS/2:*:*)  
     # If we were able to find `uname', then EMX Unix compatibility  
     # is probably installed.  
     echo ${UNAME_MACHINE}-pc-os2-emx  
     exit 0 ;;  
1193      *:TOPS-10:*:*)      *:TOPS-10:*:*)
1194      echo pdp10-unknown-tops10      echo pdp10-unknown-tops10
1195      exit 0 ;;      exit 0 ;;
# Line 1138  EOF Line 1208  EOF
1208      *:ITS:*:*)      *:ITS:*:*)
1209      echo pdp10-unknown-its      echo pdp10-unknown-its
1210      exit 0 ;;      exit 0 ;;
1211      i*86:XTS-300:*:STOP)      SEI:*:*:SEIUX)
1212      echo ${UNAME_MACHINE}-unknown-stop          echo mips-sei-seiux${UNAME_RELEASE}
     exit 0 ;;  
     i*86:atheos:*:*)  
     echo ${UNAME_MACHINE}-unknown-atheos  
1213      exit 0 ;;      exit 0 ;;
1214  esac  esac
1215    
# Line 1264  main () Line 1331  main ()
1331  }  }
1332  EOF  EOF
1333    
1334  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0  $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
 rm -f $dummy.c $dummy  
1335    
1336  # Apollos put the system type in the environment.  # Apollos put the system type in the environment.
1337    

Legend:
Removed from v.135  
changed lines
  Added in v.136

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22