home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / libg++-2.5.3-src.lha / src / amiga / libg++-2.5.3 / libg++-2.5.3-amiga / config.guess next >
Text File  |  1994-02-20  |  8KB  |  298 lines

  1. #!/bin/sh
  2. echo "m68k-cbm-amigados" ; exit 0    #HACK (fnf)
  3. # This script attempts to guess a canonical system name.
  4. #   Copyright (C) 1992, 1993 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. #
  21. # This script attempts to guess a canonical system name similar to
  22. # config.sub.  If it succeeds, it prints the system name on stdout, and
  23. # exits with 0.  Otherwise, it exits with 1.
  24. #
  25. # The plan is that this can be called by configure scripts if you
  26. # don't specify an explicit system type (host/target name).
  27. #
  28. # Only a few systems have been added to this list; please add others
  29. # (but try to keep the structure clean).
  30. #
  31.  
  32. UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  33. UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  34. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  35. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  36.  
  37. # Note: order is significant - the case branches are not exclusive.
  38.  
  39. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  40.     alpha:OSF1:1.*:*)
  41.     # 1.2 uses "1.2" for uname -r.
  42.     echo alpha-dec-osf${UNAME_RELEASE}
  43.         exit 0 ;;
  44.     alpha:OSF1:V1.*:*)
  45.     # 1.3 uses "V1.3" for uname -r.
  46.     echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
  47.     exit 0 ;;
  48.     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  49.     echo arm-acorn-riscix${UNAME_RELEASE}
  50.     exit 0;;
  51.     sun4*:SunOS:5.*:*)
  52.     echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  53.     exit 0 ;;
  54.     sun4*:SunOS:6*:*)
  55.     # According to config.sub, this is the proper way to canonicalize
  56.     # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
  57.     # it's likely to be more like Solaris than SunOS4.
  58.     echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  59.     exit 0 ;;
  60.     sun4*:SunOS:*:*)
  61.     echo sparc-sun-sunos${UNAME_RELEASE}
  62.     exit 0 ;;
  63.     sun3*:SunOS:*:*)
  64.     echo m68k-sun-sunos${UNAME_RELEASE}
  65.     exit 0 ;;
  66.     RISC*:ULTRIX:*:*)
  67.     echo mips-dec-ultrix${UNAME_RELEASE}
  68.     exit 0 ;;
  69.     VAX*:ULTRIX*:*:*)
  70.     echo vax-dec-ultrix${UNAME_RELEASE}
  71.     exit 0 ;;
  72.     mips:*:5*:RISCos)
  73.     echo mips-mips-riscos${UNAME_RELEASE}
  74.     exit 0 ;;
  75.     m88k:*:4*:R4*)
  76.     echo m88k-motorola-sysv4
  77.     exit 0 ;;
  78.     m88k:*:3*:R3*)
  79.     echo m88k-motorola-sysv3
  80.     exit 0 ;;
  81.     AViiON:dgux:*:*)
  82.      echo m88k-dg-dgux${UNAME_RELEASE}
  83.      exit 0 ;;
  84.     M88*:*:R3*:*)
  85.     # Delta 88k system running SVR3
  86.     echo m88k-motorola-sysv3
  87.     exit 0 ;;
  88.     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  89.     echo m88k-tektronix-sysv3
  90.     exit 0 ;;
  91.     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  92.     echo m68k-tektronix-bsd
  93.     exit 0 ;;
  94.     *:IRIX:*:*)
  95.     echo mips-sgi-irix${UNAME_RELEASE}
  96.     exit 0 ;;
  97.     i[34]86:AIX:*:*)
  98.     echo i386-ibm-aix
  99.     exit 0 ;;
  100.     *:AIX:2:3)
  101.     echo rs6000-ibm-aix3.2
  102.     exit 0 ;;
  103.     *:AIX:*:*)
  104.     echo rs6000-ibm-aix
  105.     exit 0 ;;
  106.     *:BOSX:*:*)
  107.     echo rs6000-bull-bosx
  108.     exit 0 ;;
  109.     DPX/2?00:B.O.S.:*:*)
  110.     echo m68k-bull-sysv3
  111.     exit 0 ;;
  112.     9000/31?:HP-UX:*:*)
  113.     echo m68000-hp-hpux
  114.     exit 0 ;;
  115.     9000/[34]??:HP-UX:*:*)
  116.     echo m68k-hp-hpux
  117.     exit 0 ;;
  118.     9000/[34]??:4.3bsd:1.*:*)
  119.     echo m68k-hp-bsd
  120.     exit 0 ;;
  121.     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  122.     echo m68k-hp-bsd4.4
  123.     exit 0 ;;
  124.     9000/7??:HP-UX:*:* | 9000/8?7:HP-UX:*:* )
  125.     echo hppa1.1-hp-hpux
  126.     exit 0 ;;
  127.     9000/8??:HP-UX:*:*)
  128.     echo hppa1.0-hp-hpux
  129.     exit 0 ;;
  130.     3050*:HI-UX:*:*)
  131.     sed 's/^    //' << EOF >dummy.c
  132.     #include <unistd.h>
  133.     int
  134.     main ()
  135.     {
  136.       long cpu = sysconf (_SC_CPU_VERSION);
  137.       if (CPU_IS_HP_MC68K (cpu))
  138.         puts ("m68k-hitachi-hiuxwe2");
  139.       else if (CPU_IS_PA_RISC (cpu))
  140.         {
  141.           switch (cpu)
  142.         {
  143.           case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  144.           case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  145.           case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  146.           default: puts ("hppa-hitachi-hiuxwe2"); break;
  147.         }
  148.         }
  149.       else puts ("unknown-hitachi-hiuxwe2");
  150.       exit (0);
  151.     }
  152. EOF
  153.     ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
  154.     rm -f dummy.c dummy
  155.     echo unknown-hitachi-hiuxwe2
  156.     exit 0 ;;
  157.     9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* )
  158.     echo hppa1.1-hp-bsd
  159.     exit 0 ;;
  160.     9000/8??:4.3bsd:*:*)
  161.     echo hppa1.0-hp-bsd
  162.     exit 0 ;;
  163.     C1*:ConvexOS:*:*)
  164.     echo c1-convex-bsd
  165.         exit 0 ;;
  166.     C2*:ConvexOS:*:*)
  167.     echo c2-convex-bsd
  168.         exit 0 ;;
  169.     CRAY*X-MP:UNICOS:*:*)
  170.     echo xmp-cray-unicos
  171.         exit 0 ;;
  172.     CRAY*Y-MP:UNICOS:*:*)
  173.     echo ymp-cray-unicos
  174.         exit 0 ;;
  175.     CRAY-2:UNICOS:*:*)
  176.     echo cray2-cray-unicos
  177.         exit 0 ;;
  178.     hp3[0-9][05]:NetBSD:*:*)
  179.     echo m68k-hp-netbsd${UNAME_RELEASE}
  180.     exit 0 ;;
  181.     i[34]86:NetBSD:*:*)
  182.     echo ${UNAME_MACHINE}-unknown-netbsd${UNAME_RELEASE}
  183.     exit 0 ;;
  184.     i[34]86:Linux:*:*)
  185.     echo ${UNAME_MACHINE}-unknown-linux
  186.     exit 0 ;;
  187.     i[34]86:UNIX_SV:4.*:*)
  188.     if grep Novell /gnu/include/link.h >/dev/null 2>/dev/null; then
  189.         echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
  190.     else
  191.         echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
  192.     fi
  193.     exit 0 ;;
  194.     i[34]86:*:3.2:*)
  195.     if /bin/uname -X 2>/dev/null >/dev/null ; then
  196.         UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
  197.         (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
  198.         echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
  199.     else
  200.         echo ${UNAME_MACHINE}-unknown-sysv32
  201.     fi
  202.     exit 0 ;;
  203.     mini*:CTIX:SYS*5:*)
  204.     # "miniframe"
  205.     echo m68010-convergent-sysv
  206.     exit 0 ;;
  207.     M680[234]0:*:R3V[567]*:*)
  208.     test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
  209.     3[34]??:*:4.0:*)
  210.     uname -p 2>/dev/null | grep 86 >/dev/null \
  211.       && echo i486-ncr-sysv4 && exit 0 ;;
  212.     m680[234]0:LynxOS:2.2*:*)
  213.     echo m68k-lynx-lynxos${UNAME_RELEASE}
  214.     exit 0 ;;
  215.     i[34]86:LynxOS:2.2*:*)
  216.     echo i386-lynx-lynxos${UNAME_RELEASE}
  217.     exit 0 ;;
  218.     TSUNAMI:LynxOS:2.2*:*)
  219.     echo sparc-lynx-lynxos${UNAME_RELEASE}
  220.     exit 0 ;;
  221. esac
  222.  
  223. #echo '(No uname command or uname output not recognized.)' 1>&2
  224. #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  225.  
  226. cat >dummy.c <<EOF
  227. main()
  228. {
  229. #if defined (sony)
  230. #if defined (MIPSEB)
  231.   /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
  232.      I don't know....  */
  233.   printf ("mips-sony-bsd\n"); exit (0);
  234. #else
  235.   printf("m68k-sony-newsos\n"); exit(0);
  236. #endif
  237. #endif
  238.  
  239. #if defined (__arm) && defined (__acorn) && defined (__unix)
  240.   printf("arm-acorn-riscix"); exit (0);
  241. #endif
  242.  
  243. #if defined(hp300) && !defined(hpux)
  244.   printf("m68k-hp-bsd\n"); exit(0);
  245. #endif
  246.  
  247. #if defined(NeXT)
  248.   printf("m68k-next-bsd\n"); exit(0);
  249. #endif
  250.  
  251. #if defined (MULTIMAX) || defined (n16)
  252. #if defined (UMAXV)
  253.   printf("ns32k-encore-sysv\n"); exit(0);
  254. #else
  255. #if defined (CMU)
  256.   printf("ns32k-encore-mach\n"); exit(0);
  257. #else
  258.   printf("ns32k-encore-bsd\n"); exit(0);
  259. #endif
  260. #endif
  261. #endif
  262.  
  263. #if defined(__386BSD__) || (defined(__bsdi__) && defined(__i386__))
  264.   printf("i386-unknown-bsd\n"); exit(0);
  265. #endif
  266.  
  267. #if defined(sequent)
  268. #if defined(i386)
  269.   printf("i386-sequent-dynix\n"); exit(0);
  270. #endif
  271. #if defined (ns32000)
  272.   printf("ns32k-sequent-dynix\n"); exit(0);
  273. #endif
  274. #endif
  275.  
  276. #if defined(_SEQUENT_)
  277.   printf("i386-sequent-ptx\n"); exit(0);
  278. #endif
  279.  
  280. #if defined(__amigados__)
  281.   printf("m68k-cbm-amigados\n"); exit(0);
  282. #endif
  283.  
  284.   exit (1);
  285. }
  286. EOF
  287.  
  288. ${CC-gcc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
  289. rm -f dummy.c dummy
  290.  
  291. # Apollos put the system type in the environment.
  292.  
  293. test -d /gnu/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
  294.  
  295. #echo '(Unable to guess system type)' 1>&2
  296.  
  297. exit 1
  298.