Annotation of gcc/configure, revision 1.1.1.4

1.1       root        1: #!/bin/sh
                      2: # Configuration script for GNU CC
1.1.1.2   root        3: #   Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
1.1       root        4: 
                      5: #This file is part of GNU CC.
                      6: 
                      7: #GNU CC is free software; you can redistribute it and/or modify
                      8: #it under the terms of the GNU General Public License as published by
                      9: #the Free Software Foundation; either version 2, or (at your option)
                     10: #any later version.
                     11: 
                     12: #GNU CC is distributed in the hope that it will be useful,
                     13: #but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15: #GNU General Public License for more details.
                     16: 
                     17: #You should have received a copy of the GNU General Public License
                     18: #along with GNU CC; see the file COPYING.  If not, write to
                     19: #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
                     20: 
                     21: #
                     22: # Shell script to create proper links to machine-dependent files in
                     23: # preparation for compiling gcc.
                     24: #
1.1.1.4 ! root       25: # Options: --srcdir=DIR                specifies directory where sources are.
        !            26: #         --host=HOST          specifies host configuration.
        !            27: #         --target=TARGET      specifies target configuration.
        !            28: #         --build=TARGET       specifies configuration of machine you are
        !            29: #                              using to compile GCC.
        !            30: #         --prefix=DIR         specifies directory to install in.
        !            31: #         --exec-prefix=DIR    specifies directory to install executables in.
        !            32: #         --with-gnu-ld        arrange to work with GNU ld.
        !            33: #         --with-gnu-as        arrange to work with GAS.
        !            34: #         --with-stabs         arrange to use stabs instead of host debug format.
        !            35: #         --nfp                assume system has no FPU.
1.1       root       36: #
                     37: # If configure succeeds, it leaves its status in config.status.
                     38: # If configure fails after disturbing the status quo, 
                     39: #      config.status is removed.
                     40: #
                     41: 
                     42: progname=$0
                     43: 
                     44: # Default --srcdir to the directory where the script is found, 
                     45: # if a directory was specified.
1.1.1.3   root       46: # The second sed call is to convert `.//configure' to `./configure'.
                     47: srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
1.1       root       48: if [ x$srcdir = x$0 ]
                     49: then
                     50: srcdir=
                     51: fi
                     52: 
1.1.1.3   root       53: host=
                     54: 
1.1.1.4 ! root       55: # Default prefix to /usr/local.
        !            56: prefix=/usr/local
        !            57: # Default is to let the Makefile set exec_prefix from $(prefix)
        !            58: exec_prefix='$(prefix)'
        !            59: 
1.1       root       60: remove=rm
                     61: hard_link=ln
                     62: symbolic_link='ln -s'
1.1.1.2   root       63: copy=cp
1.1       root       64: 
                     65: # Record all the arguments, to write them in config.status.
                     66: arguments=$*
                     67: 
                     68: #for Test
                     69: #remove="echo rm"
                     70: #hard_link="echo ln"
                     71: #symbolic_link="echo ln -s"
                     72: 
1.1.1.4 ! root       73: target=
        !            74: host=
        !            75: build=
        !            76: 
1.1       root       77: for arg in $*;
                     78: do
1.1.1.4 ! root       79:   case $next_arg in
        !            80:   --srcdir)
        !            81:     srcdir=$arg
        !            82:     next_arg=
        !            83:     ;;
        !            84:   --host)
        !            85:     host=$arg
        !            86:     next_arg=
        !            87:     ;;
        !            88:   --target)
        !            89:     target=$arg
        !            90:     next_arg=
        !            91:     ;;
        !            92:   --build)
        !            93:     build=$arg
        !            94:     next_arg=
        !            95:     ;;
        !            96:   --prefix)
        !            97:     prefix=$arg
        !            98:     next_arg=
        !            99:     ;;
        !           100:   --exec-prefix)
        !           101:     exec_prefix=$arg
        !           102:     next_arg=
        !           103:     ;;
        !           104:   *)
1.1       root      105:     case $arg in
1.1.1.4 ! root      106:      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
        !           107:        next_arg=--srcdir
        !           108:        ;;
1.1       root      109:      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
                    110:        srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
                    111:        ;;
                    112:      -host | --host | --hos | --ho | --h)
1.1.1.4 ! root      113:        next_arg=--host
1.1       root      114:        ;;
                    115:      -host=* | --host=* | --hos=* | --ho=* | --h=*)
                    116:        host=`echo $arg | sed 's/-*h[a-z]*=//'`
                    117:        ;; 
                    118:      -target | --target | --targe | --targ | --tar | --ta | --t)
1.1.1.4 ! root      119:        next_arg=--target
1.1       root      120:        ;;
                    121:      -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
                    122:        target=`echo $arg | sed 's/-*t[a-z]*=//'`
                    123:        ;; 
1.1.1.4 ! root      124:      -build | --build | --buil | --bui | --bu | --b)
        !           125:        next_arg=--build
        !           126:        ;;
        !           127:      -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
        !           128:        build=`echo $arg | sed 's/-*b[a-z]*=//'`
        !           129:        ;; 
        !           130:      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
        !           131:        next_arg=--prefix
        !           132:        ;;
        !           133:      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
        !           134:        prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
        !           135:        ;;
        !           136:      -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
        !           137:        | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
        !           138:        next_arg=--exec-prefix
        !           139:        ;;
        !           140:      -exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* \
        !           141:        | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
        !           142:        | --exe=* | --ex=* | --e=*)
        !           143:        exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
        !           144:        ;;
1.1.1.3   root      145:      -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
                    146:        gnu_ld=yes
                    147:        ;;
                    148:      -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
1.1       root      149:         gas=yes
                    150:        ;;
                    151:      -nfp | --nfp | --nf | --n)
                    152:        nfp=yes
                    153:        ;;
1.1.1.4 ! root      154:      -with-stabs | -with-stab | -with-sta | -with-st | -with-s \
        !           155:        | --with-stabs | --with-stab | --with-sta | --with-st | --with-s \
        !           156:        | -stabs | -stab | -sta | -st  \
        !           157:        | --stabs | --stab | --sta | --st)
        !           158:        stabs=yes
        !           159:        ;;
1.1.1.3   root      160:      -with-* | --with-*) ;; #ignored
1.1.1.2   root      161:      -x | --x) ;; # ignored
1.1.1.3   root      162:      -*)
                    163:        echo "Invalid option \`$arg'" 1>&2
                    164:        exit 1
                    165:        ;;
1.1       root      166:      *)
                    167: # Allow configure HOST TARGET
                    168:        if [ x$host = x ]
                    169:        then
                    170:                host=$target
                    171:        fi
                    172:        target=$arg
                    173:        ;;
                    174:     esac
1.1.1.4 ! root      175:   esac
1.1       root      176: done
                    177: 
                    178: # Find the source files, if location was not specified.
                    179: if [ x$srcdir = x ]
                    180: then
                    181:        srcdirdefaulted=1
                    182:        srcdir=.
                    183:        if [ ! -r tree.c ]
                    184:        then
                    185:                srcdir=..
                    186:        fi
                    187: fi
                    188: 
                    189: if [ ! -r ${srcdir}/tree.c ]
                    190: then
                    191:        if [ x$srcdirdefaulted = x ]
                    192:        then
1.1.1.2   root      193:          echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2
1.1       root      194:        else
1.1.1.2   root      195:          echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2
1.1       root      196:        fi
                    197:        exit 1
                    198: fi
                    199: 
1.1.1.2   root      200: if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
                    201: then
                    202:        echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
                    203:        exit 1
1.1       root      204: fi
                    205: 
                    206: # Complain if an arg is missing
                    207: if [ x$target = x ]
                    208: then
1.1.1.2   root      209:        echo "No target specified." 1>&2
1.1.1.4 ! root      210: 
        !           211:        echo "\
        !           212: Usage: `basename $progname` [--host=HOST] [--build=BUILD]
        !           213:        [--prefix=DIR] [--exec-pref=DIR]
        !           214:        [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--nfp] TARGET" 1>&2
        !           215:        echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
1.1       root      216:        if [ -r config.status ]
                    217:        then
1.1.1.4 ! root      218:                tail +2 config.status 1>&2
1.1       root      219:        fi
                    220:        exit 1
                    221: fi
                    222: 
                    223: # Default other arg
                    224: if [ x$host = x ]
                    225: then
                    226:        host=$target
                    227: fi
1.1.1.4 ! root      228: # If $build was not specified, use $host.
        !           229: if [ x$build = x ]
        !           230: then
        !           231:        build=$host
        !           232: fi
1.1       root      233: 
1.1.1.4 ! root      234: build_xm_file=
1.1.1.3   root      235: host_xm_file=
                    236: host_xmake_file=
                    237: host_broken_install=
                    238: 
1.1.1.4 ! root      239: # Validate the specs, and canonicalize them.
        !           240: canon_build=`$srcdir/config.sub $build` || exit 1
        !           241: canon_host=`$srcdir/config.sub $host` || exit 1
        !           242: canon_target=`$srcdir/config.sub $target` || exit 1
        !           243: 
1.1       root      244: # Decode the host machine, then the target machine.
                    245: # For the host machine, we save the xm_file variable as host_xm_file;
                    246: # then we decode the target machine and forget everything else
                    247: # that came from the host machine.
1.1.1.4 ! root      248: for machine in $canon_build $canon_host $canon_target; do
1.1       root      249: 
                    250:        cpu_type=
                    251:        xm_file=
                    252:        tm_file=
1.1.1.3   root      253:        out_file=
1.1       root      254:        xmake_file=
                    255:        tmake_file=
1.1.1.3   root      256:        header_files=
                    257:        # Set this to force installation and use of collect2.
                    258:        use_collect2=
1.1.1.4 ! root      259:        # Set this to override the default target model.
        !           260:        target_cpu_default=
1.1.1.3   root      261:        # Set this to force use of install.sh.
                    262:        broken_install=
1.1.1.4 ! root      263:        # Set this to control which fixincludes program to use.
        !           264:        fixincludes=fixincludes
1.1       root      265: 
                    266:        case $machine in
                    267:        # Support site-specific machine types.
                    268:        *local*)
                    269:                cpu_type=$machine
                    270:                xm_file=xm-$machine.h
                    271:                tm_file=$machine.h
                    272:                if [ -f $srcdir/config/x-$machine ] ; \
                    273:                then xmake_file=x-$machine; \
                    274:                else true; \
                    275:                fi
                    276:                if [ -f $srcdir/config/t-$machine ] ; \
                    277:                then tmake_file=t-$machine; \
                    278:                else true; \
                    279:                fi
                    280:                ;;
                    281:        vax-*-bsd*)                     # vaxen running BSD
                    282:                tm_file=vax.h
1.1.1.3   root      283:                use_collect2=yes
1.1       root      284:                ;;
                    285:        vax-*-ultrix*)                  # vaxen running ultrix
                    286:                tm_file=ultrix.h
1.1.1.3   root      287:                use_collect2=yes
1.1       root      288:                ;;
                    289:        vax-*-vms*)                     # vaxen running VMS
1.1.1.4 ! root      290:                xm_file=xm-vax-vms.h
        !           291:                tm_file=vax-vms.h
1.1       root      292:                ;;
                    293:        vax-*-sysv*)                    # vaxen running system V
                    294:                xm_file=xm-vaxv.h
                    295:                tm_file=vaxv.h
                    296:                ;;
                    297: # This hasn't been upgraded to GCC 2.
                    298: #      tahoe-harris-*)                 # Harris tahoe, using COFF.
                    299: #              tm_file=harris.h
                    300: #              ;;
                    301: #      tahoe-*-bsd*)                   # tahoe running BSD
                    302: #              xm_file=xm-tahoe.h
                    303: #              tm_file=tahoe.h
                    304: #              ;;
1.1.1.4 ! root      305:        i[34]86-*-osfrose*)             # 386 using OSF/rose
1.1       root      306:                tm_file=i386rose.h
                    307:                xmake_file=x-i386rose
                    308:                tmake_file=t-i386rose
1.1.1.3   root      309:                use_collect2=yes
1.1       root      310:                ;;
1.1.1.4 ! root      311:        i[34]86-sequent-bsd*)           # 80386 from Sequent
1.1       root      312:                xm_file=xm-i386.h
1.1.1.3   root      313:                use_collect2=yes
1.1.1.2   root      314:                if [ x$gas = xyes ]
                    315:                then
                    316:                        tm_file=seq386gas.h
                    317:                else
                    318:                        tm_file=seq386.h
                    319:                fi
                    320:                ;;
1.1.1.4 ! root      321:        i[34]86-*-bsd*)
1.1.1.2   root      322:                xm_file=xm-i386.h
                    323:                tm_file=i386bsd.h
1.1.1.4 ! root      324: #              tmake_file=t-libc-ok
1.1.1.3   root      325:                use_collect2=yes
1.1       root      326:                ;;
1.1.1.4 ! root      327:        i[34]86-*-mach*)
1.1       root      328:                xm_file=xm-i386.h
                    329:                tm_file=i386mach.h
1.1.1.4 ! root      330: #              tmake_file=t-libc-ok
1.1.1.3   root      331:                use_collect2=yes
                    332:                ;;
1.1.1.4 ! root      333:        i[34]86-*-sco3.2v4*)            # 80386 running SCO 3.2v4 system
1.1.1.3   root      334:                xm_file=xm-i386sco.h
                    335:                tm_file=i386sco4.h
1.1.1.4 ! root      336:                xmake_file=x-i386s4
1.1.1.3   root      337:                tmake_file=t-i386sco
1.1.1.4 ! root      338:                fixincludes=fixinc.sco
        !           339:                broken_install=yes
1.1       root      340:                ;;
1.1.1.4 ! root      341:        i[34]86-*-sco*)                 # 80386 running SCO system
1.1.1.2   root      342:                xm_file=xm-i386sco.h
1.1       root      343:                tm_file=i386sco.h
                    344:                xmake_file=x-i386sco
                    345:                tmake_file=t-i386sco
1.1.1.4 ! root      346:                broken_install=yes
1.1       root      347:                ;;
1.1.1.4 ! root      348:        i[34]86-*-isc*)                 # 80386 running ISC system
1.1.1.2   root      349:                xm_file=xm-i386isc.h
1.1       root      350:                xmake_file=x-i386isc
1.1.1.4 ! root      351:                 if [ x$gas = xyes ]
        !           352:                then
        !           353:                        tm_file=i386iscgas.h
        !           354:                        tmake_file=t-i386iscgas
        !           355:                else
        !           356:                        tm_file=i386isc.h
        !           357:                        tmake_file=t-i386isc
        !           358:                fi
        !           359:                broken_install=yes
1.1       root      360:                ;;
1.1.1.4 ! root      361:        i[34]86-ibm-aix*)               # IBM PS/2 running AIX
        !           362:                 if [ x$gas = xyes ]
        !           363:                then
        !           364:                        tm_file=aix386.h
        !           365:                else
        !           366:                        tm_file=aix386ng.h
        !           367:                        use_collect2=yes
        !           368:                fi
1.1       root      369:                xm_file=xm-aix386.h
                    370:                xmake_file=x-aix386
1.1.1.3   root      371:                broken_install=yes
1.1       root      372:                ;;
                    373:        i386-sun-sunos*)                # Sun i386 roadrunner
1.1.1.3   root      374:                xm_file=xm-sun386.h
1.1       root      375:                tm_file=i386sun.h
1.1.1.3   root      376:                use_collect2=yes
1.1       root      377:                ;;
1.1.1.4 ! root      378:        i[34]86-*-linux*)               # Intel 80386's running Linux
        !           379:                cpu_type=i386
        !           380:                xm_file=xm-linux.h
        !           381:                xmake_file=x-linux
        !           382:                tm_file=i386linux.h
        !           383:                broken_install=yes
        !           384:                ;;
        !           385:        i486-ncr-sysv4*)                # NCR 3000 - i486 running system V.4
        !           386:                cpu_type=i386
1.1       root      387:                xm_file=xm-i38v4.h
1.1.1.4 ! root      388:                xmake_file=x-ncr3000
1.1       root      389:                tm_file=i386v4.h
                    390:                tmake_file=t-svr4
                    391:                ;;
1.1.1.4 ! root      392:        i[34]86-*-sysv4*)               # Intel 80386's running system V.4
        !           393:                cpu_type=i386
        !           394:                xm_file=xm-i38v4.h
        !           395:                tm_file=i386v4.h
        !           396:                tmake_file=t-svr4
        !           397:                xmake_file=x-svr4
        !           398:                ;;
        !           399:        i[34]86-*-sysv*)                # Intel 80386's running system V
1.1       root      400:                xm_file=xm-i386v.h
                    401:                xmake_file=x-i386v
                    402:                tmake_file=t-svr3
                    403:                if [ x$gas = xyes ]
                    404:                then
1.1.1.4 ! root      405:                        if [ x$stabs = xyes ]
        !           406:                        then
        !           407:                                tm_file=i386gstabs.h
        !           408:                        else
        !           409:                                tm_file=i386gas.h
        !           410:                        fi
1.1       root      411:                else
                    412:                        tm_file=i386v.h
                    413:                fi
                    414:                ;;
1.1.1.4 ! root      415:        i860-*-mach*)
        !           416:                xm_file=xm-i860.h
        !           417:                tm_file=i860mach.h
        !           418:                tmake_file=t-libc-ok
1.1       root      419:                ;;
                    420:        i860-*-sysv3*)
                    421:                xm_file=xm-i86v3.h
                    422:                xmake_file=x-i860v3
                    423:                tm_file=i860v3.h
                    424:                tmake_file=t-svr3
                    425:                ;;
                    426:        i860-*-sysv4*)
                    427:                xm_file=xm-i86v4.h
                    428:                xmake_file=x-i860v4
                    429:                tm_file=i860v4.h
                    430:                tmake_file=t-svr4
                    431:                ;;
                    432:        i860-alliant-*)         # Alliant FX/2800
1.1.1.3   root      433:                xm_file=xm-fx2800.h
                    434:                xmake_file=x-fx2800
1.1       root      435:                tm_file=fx2800.h
1.1.1.3   root      436:                tmake_file=t-fx2800
1.1       root      437:                ;;
                    438:        i860-*-bsd*)
                    439:                if [ x$gas = xyes ]
                    440:                then
                    441:                        tm_file=i860bg.h
                    442:                else
                    443:                        tm_file=i860b.h
                    444:                fi
1.1.1.3   root      445:                use_collect2=yes
1.1       root      446:                ;;
1.1.1.2   root      447:        sparc-tti-*)
1.1       root      448:                tm_file=pbd.h
                    449:                xm_file=xm-pbd.h
1.1.1.3   root      450:                use_collect2=yes
1.1       root      451:                ;;
1.1.1.4 ! root      452:        elxsi-elxsi-*)
        !           453:                tm_file=elxsi.h
        !           454:                xm_file=xm-elxsi.h
        !           455:                use_collect2=yes
        !           456:                ;;
1.1       root      457:        sparc-*-sunos4*)
                    458:                tm_file=sparc.h
1.1.1.3   root      459:                use_collect2=yes
1.1       root      460:                ;;
                    461:        sparc-*-sunos3*)
                    462:                tm_file=sun4o3.h
1.1.1.3   root      463:                use_collect2=yes
1.1       root      464:                ;;
                    465:        sparc-*-sysv4*)
1.1.1.3   root      466:                xm_file=xm-spcv4.h
1.1.1.2   root      467:                tm_file=sparcv4.h
1.1       root      468:                tmake_file=t-svr4
1.1.1.2   root      469:                xmake_file=x-sparcv4
1.1       root      470:                ;;
1.1.1.4 ! root      471:        sparc-*-solaris2* | sparc-*-sunos5*)
        !           472:                xm_file=xm-spc-sol2.h
1.1.1.3   root      473:                tm_file=spc-sol2.h
1.1.1.4 ! root      474:                tmake_file=t-sol2
1.1.1.3   root      475:                xmake_file=x-sparcv4
1.1.1.4 ! root      476:                fixincludes=fixinc.svr4
        !           477:                broken_install=yes
1.1.1.3   root      478:                ;;
1.1.1.4 ! root      479:        m68k-cbm-sysv4*)                # Commodore variant of V.4.
1.1       root      480:                tm_file=amix.h
                    481:                xm_file=xm-amix.h
                    482:                xmake_file=x-amix
                    483:                tmake_file=t-svr4
1.1.1.3   root      484:                header_files=math-68881.h
1.1       root      485:                ;;
                    486:        m68k-*-sysv4*)                  # Motorola m68k's running system V.4
                    487:                tm_file=m68kv4.h
1.1.1.4 ! root      488:                xm_file=xm-m68kv.h
1.1       root      489:                tmake_file=t-svr4
1.1.1.3   root      490:                header_files=math-68881.h
                    491:                ;;
                    492:        m68k-bull-sysv*)                # Bull DPX/2
                    493:                if [ x$gas = xyes ]
                    494:                then
                    495:                        tm_file=dpx2g.h
                    496:                else
1.1.1.4 ! root      497:                        echo dpx2 supported only with GAS 1>&2
        !           498:                        exit 1
1.1.1.3   root      499:                        tm_file=dpx2.h
                    500:                fi
                    501:                xm_file=xm-m68kv.h
1.1.1.4 ! root      502:                xmake_file=x-dpx2
1.1.1.3   root      503:                use_collect2=yes
                    504:                header_files=math-68881.h
1.1       root      505:                ;;
                    506:        m68k-next-*)
                    507:                tm_file=next.h
                    508:                out_file=next.c
                    509:                xm_file=xm-next.h
1.1.1.2   root      510:                tmake_file=t-next
1.1.1.4 ! root      511:                xmake_file=x-next
1.1.1.3   root      512:                use_collect2=yes
                    513:                header_files=math-68881.h
1.1       root      514:                ;;
                    515:        m68k-sun-sunos3*)
                    516:                if [ x$nfp = xyes ]
                    517:                then
                    518:                        tm_file=sun3n3.h
                    519:                else
                    520:                        tm_file=sun3o3.h
                    521:                fi
1.1.1.3   root      522:                use_collect2=yes
                    523:                header_files=math-68881.h
1.1       root      524:                ;;
1.1.1.4 ! root      525:        m68k-sun-sunos*)                # For SunOS 4 (the default).
1.1       root      526:                if [ x$nfp = xyes ]
                    527:                then
                    528:                        tm_file=sun3n.h
                    529:                else
                    530:                        tm_file=sun3.h
                    531:                fi
1.1.1.3   root      532:                use_collect2=yes
                    533:                header_files=math-68881.h
1.1       root      534:                ;;
1.1.1.2   root      535:        m68k-sun-mach*)
                    536:                tm_file=sun3mach.h
1.1.1.3   root      537:                use_collect2=yes
                    538:                header_files=math-68881.h
1.1.1.2   root      539:                ;;
                    540:        m68k-tti-*)
                    541:                tm_file=pbb.h
                    542:                xm_file=xm-m68kv.h
1.1.1.3   root      543:                use_collect2=yes
                    544:                header_files=math-68881.h
1.1.1.2   root      545:                ;;
1.1       root      546:        m68k-hp-hpux*)  # HP 9000 series 300
                    547:                xm_file=xm-hp320.h
                    548:                if [ x$gas = xyes ]
                    549:                then
                    550:                        xmake_file=x-hp320g
1.1.1.4 ! root      551:                        tmake_file=t-hp320g
1.1       root      552:                        tm_file=hp320g.h
                    553:                else
                    554:                        xmake_file=x-hp320
                    555:                        tm_file=hp320.h
                    556:                fi
1.1.1.3   root      557:                broken_install=yes
                    558:                use_collect2=yes
                    559:                header_files=math-68881.h
1.1       root      560:                ;;
                    561:        m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
                    562:                tm_file=hp3bsd.h
1.1.1.3   root      563:                use_collect2=yes
                    564:                header_files=math-68881.h
1.1       root      565:                ;;
                    566:        m68k-isi-bsd*)
                    567:                if [ x$nfp = xyes ]
                    568:                then
                    569:                        tm_file=isi-nfp.h
                    570:                else
                    571:                        tm_file=isi.h
                    572:                fi
1.1.1.3   root      573:                use_collect2=yes
                    574:                header_files=math-68881.h
1.1       root      575:                ;;
1.1.1.4 ! root      576:        m68k-sony-newsos3*)
        !           577:                xm_file=xm-m68k.h
        !           578:                if [ x$gas = xyes ]
        !           579:                then
        !           580:                        tm_file=news3gas.h
        !           581:                else
        !           582:                        tm_file=news3.h
        !           583:                fi
        !           584:                use_collect2=yes
        !           585:                header_files=math-68881.h
        !           586:                ;;
        !           587:        m68k-sony-bsd* | m68k-sony-newsos*)
1.1       root      588:                xm_file=xm-m68k.h
                    589:                if [ x$gas = xyes ]
                    590:                then
                    591:                        tm_file=newsgas.h
                    592:                else
                    593:                        tm_file=news.h
                    594:                fi
1.1.1.3   root      595:                use_collect2=yes
                    596:                header_files=math-68881.h
1.1       root      597:                ;;
                    598:        m68k-altos-sysv*)                  # Altos 3068
                    599:                if [ x$gas = xyes ]
                    600:                then
                    601:                        xm_file=xm-altos3068.h
                    602:                        tm_file=altos3068.h
                    603:                else
                    604:                        echo "The Altos is supported only with the GNU assembler" 1>&2
                    605:                        exit 1
                    606:                fi
1.1.1.3   root      607:                header_files=math-68881.h
1.1       root      608:                ;;
                    609:        m68k-motorola-sysv*)
                    610:                tm_file=mot3300.h
                    611:                xm_file=xm-mot3300.h
1.1.1.4 ! root      612:                use_collect2=yes
1.1.1.3   root      613:                header_files=math-68881.h
1.1       root      614:                ;;
1.1.1.3   root      615:        m68k-crds-unos*)
1.1       root      616:                xm_file=xm-crds.h
                    617:                xmake_file=x-crds
                    618:                tm_file=crds.h
1.1.1.3   root      619:                broken_install=yes
                    620:                use_collect2=yes
                    621:                header_files=math-68881.h
1.1       root      622:                ;;
                    623:        m68k-apollo-*)
                    624:                xmake_file=x-apollo68
                    625:                tm_file=apollo68.h
1.1.1.3   root      626:                use_collect2=yes
                    627:                header_files=math-68881.h
1.1       root      628:                ;;
1.1.1.4 ! root      629:         m68k-plexus-sysv*)
        !           630:                cpu_type=m68k
        !           631:                tm_file=plexus.h
        !           632:                use_collect2=yes
        !           633:                xm_file=xm-plexus.h
        !           634:                header_files=math-68881.h
        !           635:                ;;
1.1       root      636:        m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
                    637:                tm_file=tower-as.h
                    638:                xm_file=xm-tower.h
1.1.1.3   root      639:                xmake_file=x-tower
                    640:                tmake_file=t-svr3
                    641:                header_files=math-68881.h
                    642:                ;;
                    643:        m68k-*-sysv3*)                  # Motorola m68k's running system V.3
                    644:                tm_file=m68k.h
                    645:                xm_file=xm-m68kv.h
                    646:                xmake_file=x-m68kv
                    647:                tmake_file=t-svr3
                    648:                header_files=math-68881.h
1.1       root      649:                ;;
                    650:        m68000-sun-sunos3*)
                    651:                cpu_type=m68k
                    652:                tm_file=sun2.h
1.1.1.3   root      653:                use_collect2=yes
                    654:                header_files=math-68881.h
1.1       root      655:                ;;
                    656:        m68000-sun-sunos4*)
                    657:                cpu_type=m68k
                    658:                tm_file=sun2o4.h
1.1.1.3   root      659:                use_collect2=yes
                    660:                header_files=math-68881.h
1.1       root      661:                ;;
                    662:        m68000-hp-hpux*)                # HP 9000 series 300
                    663:                cpu_type=m68k
                    664:                xm_file=xm-hp320.h
                    665:                if [ x$gas = xyes ]
                    666:                then
                    667:                        xmake_file=x-hp320g
                    668:                        tm_file=hp310g.h
                    669:                else
                    670:                        xmake_file=x-hp320
                    671:                        tm_file=hp310.h
                    672:                fi
1.1.1.3   root      673:                broken_install=yes
                    674:                use_collect2=yes
                    675:                header_files=math-68881.h
1.1       root      676:                ;;
                    677:        m68000-hp-bsd*)                 # HP 9000/200 running BSD
                    678:                cpu_type=m68k
                    679:                tm_file=hp2bsd.h
                    680:                xmake_file=x-hp2bsd
1.1.1.3   root      681:                use_collect2=yes
                    682:                header_files=math-68881.h
1.1       root      683:                ;;
                    684:        m68000-att-sysv*)
                    685:                cpu_type=m68k
                    686:                xm_file=xm-3b1.h
                    687:                if [ x$gas = xyes ]
                    688:                then
                    689:                        tm_file=3b1g.h
                    690:                else
                    691:                        tm_file=3b1.h
                    692:                fi
1.1.1.3   root      693:                use_collect2=yes
                    694:                header_files=math-68881.h
1.1       root      695:                ;;
                    696:        m68000-convergent-sysv*)
                    697:                cpu_type=m68k
                    698:                xm_file=xm-3b1.h
                    699:                tm_file=ctix.h
1.1.1.3   root      700:                use_collect2=yes
                    701:                header_files=math-68881.h
1.1       root      702:                ;;
                    703:        ns32k-encore-osf*)              # Encore with OSF/rose
                    704:                tm_file=encrose.h
                    705:                xmake_file=x-encrose
                    706:                tmake_file=t-encrose
1.1.1.3   root      707:                use_collect2=yes
1.1       root      708:                ;;
                    709:        ns32k-sequent-bsd*)
                    710:                tm_file=sequent.h
1.1.1.3   root      711:                use_collect2=yes
1.1       root      712:                ;;
                    713:        ns32k-encore-bsd*)
                    714:                tm_file=encore.h
1.1.1.3   root      715:                use_collect2=yes
1.1       root      716:                ;;
1.1.1.3   root      717: # This has not been updated to GCC 2.
                    718: #      ns32k-ns-genix*)
                    719: #              xm_file=xm-genix.h
                    720: #              xmake_file=x-genix
                    721: #              tm_file=genix.h
1.1.1.4 ! root      722: #              broken_install=yes
1.1.1.3   root      723: #              use_collect2=yes
                    724: #              ;;
1.1       root      725:        ns32k-merlin-*)
                    726:                tm_file=merlin.h
1.1.1.3   root      727:                use_collect2=yes
1.1       root      728:                ;;
1.1.1.4 ! root      729:        ns32k-tek6100-bsd*)
        !           730:                tm_file=tek6100.h
        !           731:                broken_install=yes
        !           732:                use_collect2=yes
        !           733:                ;;
        !           734:        ns32k-tek6200-bsd*)
        !           735:                tm_file=tek6200.h
        !           736:                broken_install=yes
        !           737:                use_collect2=yes
        !           738:                ;;
1.1.1.2   root      739:        ns32k-pc532-mach*)
                    740:                tm_file=pc532-mach.h
1.1.1.3   root      741:                use_collect2=yes
1.1.1.2   root      742:                ;;
                    743:        ns32k-pc532-minix*)
                    744:                tm_file=pc532-min.h
                    745:                xm_file=xm-pc532-min.h
1.1.1.3   root      746:                use_collect2=yes
1.1.1.2   root      747:                ;;
1.1       root      748:        m88k-*-luna*)
                    749:                tm_file=m88kluna.h
                    750:                tmake_file=t-m88kluna
                    751:                ;;
                    752:        m88k-dg-dgux*)
                    753:                tm_file=m88kdgux.h
1.1.1.3   root      754:                xmake_file=x-m88kdgux
1.1.1.4 ! root      755:                broken_install=yes
1.1       root      756:                ;;
                    757:        m88k-*-sysv4*)
1.1.1.3   root      758:                tm_file=m88kv4.h
1.1       root      759:                xmake_file=x-m88kv4
                    760:                tmake_file=t-m88kv4
                    761:                ;;
1.1.1.2   root      762:        m88k-dolphin-sysv3*)
                    763:                tm_file=m88kdolph.h
                    764:                xm_file=xm-m88kv3.h
                    765:                xmake_file=x-m88kdolph
                    766:                ;;
1.1       root      767:        m88k-*-sysv3*)
                    768:                tm_file=m88kv3.h
                    769:                xm_file=xm-m88kv3.h
                    770:                ;;
                    771: # This hasn't been upgraded to GCC 2.
                    772: #      fx80-alliant-*)                 # Alliant FX/80
                    773: #              tm_file=fx80.h
                    774: #              ;;
                    775:        arm-*-*)                        # Acorn RISC machine
                    776:                tm_file=arm.h
                    777:                ;;
                    778:        c1-convex-*)                    # Convex C1
                    779:                tm_file=convex1.h
                    780:                cpu_type=convex
1.1.1.3   root      781:                use_collect2=yes
1.1       root      782:                ;;
                    783:        c2-convex-*)                    # Convex C2
                    784:                tm_file=convex2.h
                    785:                cpu_type=convex
1.1.1.3   root      786:                use_collect2=yes
1.1       root      787:                ;;
                    788:        c32-convex-*)
                    789:                tm_file=convex32.h      # Convex C32xx
                    790:                cpu_type=convex
1.1.1.3   root      791:                use_collect2=yes
1.1       root      792:                ;;
                    793:        c34-convex-*)
                    794:                tm_file=convex34.h      # Convex C34xx
                    795:                cpu_type=convex
1.1.1.3   root      796:                use_collect2=yes
1.1       root      797:                ;;
                    798:        c38-convex-*)
                    799:                tm_file=convex38.h      # Convex C38xx
                    800:                cpu_type=convex
1.1.1.3   root      801:                use_collect2=yes
1.1       root      802:                ;;
                    803:        mips-sgi-irix4*)                # Mostly like a MIPS.
1.1.1.4 ! root      804:                if [ x$stabs = xyes ]; then
        !           805:                    tm_file=iris4g.h
        !           806:                else
        !           807:                    tm_file=iris4.h
        !           808:                fi
1.1       root      809:                xm_file=xm-irix4.h
1.1.1.3   root      810:                broken_install=yes
1.1.1.2   root      811:                xmake_file=x-iris
1.1.1.3   root      812:                use_collect2=yes
1.1       root      813:                ;;
1.1.1.3   root      814:        mips-sgi-*)                     # Mostly like a MIPS.
1.1.1.4 ! root      815:                if [ x$stabs = xyes ]; then
        !           816:                    tm_file=irisgdb.h
        !           817:                else
        !           818:                    tm_file=iris.h
        !           819:                fi
1.1       root      820:                xm_file=xm-iris.h
1.1.1.3   root      821:                broken_install=yes
1.1.1.2   root      822:                xmake_file=x-iris
1.1.1.3   root      823:                use_collect2=yes
1.1       root      824:                ;;
                    825:        mips-dec-ultrix*)               # Decstation.
1.1.1.4 ! root      826:                if [ x$stabs = xyes ]; then
        !           827:                    tm_file=decstabs.h
        !           828:                else
        !           829:                    tm_file=decstatn.h
        !           830:                fi
1.1       root      831:                tmake_file=t-decstatn
1.1.1.2   root      832:                xmake_file=x-decstatn
1.1.1.3   root      833:                use_collect2=yes
1.1       root      834:                ;;
1.1.1.3   root      835:        mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
1.1       root      836:                tm_file=decrose.h
                    837:                xmake_file=x-decrose
                    838:                tmake_file=t-decrose
1.1.1.3   root      839:                use_collect2=yes
                    840:                ;;
                    841:        mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
1.1.1.4 ! root      842:                if [ x$stabs = xyes ]; then
        !           843:                    tm_file=dec-gosf1.h
        !           844:                else
        !           845:                    tm_file=dec-osf1.h
        !           846:                fi
        !           847:                xmake_file=x-dec-osf1
1.1.1.3   root      848:                tmake_file=t-decstatn
                    849:                use_collect2=yes
1.1       root      850:                ;;
1.1.1.4 ! root      851:        mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
        !           852:                if [ x$stabs = xyes ]; then
        !           853:                    tm_file=mips-gnews.h
        !           854:                else
        !           855:                    tm_file=mips-news.h
        !           856:                fi
        !           857:                xm_file=xm-mips.h
1.1.1.3   root      858:                use_collect2=yes
1.1       root      859:                ;;
1.1.1.2   root      860:        mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
                    861:                                        # That is based on svr4.
                    862:                # t-svr4 is not right because this system doesn't use ELF.
1.1.1.4 ! root      863:                if [ x$stabs = xyes ]; then
        !           864:                    tm_file=mips-gn5.h
        !           865:                else
        !           866:                    tm_file=mips-n5.h
        !           867:                fi
1.1.1.2   root      868:                xm_file=xm-mipsnews.h
1.1.1.3   root      869:                use_collect2=yes
1.1.1.2   root      870:                ;;
1.1.1.4 ! root      871:        mips-*riscos[56789]bsd* | mips-*riscos[56789]-bsd*)
        !           872:                if [ x$stabs = xyes ]; then     # MIPS BSD 4.3, RISC-OS 5.0
        !           873:                    tm_file=mips-5gbsd.h
        !           874:                else
        !           875:                    tm_file=mips-5bsd.h
        !           876:                fi
        !           877:                use_collect2=yes
        !           878:                ;;
        !           879:        mips-*-bsd* | mips-*riscosbsd* | mips-*riscos[1234]bsd* \
        !           880:                | mips-*riscos-bsd* | mips-*riscos[1234]-bsd*)
        !           881:                if [ x$stabs = xyes ]; then     # MIPS BSD 4.3, RISC-OS 4.0
        !           882:                    tm_file=mips-gbsd.h
        !           883:                else
        !           884:                    tm_file=mips-bsd.h
        !           885:                fi
1.1.1.3   root      886:                use_collect2=yes
1.1       root      887:                ;;
1.1.1.4 ! root      888:        mips-*riscos[56789]sysv4* | mips-*riscos[56789]-sysv4*)
        !           889:                if [ x$stabs = xyes ]; then     # MIPS System V.4., RISC-OS 5.0
        !           890:                    tm_file=mips-5gsvr4.h
        !           891:                else
        !           892:                    tm_file=mips-5svr4.h
        !           893:                fi
        !           894:                xm_file=xm-umips.h
        !           895:                xmake_file=x-mipsv
        !           896:                ;;
        !           897:        mips-*-sysv4* | mips-*riscos[1234]sysv4* | mips-*riscossysv4* \
        !           898:                | mips-*riscos[1234]-sysv4* | mips-*riscos-sysv4*)
        !           899:                if [ x$stabs = xyes ]; then     # MIPS System V.4. RISC-OS 4.0
        !           900:                    tm_file=mips-gsvr4.h
        !           901:                else
        !           902:                    tm_file=mips-svr4.h
        !           903:                fi
        !           904:                xm_file=xm-umips.h
        !           905:                xmake_file=x-mipsv
        !           906:                ;;
        !           907:        mips-*riscos[56789]sysv* | mips-*-riscos[56788]-sysv*)
        !           908:                if [ x$stabs = xyes ]; then     # MIPS System V.3, RISC-OS 5.0
        !           909:                    tm_file=mips-5gsysv.h
        !           910:                else
        !           911:                    tm_file=mips-5sysv.h
        !           912:                fi
1.1.1.3   root      913:                xm_file=xm-umips.h
                    914:                xmake_file=x-mipsv
                    915:                use_collect2=yes
                    916:                ;;
1.1.1.4 ! root      917:        mips-*-sysv* | mips-*riscossysv* | mips-*riscos-sysv*)
        !           918:                if [ x$stabs = xyes ]; then     # MIPS System V.3, RISC-OS 4.0
        !           919:                    tm_file=mips-gsysv.h
        !           920:                else
        !           921:                    tm_file=mips-sysv.h
        !           922:                fi
1.1.1.3   root      923:                xm_file=xm-umips.h
                    924:                xmake_file=x-mipsv
                    925:                use_collect2=yes
                    926:                ;;
1.1.1.4 ! root      927:        mips-*riscos[56789]*)                   # Default MIPS RISC-OS 5.0.
        !           928:                if [ x$stabs = xyes ]; then
        !           929:                    tm_file=mips-5gdb.h
        !           930:                else
        !           931:                    tm_file=mips-5.h
        !           932:                fi
        !           933:                use_collect2=yes
        !           934:                ;;
        !           935:        mips-*-*)                               # Default MIPS RISC-OS 4.0.
        !           936:                if [ x$stabs = xyes ]; then
        !           937:                    tm_file=mips-gdb.h
        !           938:                else
        !           939:                    tm_file=mips.h
        !           940:                fi
1.1.1.3   root      941:                use_collect2=yes
                    942:                ;;
                    943:        pyramid-*-*)
                    944:                cpu_type=pyr
                    945:                tm_file=pyr.h
                    946:                use_collect2=yes
                    947:                ;;
1.1       root      948: # This hasn't been upgraded to GCC 2.
1.1.1.3   root      949: #      tron-*-*)
1.1       root      950: #              cpu_type=gmicro
                    951: #              tm_file=gmicro.h
1.1.1.3   root      952: #              use_collect2=yes
1.1       root      953: #              ;;
                    954:        a29k-*-bsd*)
                    955:                tm_file=a29kunix.h
                    956:                xm_file=xm-a29kunix.h
                    957:                xmake_file=x-a29kunix
1.1.1.3   root      958:                use_collect2=yes
                    959:                ;;
                    960:        a29k-*-*)                       # Default a29k environment.
                    961:                use_collect2=yes
1.1       root      962:                ;;
1.1.1.2   root      963:        romp-*-aos*)
1.1       root      964:                xm_file=xm-romp.h
                    965:                tm_file=romp.h
1.1.1.3   root      966:                use_collect2=yes
1.1       root      967:                ;;
                    968:        romp-*-mach*)
                    969:                xm_file=xm-romp.h
                    970:                tm_file=romp.h
                    971:                xmake_file=x-romp-mach
1.1.1.3   root      972:                use_collect2=yes
1.1       root      973:                ;;
1.1.1.3   root      974:        rs6000-*-mach*)
1.1       root      975:                xm_file=xm-rs6k-m.h
                    976:                tm_file=rs6000-mach.h
1.1.1.3   root      977:                xmake_file=x-rs6k-mach
                    978:                use_collect2=yes
1.1       root      979:                ;;
1.1.1.4 ! root      980:        rs6000-ibm-aix32)
        !           981:                xm_file=xm-rs6000.h
        !           982:                tm_file=rs6000-aix32.h
        !           983:                use_collect2=yes
        !           984:                ;;
        !           985:        rs6000-ibm-aix*)
1.1       root      986:                xm_file=xm-rs6000.h
                    987:                tm_file=rs6000.h
1.1.1.3   root      988:                use_collect2=yes
                    989:                ;;
                    990:        hppa1.1-*-bsd*)
                    991:                cpu_type=pa
                    992:                xm_file=xm-pa.h
                    993:                tm_file=pa1.h
1.1.1.4 ! root      994:                xmake_file=x-pa
        !           995:                tmake_file=t-pa
1.1.1.3   root      996:                use_collect2=yes
                    997:                ;;
                    998:        hppa1.0-*-bsd*)
                    999:                cpu_type=pa
                   1000:                xm_file=xm-pa.h
                   1001:                tm_file=pa.h
1.1.1.4 ! root     1002:                xmake_file=x-pa
        !          1003:                tmake_file=t-pa
        !          1004:                use_collect2=yes
        !          1005:                ;;
        !          1006:        hppa1.0-*-hpux7*)
        !          1007:                cpu_type=pa
        !          1008:                xm_file=xm-pahpux.h
        !          1009:                xmake_file=x-pa-hpux
        !          1010:                tmake_file=t-libc-ok
        !          1011:                if [ x$gas = xyes ]
        !          1012:                then
        !          1013:                        tm_file=pa-gux7.h
        !          1014:                else
        !          1015:                        tm_file=pa-hpux7.h
        !          1016:                fi
        !          1017:                broken_install=yes
1.1.1.3   root     1018:                use_collect2=yes
                   1019:                ;;
                   1020:        hppa1.1-*-hpux*)
                   1021:                cpu_type=pa
1.1.1.4 ! root     1022:                xm_file=xm-pahpux.h
1.1.1.3   root     1023:                xmake_file=x-pa-hpux
1.1.1.4 ! root     1024:                tmake_file=t-libc-ok
1.1.1.3   root     1025:                if [ x$gas = xyes ]
                   1026:                then
                   1027:                        tm_file=pa1-ghpux.h
                   1028:                else
                   1029:                        tm_file=pa1-hpux.h
                   1030:                fi
                   1031:                broken_install=yes
                   1032:                use_collect2=yes
1.1       root     1033:                ;;
1.1.1.3   root     1034:        hppa1.0-*-hpux*)
                   1035:                cpu_type=pa
1.1.1.4 ! root     1036:                xm_file=xm-pahpux.h
1.1.1.3   root     1037:                xmake_file=x-pa-hpux
1.1.1.4 ! root     1038:                tmake_file=t-libc-ok
1.1.1.3   root     1039:                if [ x$gas = xyes ]
                   1040:                then
                   1041:                        tm_file=pa-ghpux.h
                   1042:                else
                   1043:                        tm_file=pa-hpux.h
                   1044:                fi
                   1045:                broken_install=yes
                   1046:                use_collect2=yes
                   1047:                ;;
                   1048:        we32k-att-sysv*)
                   1049:                cpu_type=we32k
                   1050:                use_collect2=yes
                   1051:                ;;
1.1.1.4 ! root     1052:        alpha-*-osf*)
        !          1053:                cpu_type=alpha
        !          1054:                broken_install=yes
        !          1055:                use_collect2=yes
        !          1056:                ;;
1.1.1.3   root     1057:        i960-*-*)                       # Default i960 environment.
                   1058:                use_collect2=yes
1.1.1.2   root     1059:                ;;
                   1060:        *)
1.1.1.4 ! root     1061:                echo "Configuration $machine not supported" 1>&2
1.1.1.2   root     1062:                exit 1
                   1063:                ;;
1.1       root     1064:        esac
                   1065: 
                   1066:        case $machine in
                   1067:        *-*-sysv4*)
1.1.1.4 ! root     1068:                fixincludes=fixinc.svr4
1.1       root     1069:                xmake_try_sysv=x-sysv
1.1.1.4 ! root     1070:                broken_install=yes
1.1       root     1071:                ;;
                   1072:        *-*-sysv*)
1.1.1.3   root     1073:                broken_install=yes
                   1074:                ;;
                   1075:        esac
                   1076: 
1.1.1.4 ! root     1077:        # Distinguish i386 from i486.
        !          1078:        case $machine in
        !          1079:        i486-*-*)
        !          1080:                target_cpu_default=2
        !          1081:                ;;
        !          1082:        esac
        !          1083: 
1.1.1.3   root     1084:        # No need for collect2 if we have the GNU linker.
                   1085:        case x$gnu_ld in 
                   1086:        xyes)
                   1087:                use_collect2=
1.1       root     1088:                ;;
                   1089:        esac
                   1090: 
                   1091: # Default certain vars that apply to both host and target in turn.
                   1092:        if [ x$cpu_type = x ]
                   1093:        then cpu_type=`echo $machine | sed 's/-.*$//'`
                   1094:        fi
                   1095: 
1.1.1.4 ! root     1096: # Save data on machine being used to compile GCC in build_xm_file.
1.1       root     1097: # Save data on host machine in vars host_xm_file and host_xmake_file.
                   1098:        if [ x$pass1done = x ]
                   1099:        then
1.1.1.4 ! root     1100:                if [ x$xm_file = x ]; then build_xm_file=xm-$cpu_type.h
        !          1101:                else build_xm_file=$xm_file
1.1       root     1102:                fi
                   1103:                pass1done=yes
1.1.1.4 ! root     1104:        else
        !          1105:                if [ x$pass2done = x ]
        !          1106:                then
        !          1107:                        if [ x$xm_file = x ]; then host_xm_file=xm-$cpu_type.h
        !          1108:                        else host_xm_file=$xm_file
        !          1109:                        fi
        !          1110:                        if [ x$xmake_file = x ]
        !          1111:                        then xmake_file=x-$cpu_type
        !          1112:                        fi
        !          1113:                        host_xmake_file=$xmake_file
        !          1114:                        host_broken_install=$broken_install
        !          1115:                        pass2done=yes
        !          1116:                fi
1.1       root     1117:        fi
                   1118: done
                   1119: 
                   1120: # Default the target-machine variables that were not explicitly set.
                   1121: if [ x$tm_file = x ]
1.1.1.3   root     1122: then tm_file=$cpu_type.h; fi
                   1123: 
                   1124: if [ x$header_files = x ]
                   1125: then header_files=; fi
1.1       root     1126: 
                   1127: if [ x$xm_file = x ]
                   1128: then xm_file=xm-$cpu_type.h; fi
                   1129: 
                   1130: md_file=${cpu_type}.md
                   1131: 
                   1132: if [ x$out_file = x ]
                   1133: then out_file=$cpu_type.c; fi
                   1134: 
                   1135: if [ x$tmake_file = x ]
                   1136: then tmake_file=t-$cpu_type
                   1137: fi
                   1138: 
                   1139: 
                   1140: # Set up the list of links to be made.
                   1141: # $links is the list of link names, and $files is the list of names to link to.
1.1.1.4 ! root     1142: files="$host_xm_file $tm_file $md_file $out_file $xm_file $build_xm_file"
        !          1143: links="config.h tm.h md aux-output.c tconfig.h hconfig.h"
1.1       root     1144: 
                   1145: # Make the links.
                   1146: while [ -n "$files" ]
                   1147: do
                   1148:        # set file to car of files, files to cdr of files
                   1149:        set $files; file=$1; shift; files=$*
                   1150:        set $links; link=$1; shift; links=$*
                   1151: 
                   1152:        if [ ! -r ${srcdir}/config/$file ]
                   1153:        then
                   1154:                echo "$progname: cannot create a link \`$link'," 1>&2
1.1.1.2   root     1155:                echo "since the file \`config/$file' does not exist" 1>&2
1.1       root     1156:                exit 1
                   1157:        fi
                   1158: 
                   1159:        $remove -f $link
                   1160:        rm -f config.status
                   1161:        # Make a symlink if possible, otherwise try a hard link
1.1.1.2   root     1162:        $symbolic_link ${srcdir}/config/$file $link 2>/dev/null || $hard_link ${srcdir}/config/$file $link || $copy ${srcdir}/config/$file $link
1.1       root     1163: 
                   1164:        if [ ! -r $link ]
                   1165:        then
1.1.1.2   root     1166:                echo "$progname: unable to link \`$link' to \`${srcdir}/config/$file'" 1>&2
1.1       root     1167:                exit 1
                   1168:        fi
1.1.1.2   root     1169:        echo "Linked \`$link' to \`${srcdir}/config/$file'"
1.1       root     1170: done
                   1171: 
                   1172: # Create Makefile.tem from Makefile.in.
                   1173: # Make it set VPATH if necessary so that the sources are found.
                   1174: # Also change its value of srcdir.
                   1175: # Also create a .gdbinit file which runs the one in srcdir
                   1176: # and tells GDB to look there for source files.
                   1177: case $srcdir in
                   1178: .)
                   1179:        rm -f Makefile.tem
                   1180:        cp Makefile.in Makefile.tem
                   1181:        chmod +w Makefile.tem
                   1182:        ;;
                   1183: *)
                   1184:        rm -f Makefile.tem
                   1185:        echo "VPATH = ${srcdir}" \
                   1186:          | cat - ${srcdir}/Makefile.in \
                   1187:          | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
                   1188:        rm -f .gdbinit
                   1189:        echo "dir ." > .gdbinit
                   1190:        echo "dir ${srcdir}" >> .gdbinit
                   1191:        echo "source ${srcdir}/.gdbinit" >> .gdbinit
                   1192:        ;;
                   1193: esac
                   1194: 
                   1195: # Conditionalize the makefile for this host machine.
                   1196: if [ -f ${srcdir}/config/${host_xmake_file} ]
                   1197: then
                   1198:        rm -f Makefile.xx
1.1.1.4 ! root     1199:        sed -e "/####host/  r ${srcdir}/config/${host_xmake_file}" Makefile.tem > Makefile.xx
1.1       root     1200:        echo "Merged ${host_xmake_file}."
                   1201:        rm -f Makefile.tem
                   1202:        mv Makefile.xx Makefile.tem
                   1203: else
                   1204: # Say in the makefile that there is no host_xmake_file,
                   1205: # by using a name which (when interpreted relative to $srcdir/config)
                   1206: # will duplicate another dependency: $srcdir/Makefile.in.
                   1207:        host_xmake_file=../Makefile.in
                   1208: fi
                   1209: 
                   1210: # Add a definition for INSTALL if system wants one.
                   1211: # This substitutes for lots of x-* files.
1.1.1.3   root     1212: if [ x$host_broken_install = x ]
                   1213: then true
                   1214: else
                   1215:        rm -f Makefile.xx
1.1.1.4 ! root     1216:        abssrcdir=`cd ${srcdir}; pwd`
        !          1217:        sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
1.1.1.3   root     1218:        rm -f Makefile.tem
                   1219:        mv Makefile.xx Makefile.tem
                   1220: fi
                   1221: 
                   1222: # Set EXTRA_HEADERS according to header_files.
                   1223: # This substitutes for lots of t-* files.
                   1224: if [ x$header_files = x ]
                   1225: then true
                   1226: else
                   1227:        rm -f Makefile.xx
                   1228:        sed "s/^EXTRA_HEADERS =/EXTRA_HEADERS = $header_files/" Makefile.tem > Makefile.xx
                   1229:        rm -f Makefile.tem
                   1230:        mv Makefile.xx Makefile.tem
                   1231: fi
                   1232: 
                   1233: # Add a definition of USE_COLLECT2 if system wants one.
                   1234: # Also tell toplev.c what to do.
                   1235: # This substitutes for lots of t-* files.
                   1236: if [ x$use_collect2 = x ]
1.1       root     1237: then true
                   1238: else
                   1239:        rm -f Makefile.xx
1.1.1.3   root     1240:        (echo "USE_COLLECT2 = ld"; echo "MAYBE_USE_COLLECT2 = -DUSE_COLLECT2")\
                   1241:           | cat - Makefile.tem > Makefile.xx
1.1       root     1242:        rm -f Makefile.tem
                   1243:        mv Makefile.xx Makefile.tem
                   1244: fi
                   1245: 
1.1.1.4 ! root     1246: # Add -DTARGET_CPU_DEFAULT for toplev.c if system wants one.
        !          1247: # This substitutes for lots of *.h files.
        !          1248: if [ x$target_cpu_default = x ]
        !          1249: then true
        !          1250: else
        !          1251:        rm -f Makefile.xx
        !          1252:        (echo "MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFAULT=$target_cpu_default")\
        !          1253:           | cat - Makefile.tem > Makefile.xx
        !          1254:        rm -f Makefile.tem
        !          1255:        mv Makefile.xx Makefile.tem
        !          1256: fi
        !          1257: 
1.1       root     1258: # Conditionalize the makefile for this target machine.
                   1259: if [ -f ${srcdir}/config/${tmake_file} ]
                   1260: then
                   1261:        rm -f Makefile.xx
1.1.1.4 ! root     1262:        sed -e "/####target/  r ${srcdir}/config/${tmake_file}" Makefile.tem > Makefile.xx
1.1       root     1263:        echo "Merged ${tmake_file}."
                   1264:        rm -f Makefile.tem
                   1265:        mv Makefile.xx Makefile.tem
                   1266: else
                   1267: # Say in the makefile that there is no tmake_file,
                   1268: # by using a name which (when interpreted relative to $srcdir/config)
                   1269: # will duplicate another dependency: $srcdir/Makefile.in.
                   1270:        tmake_file=../Makefile.in
                   1271: fi
                   1272: 
                   1273: # Remove all formfeeds, since some Makes get confused by them.
1.1.1.4 ! root     1274: # Also arrange to give the variables `target', `host_xmake_file',
        !          1275: # `tmake_file', `prefix', `exec_prefix' and `FIXINCLUDES'
        !          1276: # values in the Makefile from the values they have in this script.
1.1       root     1277: rm -f Makefile.xx
                   1278: sed -e "s///" -e "s/^target=.*$/target=${target}/" \
                   1279:     -e "s|^xmake_file=.*$|xmake_file=${host_xmake_file}|" \
                   1280:     -e "s|^tmake_file=.*$|tmake_file=${tmake_file}|" \
1.1.1.4 ! root     1281:     -e "s|^prefix[     ]*=.*|prefix = $prefix|" \
        !          1282:     -e "s|^exec_prefix[        ]*=.*|exec_prefix = $exec_prefix|" \
        !          1283:     -e "s|^FIXINCLUDES[        ]*=.*|FIXINCLUDES = $fixincludes|" \
1.1       root     1284:     Makefile.tem > Makefile.xx
                   1285: rm -f Makefile.tem
                   1286: mv Makefile.xx Makefile.tem
                   1287: 
                   1288: # Install Makefile for real, after making final changes.
                   1289: # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
                   1290: # Also use all.cross instead of all.internal, and add cross-make to Makefile.
                   1291: if [ x$host = x$target ]
                   1292: then
                   1293:        rm -f Makefile
1.1.1.4 ! root     1294:        if [ x$host = x$build ]
        !          1295:        then
        !          1296:                mv Makefile.tem Makefile
        !          1297:        else
        !          1298: #              When build gcc with cross-compiler, we need to fix a
        !          1299: #              few things.
        !          1300:                echo "build= $build" > Makefile
        !          1301:                sed -e "/####build/  r ${srcdir}/build-make" Makefile.tem >> Makefile
        !          1302:                rm -f Makefile.tem Makefile.xx
        !          1303:        fi
1.1       root     1304: else
                   1305:        rm -f Makefile
                   1306:        echo "CROSS=-DCROSS_COMPILE" > Makefile
1.1.1.4 ! root     1307:        sed -e "/####cross/  r ${srcdir}/cross-make" Makefile.tem >> Makefile
1.1       root     1308:        rm -f Makefile.tem Makefile.xx
                   1309: fi
                   1310: 
                   1311: echo "Created \`Makefile'."
                   1312: 
                   1313: if [ xx${vint} != xx ]
                   1314: then
1.1.1.4 ! root     1315:        vintmsg=" (vint)"
1.1       root     1316: fi
                   1317: 
                   1318: # Describe the chosen configuration in config.status.
                   1319: # Make that file a shellscript which will reestablish the same configuration.
                   1320: echo "#!/bin/sh
                   1321: # GCC was configured as follows:
                   1322: ${srcdir}/configure" $arguments > config.status
1.1.1.4 ! root     1323: echo echo host=$canon_host target=$canon_target build=$canon_build >> config.status
1.1       root     1324: chmod a+x config.status
                   1325: 
1.1.1.4 ! root     1326: if [ x$canon_host = x$canon_target ]
1.1       root     1327: then
1.1.1.4 ! root     1328:        echo "Links are now set up for target $canon_target."
1.1       root     1329: else
1.1.1.4 ! root     1330:        echo "Links are now set up for host $canon_host and target $canon_target."
1.1       root     1331: fi
                   1332: 
                   1333: exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.