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