Annotation of gcc/configure, revision 1.1.1.2

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: #
                     25: # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] TARGET
                     26: #
                     27: # If configure succeeds, it leaves its status in config.status.
                     28: # If configure fails after disturbing the status quo, 
                     29: #      config.status is removed.
                     30: #
                     31: 
                     32: progname=$0
                     33: 
                     34: # Default --srcdir to the directory where the script is found, 
                     35: # if a directory was specified.
                     36: srcdir=`echo $0 | sed 's|/[^/]*$||'`
                     37: if [ x$srcdir = x$0 ]
                     38: then
                     39: srcdir=
                     40: fi
                     41: 
                     42: remove=rm
                     43: hard_link=ln
                     44: symbolic_link='ln -s'
1.1.1.2 ! root       45: copy=cp
1.1       root       46: 
                     47: # Record all the arguments, to write them in config.status.
                     48: arguments=$*
                     49: 
                     50: #for Test
                     51: #remove="echo rm"
                     52: #hard_link="echo ln"
                     53: #symbolic_link="echo ln -s"
                     54: 
                     55: for arg in $*;
                     56: do
                     57: # Handle -srcdir, etc, with space between it and argument.
                     58:   if [ x$next_srcdir = xyes ]
                     59:   then srcdir=$arg; next_srcdir=;
                     60: # Handle -host, etc, with space between it and argument.
                     61:   else if [ x$next_host = xyes ]
                     62:   then host=$arg; next_host=;
                     63:   else if [ x$next_target = xyes ]
                     64:   then target=$arg; next_target=;
                     65:   else 
                     66:     case $arg in
                     67:      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
                     68:        srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
                     69:        ;;
                     70:      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
                     71:        next_srcdir=yes
                     72:        ;;
                     73:      -host | --host | --hos | --ho | --h)
                     74:        next_host=yes
                     75:        ;;
                     76:      -host=* | --host=* | --hos=* | --ho=* | --h=*)
                     77:        host=`echo $arg | sed 's/-*h[a-z]*=//'`
                     78:        ;; 
                     79:      -target | --target | --targe | --targ | --tar | --ta | --t)
                     80:        next_target=yes
                     81:        ;;
                     82:      -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
                     83:        target=`echo $arg | sed 's/-*t[a-z]*=//'`
                     84:        ;; 
                     85:      -gas | --gas | --ga | --g)
                     86:         gas=yes
                     87:        ;;
                     88:      -nfp | --nfp | --nf | --n)
                     89:        nfp=yes
                     90:        ;;
1.1.1.2 ! root       91:      -x | --x) ;; # ignored
1.1       root       92:      *)
                     93: # Allow configure HOST TARGET
                     94:        if [ x$host = x ]
                     95:        then
                     96:                host=$target
                     97:        fi
                     98:        target=$arg
                     99:        ;;
                    100:     esac
1.1.1.2 ! root      101:   fi; fi; fi
1.1       root      102: done
                    103: 
                    104: # Find the source files, if location was not specified.
                    105: if [ x$srcdir = x ]
                    106: then
                    107:        srcdirdefaulted=1
                    108:        srcdir=.
                    109:        if [ ! -r tree.c ]
                    110:        then
                    111:                srcdir=..
                    112:        fi
                    113: fi
                    114: 
                    115: if [ ! -r ${srcdir}/tree.c ]
                    116: then
                    117:        if [ x$srcdirdefaulted = x ]
                    118:        then
1.1.1.2 ! root      119:          echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2
1.1       root      120:        else
1.1.1.2 ! root      121:          echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2
1.1       root      122:        fi
                    123:        exit 1
                    124: fi
                    125: 
1.1.1.2 ! root      126: if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
        !           127: then
        !           128:        echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
        !           129:        exit 1
1.1       root      130: fi
                    131: 
                    132: # Complain if an arg is missing
                    133: if [ x$target = x ]
                    134: then
1.1.1.2 ! root      135:        echo "No target specified." 1>&2
        !           136:        echo "Usage: $progname [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] TARGET" 1>&2
        !           137:        echo -n "Where HOST and TARGET are something like " 1>&2
        !           138:        echo "\`vax', \`sun3', \`encore', etc." 1>&2
1.1       root      139:        if [ -r config.status ]
                    140:        then
1.1.1.2 ! root      141:                cat config.status 1>&2
1.1       root      142:        fi
                    143:        exit 1
                    144: fi
                    145: 
                    146: # Default other arg
                    147: if [ x$host = x ]
                    148: then
                    149:        host=$target
                    150: fi
                    151: 
                    152: # Decode the host machine, then the target machine.
                    153: # For the host machine, we save the xm_file variable as host_xm_file;
                    154: # then we decode the target machine and forget everything else
                    155: # that came from the host machine.
                    156: for machine in $host $target; do
                    157: 
                    158:        # Validate the spec, and canonicalize it.
                    159:        machine=`$srcdir/config.sub $machine` || exit 1
                    160: 
                    161:        cpu_type=
                    162:        xm_file=
                    163:        tm_file=
                    164:        xmake_file=
                    165:        tmake_file=
                    166: 
                    167:        case $machine in
                    168:        # Support site-specific machine types.
                    169:        *local*)
                    170:                cpu_type=$machine
                    171:                xm_file=xm-$machine.h
                    172:                tm_file=$machine.h
                    173:                if [ -f $srcdir/config/x-$machine ] ; \
                    174:                then xmake_file=x-$machine; \
                    175:                else true; \
                    176:                fi
                    177:                if [ -f $srcdir/config/t-$machine ] ; \
                    178:                then tmake_file=t-$machine; \
                    179:                else true; \
                    180:                fi
                    181:                ;;
                    182:        vax-*-bsd*)                     # vaxen running BSD
                    183:                tm_file=vax.h
                    184:                ;;
                    185:        vax-*-ultrix*)                  # vaxen running ultrix
                    186:                tm_file=ultrix.h
                    187:                ;;
                    188:        vax-*-vms*)                     # vaxen running VMS
                    189:                xm_file=xm-vms.h
                    190:                tm_file=vms.h
                    191:                ;;
                    192:        vax-*-sysv*)                    # vaxen running system V
                    193:                xm_file=xm-vaxv.h
                    194:                tm_file=vaxv.h
                    195:                ;;
                    196: # This hasn't been upgraded to GCC 2.
                    197: #      tahoe-harris-*)                 # Harris tahoe, using COFF.
                    198: #              tm_file=harris.h
                    199: #              ;;
                    200: #      tahoe-*-bsd*)                   # tahoe running BSD
                    201: #              xm_file=xm-tahoe.h
                    202: #              tm_file=tahoe.h
                    203: #              ;;
                    204:        i386-osfrose*)                  # 386 using OSF/rose
                    205:                tm_file=i386rose.h
                    206:                xmake_file=x-i386rose
                    207:                tmake_file=t-i386rose
                    208:                ;;
                    209:        i386-sequent-bsd*)              # 80386 from Sequent
                    210:                xm_file=xm-i386.h
1.1.1.2 ! root      211:                if [ x$gas = xyes ]
        !           212:                then
        !           213:                        tm_file=seq386gas.h
        !           214:                else
        !           215:                        tm_file=seq386.h
        !           216:                fi
        !           217:                ;;
        !           218:        i386-*-bsd)
        !           219:                xm_file=xm-i386.h
        !           220:                tm_file=i386bsd.h
        !           221:                tmake_file=t-libc-ok
1.1       root      222:                ;;
                    223:        i386-*-mach*)
                    224:                xm_file=xm-i386.h
                    225:                tm_file=i386mach.h
                    226:                tmake_file=t-libc-ok
                    227:                ;;
                    228:        i386-*-sco*)                    # 80386 running SCO system
1.1.1.2 ! root      229:                xm_file=xm-i386sco.h
1.1       root      230:                tm_file=i386sco.h
                    231:                xmake_file=x-i386sco
                    232:                tmake_file=t-i386sco
                    233:                ;;
                    234:        i386-*-isc*)                    # 80386 running ISC system
1.1.1.2 ! root      235:                xm_file=xm-i386isc.h
1.1       root      236:                tm_file=i386isc.h
                    237:                xmake_file=x-i386isc
1.1.1.2 ! root      238:                tmake_file=t-i386isc
1.1       root      239:                ;;
                    240:        i386-ibm-aix*)                  # IBM PS/2 running AIX
                    241:                tm_file=aix386.h
                    242:                xm_file=xm-aix386.h
                    243:                xmake_file=x-aix386
                    244:                ;;
                    245:        i386-sun-sunos*)                # Sun i386 roadrunner
                    246:                xm_file=xm-i386sun.h
                    247:                tm_file=i386sun.h
                    248:                ;;
                    249:        i386-*-sysv4*)                  # Intel 80386's running system V.4
                    250:                xm_file=xm-i38v4.h
                    251:                xmake_file=x-i386v4
                    252:                tm_file=i386v4.h
                    253:                tmake_file=t-svr4
                    254:                ;;
                    255:        i386-*-sysv*)                   # Intel 80386's running system V
                    256:                xm_file=xm-i386v.h
                    257:                xmake_file=x-i386v
                    258:                tmake_file=t-svr3
                    259:                if [ x$gas = xyes ]
                    260:                then
                    261:                        tm_file=i386gas.h
                    262:                else
                    263:                        tm_file=i386v.h
                    264:                fi
                    265:                ;;
                    266:        i486-*-sysv4*)                  # Intel 80486's running system V.4
                    267:                cpu_type=i386
                    268:                xm_file=xm-i38v4.h
                    269:                xmake_file=x-i386v4
                    270:                tm_file=i486v4.h
                    271:                tmake_file=t-svr4
                    272:                ;;
                    273:        i860-*-sysv3*)
                    274:                xm_file=xm-i86v3.h
                    275:                xmake_file=x-i860v3
                    276:                tm_file=i860v3.h
                    277:                tmake_file=t-svr3
                    278:                ;;
                    279:        i860-*-sysv4*)
                    280:                xm_file=xm-i86v4.h
                    281:                xmake_file=x-i860v4
                    282:                tm_file=i860v4.h
                    283:                tmake_file=t-svr4
                    284:                ;;
                    285:        i860-alliant-*)         # Alliant FX/2800
                    286:                xm_file=xm-i86v4.h
                    287:                xmake_file=x-i860v4
                    288:                tm_file=fx2800.h
                    289:                tmake_file=t-svr4
                    290:                ;;
                    291:        i860-*-bsd*)
                    292:                if [ x$gas = xyes ]
                    293:                then
                    294:                        tm_file=i860bg.h
                    295:                else
                    296:                        tm_file=i860b.h
                    297:                fi
                    298:                ;;
1.1.1.2 ! root      299:        sparc-tti-*)
1.1       root      300:                tm_file=pbd.h
                    301:                xm_file=xm-pbd.h
                    302:                ;;
                    303:        sparc-*-sunos4*)
                    304:                tm_file=sparc.h
                    305:                ;;
                    306:        sparc-*-sunos3*)
                    307:                tm_file=sun4o3.h
                    308:                ;;
                    309:        sparc-*-sysv4*)
1.1.1.2 ! root      310:                xm_file=xm-sparcv4.h
        !           311:                tm_file=sparcv4.h
1.1       root      312:                tmake_file=t-svr4
1.1.1.2 ! root      313:                xmake_file=x-sparcv4
1.1       root      314:                ;;
                    315:        m68k-*-amix*)           # Commodore variant of V.4.
                    316:                tm_file=amix.h
                    317:                xm_file=xm-amix.h
                    318:                xmake_file=x-amix
                    319:                tmake_file=t-svr4
                    320:                ;;
                    321:        m68k-*-sysv4*)                  # Motorola m68k's running system V.4
                    322:                tm_file=m68kv4.h
                    323:                xm_file=xm-m68kv4.h
                    324:                xmake_file=x-m68kv4
                    325:                tmake_file=t-svr4
                    326:                ;;
                    327:        m68k-next-*)
                    328:                tm_file=next.h
                    329:                out_file=next.c
                    330:                xm_file=xm-next.h
1.1.1.2 ! root      331:                tmake_file=t-next
1.1       root      332:                ;;
                    333:        m68k-sun-sunos3*)
                    334:                if [ x$nfp = xyes ]
                    335:                then
                    336:                        tm_file=sun3n3.h
                    337:                else
                    338:                        tm_file=sun3o3.h
                    339:                fi
                    340:                ;;
1.1.1.2 ! root      341:        m68k-sun-sunos*)                # For Sunos 4 (the default).
1.1       root      342:                if [ x$nfp = xyes ]
                    343:                then
                    344:                        tm_file=sun3n.h
                    345:                else
                    346:                        tm_file=sun3.h
                    347:                fi
                    348:                ;;
1.1.1.2 ! root      349:        m68k-sun-mach*)
        !           350:                tm_file=sun3mach.h
        !           351:                ;;
        !           352:        m68k-tti-*)
        !           353:                tm_file=pbb.h
        !           354:                xm_file=xm-m68kv.h
        !           355:                ;;
1.1       root      356:        m68k-hp-hpux*)  # HP 9000 series 300
                    357:                xm_file=xm-hp320.h
                    358:                if [ x$gas = xyes ]
                    359:                then
                    360:                        xmake_file=x-hp320g
                    361:                        tm_file=hp320g.h
                    362:                else
                    363:                        xmake_file=x-hp320
                    364:                        tm_file=hp320.h
                    365:                fi
                    366:                ;;
                    367:        m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
                    368:                tm_file=hp3bsd.h
                    369:                ;;
                    370:        m68k-isi-bsd*)
                    371:                if [ x$nfp = xyes ]
                    372:                then
                    373:                        tm_file=isi-nfp.h
                    374:                else
                    375:                        tm_file=isi.h
                    376:                fi
                    377:                ;;
                    378:        m68k-sony-bsd*)
                    379:                xm_file=xm-m68k.h
                    380:                if [ x$gas = xyes ]
                    381:                then
                    382:                        tm_file=newsgas.h
                    383:                else
                    384:                        tm_file=news.h
                    385:                fi
                    386:                ;;
                    387:        m68k-altos-sysv*)                  # Altos 3068
                    388:                if [ x$gas = xyes ]
                    389:                then
                    390:                        xm_file=xm-altos3068.h
                    391:                        tm_file=altos3068.h
                    392:                else
                    393:                        echo "The Altos is supported only with the GNU assembler" 1>&2
                    394:                        exit 1
                    395:                fi
                    396:                ;;
                    397:        m68k-motorola-sysv*)
                    398:                tm_file=mot3300.h
                    399:                xm_file=xm-mot3300.h
                    400:                ;;
                    401:        m68k-crds-unos)
                    402:                xm_file=xm-crds.h
                    403:                xmake_file=x-crds
                    404:                tm_file=crds.h
                    405:                install_with_cp=yes
                    406:                ;;
                    407:        m68k-apollo-*)
                    408:                xmake_file=x-apollo68
                    409:                tm_file=apollo68.h
                    410:                ;;
                    411:        m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
                    412:                tm_file=tower-as.h
                    413:                xm_file=xm-tower.h
                    414:                ;;
                    415:        m68000-sun-sunos3*)
                    416:                cpu_type=m68k
                    417:                tm_file=sun2.h
                    418:                ;;
                    419:        m68000-sun-sunos4*)
                    420:                cpu_type=m68k
                    421:                tm_file=sun2o4.h
                    422:                ;;
                    423:        m68000-hp-hpux*)                # HP 9000 series 300
                    424:                cpu_type=m68k
                    425:                xm_file=xm-hp320.h
                    426:                if [ x$gas = xyes ]
                    427:                then
                    428:                        xmake_file=x-hp320g
                    429:                        tm_file=hp310g.h
                    430:                else
                    431:                        xmake_file=x-hp320
                    432:                        tm_file=hp310.h
                    433:                fi
                    434:                ;;
                    435:        m68000-hp-bsd*)                 # HP 9000/200 running BSD
                    436:                cpu_type=m68k
                    437:                tm_file=hp2bsd.h
                    438:                xmake_file=x-hp2bsd
                    439:                ;;
                    440:        m68000-att-sysv*)
                    441:                cpu_type=m68k
                    442:                xm_file=xm-3b1.h
                    443:                if [ x$gas = xyes ]
                    444:                then
                    445:                        tm_file=3b1g.h
                    446:                else
                    447:                        tm_file=3b1.h
                    448:                fi
                    449:                ;;
                    450:        m68000-convergent-sysv*)
                    451:                cpu_type=m68k
                    452:                xm_file=xm-3b1.h
                    453:                tm_file=ctix.h
                    454:                ;;
                    455:        ns32k-encore-osf*)              # Encore with OSF/rose
                    456:                tm_file=encrose.h
                    457:                xmake_file=x-encrose
                    458:                tmake_file=t-encrose
                    459:                ;;
                    460:        ns32k-sequent-bsd*)
                    461:                tm_file=sequent.h
                    462:                ;;
                    463:        ns32k-encore-bsd*)
                    464:                tm_file=encore.h
                    465:                ;;
                    466:        ns32k-ns-genix*)
                    467:                xm_file=xm-genix.h
                    468:                xmake_file=x-genix
                    469:                tm_file=genix.h
                    470:                ;;
                    471:        ns32k-merlin-*)
                    472:                tm_file=merlin.h
                    473:                ;;
1.1.1.2 ! root      474:        ns32k-pc532-mach*)
        !           475:                tm_file=pc532-mach.h
        !           476:                ;;
        !           477:        ns32k-pc532-minix*)
        !           478:                tm_file=pc532-min.h
        !           479:                xm_file=xm-pc532-min.h
        !           480:                ;;
1.1       root      481:        m88k-*-luna*)
                    482:                tm_file=m88kluna.h
                    483:                xmake_file=x-m88kluna
                    484:                tmake_file=t-m88kluna
                    485:                ;;
                    486:        m88k-dg-dgux*)
                    487:                xmake_file=x-m88kdgux
                    488:                tmake_file=t-m88k
                    489:                tm_file=m88kdgux.h
                    490:                ;;
                    491:        m88k-*-sysv4*)
                    492:                xmake_file=x-m88kv4
                    493:                tmake_file=t-m88kv4
                    494:                tm_file=m88kv4.h
                    495:                ;;
1.1.1.2 ! root      496:        m88k-dolphin-sysv3*)
        !           497:                tm_file=m88kdolph.h
        !           498:                xm_file=xm-m88kv3.h
        !           499:                xmake_file=x-m88kdolph
        !           500:                ;;
1.1       root      501:        m88k-*-sysv3*)
                    502:                tm_file=m88kv3.h
                    503:                xm_file=xm-m88kv3.h
                    504:                ;;
                    505: # This hasn't been upgraded to GCC 2.
                    506: #      fx80-alliant-*)                 # Alliant FX/80
                    507: #              tm_file=fx80.h
                    508: #              ;;
                    509:        arm-*-*)                        # Acorn RISC machine
                    510:                tm_file=arm.h
                    511:                ;;
                    512:        c1-convex-*)                    # Convex C1
                    513:                tm_file=convex1.h
                    514:                cpu_type=convex
                    515:                ;;
                    516:        c2-convex-*)                    # Convex C2
                    517:                tm_file=convex2.h
                    518:                cpu_type=convex
                    519:                ;;
                    520:        c32-convex-*)
                    521:                tm_file=convex32.h      # Convex C32xx
                    522:                cpu_type=convex
                    523:                ;;
                    524:        c34-convex-*)
                    525:                tm_file=convex34.h      # Convex C34xx
                    526:                cpu_type=convex
                    527:                ;;
                    528:        c38-convex-*)
                    529:                tm_file=convex38.h      # Convex C38xx
                    530:                cpu_type=convex
                    531:                ;;
                    532:        mips-sgi-irix4*)                # Mostly like a MIPS.
                    533:                tm_file=iris.h
                    534:                xm_file=xm-irix4.h
                    535:                install_with_cp=yes
1.1.1.2 ! root      536:                xmake_file=x-iris
1.1       root      537:                ;;
1.1.1.2 ! root      538:        mips-sgi*)                      # Mostly like a MIPS.
1.1       root      539:                tm_file=iris.h
                    540:                xm_file=xm-iris.h
                    541:                install_with_cp=yes
1.1.1.2 ! root      542:                xmake_file=x-iris
        !           543:                ;;
        !           544:        mips-*-sysv4*)                  # MIPS System V.4.
        !           545:                tm_file=mips-svr4.h
        !           546:                xm_file=xm-umips.h
        !           547:                xmake_file=x-mipsv
1.1       root      548:                ;;
1.1.1.2 ! root      549:        mips-*-sysv*)                   # MIPS System V.
1.1       root      550:                tm_file=mips-sysv.h
                    551:                xm_file=xm-umips.h
1.1.1.2 ! root      552:                xmake_file=x-mipsv
1.1       root      553:                ;;
                    554:        mips-mips-*)                    # Default MIPS environment.
                    555:                tm_file=mips.h
                    556:                ;;
                    557:        mips-dec-ultrix*)               # Decstation.
                    558:                tm_file=decstatn.h
                    559:                tmake_file=t-decstatn
1.1.1.2 ! root      560:                xmake_file=x-decstatn
1.1       root      561:                ;;
1.1.1.2 ! root      562:        mips-dec-osf*)                  # Decstation running OSF/1 reference port with OSF/rose.
1.1       root      563:                tm_file=decrose.h
                    564:                xmake_file=x-decrose
                    565:                tmake_file=t-decrose
                    566:                ;;
1.1.1.2 ! root      567:        mips-sony-bsd*)                 # Sony NEWS 3600 or risc/news.
1.1       root      568:                tm_file=mips-news.h
                    569:                ;;
1.1.1.2 ! root      570:        mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
        !           571:                                        # That is based on svr4.
        !           572:                # t-svr4 is not right because this system doesn't use ELF.
        !           573:                tm_file=mips-news5.h
        !           574:                xm_file=xm-mipsnews.h
        !           575:                ;;
        !           576:        mips-*-bsd*)                    # BSD 4.3 variant of MIPS system.
1.1       root      577:                tm_file=mips-bsd.h
                    578:                ;;
1.1.1.2 ! root      579: # This port has been upgraded and is almost working.
        !           580: # Turn it back on if you would like to help debug it.
1.1       root      581: #      pyramid | pyramid-* | pyramid-*)
                    582: #              cpu_type=pyr
                    583: #              tm_file=pyr.h
                    584: #              ;;
                    585: # This hasn't been upgraded to GCC 2.
                    586: #      tron | tron-*)
                    587: #              cpu_type=gmicro
                    588: #              tm_file=gmicro.h
                    589: #              ;;
                    590:        a29k-*-bsd*)
                    591:                tm_file=a29kunix.h
                    592:                xm_file=xm-a29kunix.h
                    593:                xmake_file=x-a29kunix
                    594:                ;;
1.1.1.2 ! root      595:        romp-*-aos*)
1.1       root      596:                xm_file=xm-romp.h
                    597:                tm_file=romp.h
                    598:                ;;
                    599:        romp-*-mach*)
                    600:                xm_file=xm-romp.h
                    601:                tm_file=romp.h
                    602:                xmake_file=x-romp-mach
                    603:                ;;
                    604:        rs6000-*-mach* | rs6000-mach*)
                    605:                xm_file=xm-rs6k-m.h
                    606:                tm_file=rs6000-mach.h
1.1.1.2 ! root      607:                tmake_file=t-rs6000
1.1       root      608:                ;;
                    609:        rs6000-*)
                    610:                xm_file=xm-rs6000.h
                    611:                tm_file=rs6000.h
1.1.1.2 ! root      612:                tmake_file=t-rs6000
1.1       root      613:                ;;
1.1.1.2 ! root      614:        hp800-*-bsd* | hp700-*-bsd*)
1.1       root      615:                cpu_type=hp800
                    616:                xm_file=xm-hp800.h
                    617:                tm_file=hp800.h
                    618:                ;;
1.1.1.2 ! root      619:        hp800-*-hpux* | hp700-*-hpux*)
        !           620:                cpu_type=hp800
        !           621:                xm_file=xm-hp800.h
        !           622:                tm_file=hp800hpux.h
        !           623:                xmake_file=x-hp800hpux
        !           624:                ;;
        !           625:        *)
        !           626:                echo "Configuration $machine not recognized" 1>&2
        !           627:                exit 1
        !           628:                ;;
1.1       root      629:        esac
                    630: 
                    631:        case $machine in
                    632:        *-*-sysv4*)
                    633:                
                    634:                xmake_try_sysv=x-sysv
                    635:                ;;
                    636:        *-*-sysv*)
                    637:                install_with_cp=yes
                    638:                ;;
                    639:        esac
                    640: 
                    641: # Default certain vars that apply to both host and target in turn.
                    642:        if [ x$cpu_type = x ]
                    643:        then cpu_type=`echo $machine | sed 's/-.*$//'`
                    644:        fi
                    645: 
                    646: # Save data on host machine in vars host_xm_file and host_xmake_file.
                    647:        if [ x$pass1done = x ]
                    648:        then
                    649:                if [ x$xm_file = x ]; then host_xm_file=xm-$cpu_type.h
                    650:                else host_xm_file=$xm_file
                    651:                fi
                    652:                if [ x$xmake_file = x ]
                    653:                then xmake_file=x-$cpu_type
                    654:                fi
                    655:                host_xmake_file=$xmake_file
                    656:                host_install_with_cp=$install_with_cp
                    657:                pass1done=yes
                    658:        fi
                    659: done
                    660: 
                    661: # Default the target-machine variables that were not explicitly set.
                    662: if [ x$tm_file = x ]
                    663: then tm_file=$target.h; fi
                    664: 
                    665: if [ x$xm_file = x ]
                    666: then xm_file=xm-$cpu_type.h; fi
                    667: 
                    668: md_file=${cpu_type}.md
                    669: 
                    670: if [ x$out_file = x ]
                    671: then out_file=$cpu_type.c; fi
                    672: 
                    673: if [ x$tmake_file = x ]
                    674: then tmake_file=t-$cpu_type
                    675: fi
                    676: 
                    677: 
                    678: # Set up the list of links to be made.
                    679: # $links is the list of link names, and $files is the list of names to link to.
                    680: files="$host_xm_file $tm_file $md_file $out_file $xm_file"
                    681: links="config.h tm.h md aux-output.c tconfig.h"
                    682: 
                    683: # Make the links.
                    684: while [ -n "$files" ]
                    685: do
                    686:        # set file to car of files, files to cdr of files
                    687:        set $files; file=$1; shift; files=$*
                    688:        set $links; link=$1; shift; links=$*
                    689: 
                    690:        if [ ! -r ${srcdir}/config/$file ]
                    691:        then
                    692:                echo "$progname: cannot create a link \`$link'," 1>&2
1.1.1.2 ! root      693:                echo "since the file \`config/$file' does not exist" 1>&2
1.1       root      694:                exit 1
                    695:        fi
                    696: 
                    697:        $remove -f $link
                    698:        rm -f config.status
                    699:        # Make a symlink if possible, otherwise try a hard link
1.1.1.2 ! root      700:        $symbolic_link ${srcdir}/config/$file $link 2>/dev/null || $hard_link ${srcdir}/config/$file $link || $copy ${srcdir}/config/$file $link
1.1       root      701: 
                    702:        if [ ! -r $link ]
                    703:        then
1.1.1.2 ! root      704:                echo "$progname: unable to link \`$link' to \`${srcdir}/config/$file'" 1>&2
1.1       root      705:                exit 1
                    706:        fi
1.1.1.2 ! root      707:        echo "Linked \`$link' to \`${srcdir}/config/$file'"
1.1       root      708: done
                    709: 
                    710: # Create Makefile.tem from Makefile.in.
                    711: # Make it set VPATH if necessary so that the sources are found.
                    712: # Also change its value of srcdir.
                    713: # Also create a .gdbinit file which runs the one in srcdir
                    714: # and tells GDB to look there for source files.
                    715: case $srcdir in
                    716: .)
                    717:        rm -f Makefile.tem
                    718:        cp Makefile.in Makefile.tem
                    719:        chmod +w Makefile.tem
                    720:        ;;
                    721: *)
                    722:        rm -f Makefile.tem
                    723:        echo "VPATH = ${srcdir}" \
                    724:          | cat - ${srcdir}/Makefile.in \
                    725:          | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
                    726:        rm -f .gdbinit
                    727:        echo "dir ." > .gdbinit
                    728:        echo "dir ${srcdir}" >> .gdbinit
                    729:        echo "source ${srcdir}/.gdbinit" >> .gdbinit
                    730:        ;;
                    731: esac
                    732: 
                    733: # Conditionalize the makefile for this host machine.
                    734: if [ -f ${srcdir}/config/${host_xmake_file} ]
                    735: then
                    736:        rm -f Makefile.xx
                    737:        sed -e "/####/  r ${srcdir}/config/${host_xmake_file}" Makefile.tem > Makefile.xx
                    738:        echo "Merged ${host_xmake_file}."
                    739:        rm -f Makefile.tem
                    740:        mv Makefile.xx Makefile.tem
                    741: else
                    742: # Say in the makefile that there is no host_xmake_file,
                    743: # by using a name which (when interpreted relative to $srcdir/config)
                    744: # will duplicate another dependency: $srcdir/Makefile.in.
                    745:        host_xmake_file=../Makefile.in
                    746: fi
                    747: 
                    748: # Add a definition for INSTALL if system wants one.
                    749: # This substitutes for lots of x-* files.
                    750: if [ x$install_with_cp = x ]
                    751: then true
                    752: else
                    753:        rm -f Makefile.xx
                    754:        echo "INSTALL=cp" | cat - Makefile.tem > Makefile.xx
                    755:        rm -f Makefile.tem
                    756:        mv Makefile.xx Makefile.tem
                    757: fi
                    758: 
                    759: # Conditionalize the makefile for this target machine.
                    760: if [ -f ${srcdir}/config/${tmake_file} ]
                    761: then
                    762:        rm -f Makefile.xx
                    763:        sed -e "/####/  r ${srcdir}/config/${tmake_file}" Makefile.tem > Makefile.xx
                    764:        echo "Merged ${tmake_file}."
                    765:        rm -f Makefile.tem
                    766:        mv Makefile.xx Makefile.tem
                    767: else
                    768: # Say in the makefile that there is no tmake_file,
                    769: # by using a name which (when interpreted relative to $srcdir/config)
                    770: # will duplicate another dependency: $srcdir/Makefile.in.
                    771:        tmake_file=../Makefile.in
                    772: fi
                    773: 
                    774: # Remove all formfeeds, since some Makes get confused by them.
                    775: # Also arrange to give the variables `target' and `host_xmake_file'
                    776: # and `tmake_file' the same values in the Makefile
                    777: # that they have in this script.
                    778: rm -f Makefile.xx
                    779: sed -e "s///" -e "s/^target=.*$/target=${target}/" \
                    780:     -e "s|^xmake_file=.*$|xmake_file=${host_xmake_file}|" \
                    781:     -e "s|^tmake_file=.*$|tmake_file=${tmake_file}|" \
                    782:     Makefile.tem > Makefile.xx
                    783: rm -f Makefile.tem
                    784: mv Makefile.xx Makefile.tem
                    785: 
                    786: # Install Makefile for real, after making final changes.
                    787: # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
                    788: # Also use all.cross instead of all.internal, and add cross-make to Makefile.
                    789: if [ x$host = x$target ]
                    790: then
                    791:        rm -f Makefile
                    792:        mv Makefile.tem Makefile
                    793: else
                    794:        rm -f Makefile
                    795:        echo "CROSS=-DCROSS_COMPILE" > Makefile
                    796:        sed -e "/####/  r ${srcdir}/cross-make" Makefile.tem >> Makefile
                    797:        rm -f Makefile.tem Makefile.xx
                    798: fi
                    799: 
                    800: echo "Created \`Makefile'."
                    801: 
                    802: if [ xx${vint} != xx ]
                    803: then
                    804:        vintmsg =" (vint)"
                    805: fi
                    806: 
                    807: # Describe the chosen configuration in config.status.
                    808: # Make that file a shellscript which will reestablish the same configuration.
                    809: echo "#!/bin/sh
                    810: # GCC was configured as follows:
                    811: ${srcdir}/configure" $arguments > config.status
                    812: chmod a+x config.status
                    813: 
                    814: if [ x$host = x$target ]
                    815: then
                    816:        echo "Links are now set up for target $target."
                    817: else
                    818:        echo "Links are now set up for host $host and target $target."
                    819: fi
                    820: 
                    821: exit 0

unix.superglobalmegacorp.com

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