home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / amiga / libg++-2.6.2-src.lha / libg++-2.6.2 / config.guess next >
Encoding:
Text File  |  1994-12-18  |  12.9 KB  |  472 lines

  1. #!/bin/sh
  2. echo "m68k-cbm-amigados" ; exit 0    #AmigaDOS hack (fnf)
  3. # Attempt to guess a canonical system name.
  4. #   Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  5. #
  6. # This file is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14. # General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. #
  20. # As a special exception to the GNU General Public License, if you
  21. # distribute this file as part of a program that contains a
  22. # configuration script generated by Autoconf, you may include it under
  23. # the same distribution terms that you use for the rest of that program.
  24.  
  25. # Written by Per Bothner <bothner@cygnus.com>.
  26. # The master version of this file is at the FSF in /home/gd/gnu/lib.
  27. #
  28. # This script attempts to guess a canonical system name similar to
  29. # config.sub.  If it succeeds, it prints the system name on stdout, and
  30. # exits with 0.  Otherwise, it exits with 1.
  31. #
  32. # The plan is that this can be called by configure scripts if you
  33. # don't specify an explicit system type (host/target name).
  34. #
  35. # Only a few systems have been added to this list; please add others
  36. # (but try to keep the structure clean).
  37. #
  38.  
  39. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  40. # (ghazi@noc.rutgers.edu 8/24/94.)
  41. if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
  42.     PATH=$PATH:/.attbin ; export PATH
  43. fi
  44.  
  45. UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  46. UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  47. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  48. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  49.  
  50. trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
  51.  
  52. # Note: order is significant - the case branches are not exclusive.
  53.  
  54. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  55.     alpha:OSF1:V*:*)
  56.     # After 1.2, OSF1 uses "V1.3" for uname -r.
  57.     echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
  58.     exit 0 ;;
  59.     alpha:OSF1:*:*)
  60.     # 1.2 uses "1.2" for uname -r.
  61.     echo alpha-dec-osf${UNAME_RELEASE}
  62.         exit 0 ;;
  63.     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  64.     echo arm-acorn-riscix${UNAME_RELEASE}
  65.     exit 0;;
  66.     Pyramid*:OSx*:*:*)
  67.     if test "`(/bin/universe) 2>/dev/null`" = att ; then
  68.         echo pyramid-pyramid-sysv3
  69.     else
  70.         echo pyramid-pyramid-bsd
  71.     fi
  72.     exit 0 ;;
  73.     sun4*:SunOS:5.*:*)
  74.     echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  75.     exit 0 ;;
  76.     sun4*:SunOS:6*:*)
  77.     # According to config.sub, this is the proper way to canonicalize
  78.     # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
  79.     # it's likely to be more like Solaris than SunOS4.
  80.     echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  81.     exit 0 ;;
  82.     sun4*:SunOS:*:*)
  83.     # Japanese Language versions have a version number like `4.1.3-JL'.
  84.     echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  85.     exit 0 ;;
  86.     sun3*:SunOS:*:*)
  87.     echo m68k-sun-sunos${UNAME_RELEASE}
  88.     exit 0 ;;
  89.     RISC*:ULTRIX:*:*)
  90.     echo mips-dec-ultrix${UNAME_RELEASE}
  91.     exit 0 ;;
  92.     VAX*:ULTRIX*:*:*)
  93.     echo vax-dec-ultrix${UNAME_RELEASE}
  94.     exit 0 ;;
  95.     mips:*:5*:RISCos)
  96.     echo mips-mips-riscos${UNAME_RELEASE}
  97.     exit 0 ;;
  98.     m88k:CX/UX:7*:*)
  99.     echo m88k-harris-cxux7
  100.     exit 0 ;;
  101.     m88k:*:4*:R4*)
  102.     echo m88k-motorola-sysv4
  103.     exit 0 ;;
  104.     m88k:*:3*:R3*)
  105.     echo m88k-motorola-sysv3
  106.     exit 0 ;;
  107.     AViiON:dgux:*:*)
  108.     if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
  109.          -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
  110.         echo m88k-dg-dgux${UNAME_RELEASE}
  111.     else
  112.         echo m88k-dg-dguxbcs${UNAME_RELEASE}
  113.     fi
  114.      exit 0 ;;
  115.     M88*:DolphinOS:*:*)    # DolphinOS (SVR3)
  116.     echo m88k-dolphin-sysv3
  117.     exit 0 ;;
  118.     M88*:*:R3*:*)
  119.     # Delta 88k system running SVR3
  120.     echo m88k-motorola-sysv3
  121.     exit 0 ;;
  122.     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  123.     echo m88k-tektronix-sysv3
  124.     exit 0 ;;
  125.     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  126.     echo m68k-tektronix-bsd
  127.     exit 0 ;;
  128.     *:IRIX:*:*)
  129.     echo mips-sgi-irix${UNAME_RELEASE}
  130.     exit 0 ;;
  131.     i[34]86:AIX:*:*)
  132.     echo i386-ibm-aix
  133.     exit 0 ;;
  134.     *:AIX:2:3)
  135.     if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  136.         sed 's/^        //' << EOF >dummy.c
  137.         #include <sys/systemcfg.h>
  138.  
  139.         main()
  140.             {
  141.             if (!__power_pc())
  142.                 exit(1);
  143.             puts("powerpc-ibm-aix3.2.5");
  144.             exit(0);
  145.             }
  146. EOF
  147.         ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
  148.         rm -f dummy.c dummy
  149.         echo rs6000-ibm-aix3.2.5
  150.     elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  151.         echo rs6000-ibm-aix3.2.4
  152.     else
  153.         echo rs6000-ibm-aix3.2
  154.     fi
  155.     exit 0 ;;
  156.     *:AIX:*:4)
  157.     if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
  158.         IBM_ARCH=rs6000
  159.     else
  160.         IBM_ARCH=powerpc
  161.     fi
  162.     if grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then
  163.         IBM_REV=4.1
  164.     elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then
  165.         IBM_REV=4.1.1
  166.     else
  167.         IBM_REV=4.${UNAME_RELEASE}
  168.     fi
  169.     echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  170.     exit 0 ;;
  171.     *:AIX:*:*)
  172.     echo rs6000-ibm-aix
  173.     exit 0 ;;
  174.     *:BOSX:*:*)
  175.     echo rs6000-bull-bosx
  176.     exit 0 ;;
  177.     DPX/2?00:B.O.S.:*:*)
  178.     echo m68k-bull-sysv3
  179.     exit 0 ;;
  180.     9000/[34]??:4.3bsd:1.*:*)
  181.     echo m68k-hp-bsd
  182.     exit 0 ;;
  183.     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  184.     echo m68k-hp-bsd4.4
  185.     exit 0 ;;
  186.     9000/[3478]??:HP-UX:*:*)
  187.     case "${UNAME_MACHINE}" in
  188.         9000/31? )            HP_ARCH=m68000 ;;
  189.         9000/[34]?? )         HP_ARCH=m68k ;;
  190.         9000/7?? | 9000/8?7 ) HP_ARCH=hppa1.1 ;;
  191.         9000/8?? )            HP_ARCH=hppa1.0 ;;
  192.     esac
  193.     HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  194.     echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  195.     exit 0 ;;
  196.     3050*:HI-UX:*:*)
  197.     sed 's/^    //' << EOF >dummy.c
  198.     #include <unistd.h>
  199.     int
  200.     main ()
  201.     {
  202.       long cpu = sysconf (_SC_CPU_VERSION);
  203.       /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  204.          true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
  205.          results, however.  */
  206.       if (CPU_IS_PA_RISC (cpu))
  207.         {
  208.           switch (cpu)
  209.         {
  210.           case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  211.           case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  212.           case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  213.           default: puts ("hppa-hitachi-hiuxwe2"); break;
  214.         }
  215.         }
  216.       else if (CPU_IS_HP_MC68K (cpu))
  217.         puts ("m68k-hitachi-hiuxwe2");
  218.       else puts ("unknown-hitachi-hiuxwe2");
  219.       exit (0);
  220.     }
  221. EOF
  222.     ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
  223.     rm -f dummy.c dummy
  224.     echo unknown-hitachi-hiuxwe2
  225.     exit 0 ;;
  226.     9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* )
  227.     echo hppa1.1-hp-bsd
  228.     exit 0 ;;
  229.     9000/8??:4.3bsd:*:*)
  230.     echo hppa1.0-hp-bsd
  231.     exit 0 ;;
  232.     hp7??:OSF1:*:* | hp8?7:OSF1:*:* )
  233.     echo hppa1.1-hp-osf
  234.     exit 0 ;;
  235.     hp8??:OSF1:*:*)
  236.     echo hppa1.0-hp-osf
  237.     exit 0 ;;
  238.     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  239.     echo c1-convex-bsd
  240.         exit 0 ;;
  241.     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  242.     if getsysinfo -f scalar_acc
  243.     then echo c32-convex-bsd
  244.     else echo c2-convex-bsd
  245.     fi
  246.         exit 0 ;;
  247.     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  248.     echo c34-convex-bsd
  249.         exit 0 ;;
  250.     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  251.     echo c38-convex-bsd
  252.         exit 0 ;;
  253.     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  254.     echo c4-convex-bsd
  255.         exit 0 ;;
  256.     CRAY*X-MP:UNICOS:*:*)
  257.     echo xmp-cray-unicos
  258.         exit 0 ;;
  259.     CRAY*Y-MP:UNICOS:*:*)
  260.     echo ymp-cray-unicos
  261.         exit 0 ;;
  262.     CRAY-2:UNICOS:*:*)
  263.     echo cray2-cray-unicos
  264.         exit 0 ;;
  265.     hp3[0-9][05]:NetBSD:*:*)
  266.     echo m68k-hp-netbsd${UNAME_RELEASE}
  267.     exit 0 ;;
  268.     i[34]86:BSD/386:*:*)
  269.     echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  270.     exit 0 ;;
  271.     *:FreeBSD:*:*)
  272.     echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  273.     exit 0 ;;
  274.     *:NetBSD:*:*)
  275.     echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  276.     exit 0 ;;
  277.     *:GNU:*:*)
  278.     echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  279.     exit 0 ;;
  280.     *:Linux:*:*)
  281.     echo ${UNAME_MACHINE}-unknown-linux
  282.     exit 0 ;;
  283. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
  284. # are messed up and put the nodename in both sysname and nodename.
  285.     i[34]86:DYNIX/ptx:4*:*)
  286.     echo i386-sequent-sysv4
  287.     exit 0 ;;
  288.     i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
  289.     if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  290.         echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
  291.     else
  292.         echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
  293.     fi
  294.     exit 0 ;;
  295.     i[34]86:*:3.2:*)
  296.     if /bin/uname -X 2>/dev/null >/dev/null ; then
  297.         UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
  298.         (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
  299.         echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
  300.     elif test -f /usr/options/cb.name; then
  301.         UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  302.         echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
  303.     else
  304.         echo ${UNAME_MACHINE}-unknown-sysv32
  305.     fi
  306.     exit 0 ;;
  307.     Intel:Mach:3*:*)
  308.     echo i386-unknown-mach3
  309.     exit 0 ;;
  310.     i860:*:4.*:*) # i860-SVR4
  311.     if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  312.       echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  313.     else # Add other i860-SVR4 vendors below as they are discovered.
  314.       echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
  315.     fi
  316.     exit 0 ;;
  317.     mini*:CTIX:SYS*5:*)
  318.     # "miniframe"
  319.     echo m68010-convergent-sysv
  320.     exit 0 ;;
  321.     M680[234]0:*:R3V[567]*:*)
  322.     test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
  323.     3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
  324.         uname -p 2>/dev/null | grep 86 >/dev/null \
  325.           && echo i486-ncr-sysv4.3 && exit 0 ;;
  326.     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  327.         uname -p 2>/dev/null | grep 86 >/dev/null \
  328.           && echo i486-ncr-sysv4 && exit 0 ;;
  329.     m680[234]0:LynxOS:2.2*:*)
  330.     echo m68k-lynx-lynxos${UNAME_RELEASE}
  331.     exit 0 ;;
  332.     mc68030:UNIX_System_V:4.*:*)
  333.     echo m68k-atari-sysv4
  334.     exit 0 ;;
  335.     i[34]86:LynxOS:2.2*:*)
  336.     echo i386-lynx-lynxos${UNAME_RELEASE}
  337.     exit 0 ;;
  338.     TSUNAMI:LynxOS:2.2*:*)
  339.     echo sparc-lynx-lynxos${UNAME_RELEASE}
  340.     exit 0 ;;
  341.     rs6000:LynxOS:2.2*:*)
  342.     echo rs6000-lynx-lynxos${UNAME_RELEASE}
  343.     exit 0 ;;
  344.     RM*:SINIX-*:*:*)
  345.     echo mips-sni-sysv4
  346.     exit 0 ;;
  347.     *:SINIX-*:*:*)
  348.     if uname -p 2>/dev/null >/dev/null ; then
  349.         UNAME_MACHINE=`(uname -p) 2>/dev/null`
  350.         echo ${UNAME_MACHINE}-sni-sysv4
  351.     else
  352.         echo ns32k-sni-sysv
  353.     fi
  354.     exit 0 ;;
  355. esac
  356.  
  357. #echo '(No uname command or uname output not recognized.)' 1>&2
  358. #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  359.  
  360. cat >dummy.c <<EOF
  361. main ()
  362. {
  363. #if defined (sony)
  364. #if defined (MIPSEB)
  365.   /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
  366.      I don't know....  */
  367.   printf ("mips-sony-bsd\n"); exit (0);
  368. #else
  369.   printf ("m68k-sony-newsos\n"); exit (0);
  370. #endif
  371. #endif
  372.  
  373. #if defined (__arm) && defined (__acorn) && defined (__unix)
  374.   printf ("arm-acorn-riscix"); exit (0);
  375. #endif
  376.  
  377. #if defined (hp300) && !defined (hpux)
  378.   printf ("m68k-hp-bsd\n"); exit (0);
  379. #endif
  380.  
  381. #if defined (NeXT)
  382. #if !defined (__ARCHITECTURE__)
  383. #define __ARCHITECTURE__ "m68k"
  384. #endif
  385.   int version;
  386.   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  387.   printf ("%s-next-nextstep%s\n", __ARCHITECTURE__,  version==2 ? "2" : "3");
  388.   exit (0);
  389. #endif
  390.  
  391. #if defined (MULTIMAX) || defined (n16)
  392. #if defined (UMAXV)
  393.   printf ("ns32k-encore-sysv\n"); exit (0);
  394. #else
  395. #if defined (CMU)
  396.   printf ("ns32k-encore-mach\n"); exit (0);
  397. #else
  398.   printf ("ns32k-encore-bsd\n"); exit (0);
  399. #endif
  400. #endif
  401. #endif
  402.  
  403. #if defined (__386BSD__)
  404.   printf ("i386-unknown-bsd\n"); exit (0);
  405. #endif
  406.  
  407. #if defined (sequent)
  408. #if defined (i386)
  409.   printf ("i386-sequent-dynix\n"); exit (0);
  410. #endif
  411. #if defined (ns32000)
  412.   printf ("ns32k-sequent-dynix\n"); exit (0);
  413. #endif
  414. #endif
  415.  
  416. #if defined (_SEQUENT_)
  417.   printf ("i386-sequent-ptx\n"); exit (0);
  418. #endif
  419.  
  420. #if defined (vax)
  421. #if !defined (ultrix)
  422.   printf ("vax-dec-bsd\n"); exit (0);
  423. #else
  424.   printf ("vax-dec-ultrix\n"); exit (0);
  425. #endif
  426. #endif
  427.  
  428. #if defined (alliant) && defined (i860)
  429.   printf ("i860-alliant-bsd\n"); exit (0);
  430. #endif
  431.  
  432.   exit (1);
  433. }
  434. EOF
  435.  
  436. ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
  437. rm -f dummy.c dummy
  438.  
  439. # Apollos put the system type in the environment.
  440.  
  441. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
  442.  
  443. # Convex versions that predate uname can use getsysinfo(1)
  444.  
  445. if [ -x /usr/convex/getsysinfo ]
  446. then
  447.     case `getsysinfo -f cpu_type` in
  448.     c1*)
  449.     echo c1-convex-bsd
  450.     exit 0 ;;
  451.     c2*)
  452.     if getsysinfo -f scalar_acc
  453.     then echo c32-convex-bsd
  454.     else echo c2-convex-bsd
  455.     fi
  456.     exit 0 ;;
  457.     c34*)
  458.     echo c34-convex-bsd
  459.     exit 0 ;;
  460.     c38*)
  461.     echo c38-convex-bsd
  462.     exit 0 ;;
  463.     c4*)
  464.     echo c4-convex-bsd
  465.     exit 0 ;;
  466.     esac
  467. fi
  468.  
  469. #echo '(Unable to guess system type)' 1>&2
  470.  
  471. exit 1
  472.