home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / diffs / binutils-2.5.2.diffs < prev    next >
Encoding:
Text File  |  1995-01-21  |  122.6 KB  |  3,885 lines

  1. diff -rc --new-file binutils-2.5.2/Makefile.in /gnu/src/amiga/binutils-2.5.2/Makefile.in
  2. *** binutils-2.5.2/Makefile.in    Sat Oct 22 03:16:10 1994
  3. --- /gnu/src/amiga/binutils-2.5.2/Makefile.in    Wed Nov 16 06:55:44 1994
  4. ***************
  5. *** 603,609 ****
  6.   # Installation targets.
  7.   
  8.   .PHONY: install uninstall vault-install
  9. ! install: $(INSTALL_TARGET) 
  10.   
  11.   uninstall:
  12.       @echo "the uninstall target is not supported in this tree"
  13. --- 603,613 ----
  14.   # Installation targets.
  15.   
  16.   .PHONY: install uninstall vault-install
  17. ! # AmigaDOS hack - for now we just want to install gas, the other
  18. ! # binutils are untested.
  19. ! #install: $(INSTALL_TARGET) 
  20. ! install: install-gas
  21.   
  22.   uninstall:
  23.       @echo "the uninstall target is not supported in this tree"
  24. diff -rc --new-file binutils-2.5.2/Product-Info /gnu/src/amiga/binutils-2.5.2/Product-Info
  25. *** binutils-2.5.2/Product-Info    Thu Jan  1 00:00:00 1970
  26. --- /gnu/src/amiga/binutils-2.5.2/Product-Info    Fri Nov 18 12:43:19 1994
  27. ***************
  28. *** 0 ****
  29. --- 1,18 ----
  30. + .name
  31. + binutils
  32. + .fullname
  33. + GNU binutils
  34. + .type
  35. + Programmer Tools
  36. + .short
  37. + GNU binary utilities, Amiga source
  38. + .description
  39. + The GNU binary utilities.
  40. + .version
  41. + 2.5.2
  42. + .requirements
  43. + Amiga binaries require the ixemul.library.
  44. + .distribution
  45. + GNU Public License
  46. + .described-by
  47. + Fred Fish (fnf@amigalib.com)
  48. diff -rc --new-file binutils-2.5.2/bfd/Makefile.in /gnu/src/amiga/binutils-2.5.2/bfd/Makefile.in
  49. *** binutils-2.5.2/bfd/Makefile.in    Wed Oct 12 15:57:35 1994
  50. --- /gnu/src/amiga/binutils-2.5.2/bfd/Makefile.in    Thu Nov 10 15:57:49 1994
  51. ***************
  52. *** 118,123 ****
  53. --- 118,124 ----
  54.       aout-ns32k.o \
  55.       aout0.o \
  56.       aout32.o \
  57. +     amigados.o \
  58.       bout.o \
  59.       cf-i386lynx.o \
  60.       cf-m68klynx.o \
  61. ***************
  62. *** 253,259 ****
  63.        i386lynx.c cf-i386lynx.c m68klynx.c cf-m68klynx.c \
  64.        sparclynx.c cf-sparclynx.c aix386-core.c hpux-core.c \
  65.        irix-core.c lynx-core.c osf-core.c hash.c linker.c cofflink.c \
  66. !      ns32knetbsd.c sparcnetbsd.c
  67.   
  68.   HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h \
  69.        coffswap.h ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
  70. --- 254,260 ----
  71.        i386lynx.c cf-i386lynx.c m68klynx.c cf-m68klynx.c \
  72.        sparclynx.c cf-sparclynx.c aix386-core.c hpux-core.c \
  73.        irix-core.c lynx-core.c osf-core.c hash.c linker.c cofflink.c \
  74. !      ns32knetbsd.c sparcnetbsd.c amigados.c
  75.   
  76.   HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h \
  77.        coffswap.h ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
  78. ***************
  79. *** 525,530 ****
  80. --- 526,533 ----
  81.   
  82.   bfd.ps: 
  83.       (cd $(docdir); $(MAKE) bfd.ps $(FLAGS_TO_PASS))
  84. + amigados.o: amigados.c libamiga.h bfd.h
  85.   
  86.   # What appears below is generated by a hacked mkdep using gcc -MM.
  87.   
  88. diff -rc --new-file binutils-2.5.2/bfd/amigados.c /gnu/src/amiga/binutils-2.5.2/bfd/amigados.c
  89. *** binutils-2.5.2/bfd/amigados.c    Thu Jan  1 00:00:00 1970
  90. --- /gnu/src/amiga/binutils-2.5.2/bfd/amigados.c    Mon Nov 21 07:42:25 1994
  91. ***************
  92. *** 0 ****
  93. --- 1,1040 ----
  94. + /* BFD back-end for Commodore-Amiga AmigaDOS binaries.
  95. +    Copyright (C) 1990-1994 Free Software Foundation, Inc.
  96. +    Contributed by Leonard Norrgard.  Partially based on the bout
  97. +    and ieee BFD backends and Markus Wild's tool hunk2gcc.
  98. + This file is part of BFD, the Binary File Descriptor library.
  99. + This program is free software; you can redistribute it and/or modify
  100. + it under the terms of the GNU General Public License as published by
  101. + the Free Software Foundation; either version 2 of the License, or
  102. + (at your option) any later version.
  103. + This program is distributed in the hope that it will be useful,
  104. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  105. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  106. + GNU General Public License for more details.
  107. + You should have received a copy of the GNU General Public License
  108. + along with this program; if not, write to the Free Software
  109. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  110. + /* TODO:
  111. +    - writing of object files
  112. +    - .chipdata, .chipbss
  113. +    - fix fixme:s
  114. +    BFD:
  115. +    - add flag to say if the format allows multiple sections with the
  116. +      same name.  Fix bfd_get_section_by_name() and bfd_make_section()
  117. +      accordingly.
  118. +    - dumpobj.c: the disassembler: use relocation record data to find symbolic
  119. +      names of addresses, when available.  Needs new routine where one can
  120. +      specify the source section of the symbol to be printed as well as some
  121. +      rewrite of the disassemble functions.
  122. +    */
  123. + #include "bfd.h"
  124. + #include "sysdep.h"
  125. + #include "libbfd.h"
  126. + #include "libamiga.h"
  127. + #define GL(x) bfd_get_32 (abfd, (bfd_byte *) (x))
  128. + #define DEBUG_AMIGA 0
  129. + static boolean amiga_digest_file ();
  130. + static boolean amiga_mkobject ();
  131. + reloc_howto_type howto_hunk_reloc8 =
  132. + {
  133. +   HUNK_RELOC8, /* type */
  134. +   0,           /* rightshift */
  135. +   0,           /* size */
  136. +   0,           /* bitsize */
  137. +   true,        /* pc_relative */
  138. +   0,           /* bitpos */
  139. +   complain_overflow_bitfield,  /* complain_on_overflow */
  140. +   0,           /* special_function */
  141. +   "reloc8",    /* textual name */
  142. +   false,       /* partial_inplace? */
  143. +   0x000000ff,  /* src_mask */
  144. +   0x000000ff,  /* dst_mask */
  145. +   true         /* pcrel_offset */
  146. + };
  147. + reloc_howto_type howto_hunk_reloc16 =
  148. + {HUNK_RELOC16,0,0,0,true,0,complain_overflow_bitfield,0,"reloc16",false,0x0000ffff,0x0000ffff,true};
  149. + reloc_howto_type howto_hunk_reloc32 =
  150. + {HUNK_RELOC32,0,0,0,true,0,complain_overflow_bitfield,0,"reloc32",false,0xffffffff,0xffffffff,true};
  151. + reloc_howto_type howto_hunk_drel8 =
  152. + {HUNK_DREL8,0,0,0,false,0,complain_overflow_bitfield,0,"drel8",false,0x000000ff,0x000000ff,true};
  153. + reloc_howto_type howto_hunk_drel16 =
  154. + {HUNK_DREL16,0,0,0,false,0,complain_overflow_bitfield,0,"drel16",false,0x0000ffff,0x0000ffff,true};
  155. + reloc_howto_type howto_hunk_drel32 =
  156. + {HUNK_DREL32,0,0,0,false,0,complain_overflow_bitfield,0,"drel32",false,0xffffffff,0xffffffff,true};
  157. + reloc_howto_type *amiga_howto_array[2][3] =
  158. + {
  159. +   { &howto_hunk_reloc8, &howto_hunk_reloc16, &howto_hunk_reloc32 },
  160. +   { &howto_hunk_drel8, &howto_hunk_drel16, &howto_hunk_drel32 }
  161. + };
  162. + static bfd_target *
  163. + amiga_object_p (abfd)
  164. +      bfd *abfd;
  165. + {
  166. +   char buf[8];
  167. +   unsigned int x;
  168. +   struct stat stat_buffer;
  169. +   /* An Amiga object file must be at least 8 bytes long.  */
  170. +   if (bfd_read ((PTR) buf, 1, 8, abfd) != 8)
  171. +     {
  172. +       bfd_set_error(bfd_error_wrong_format);
  173. +       return 0;
  174. +     }
  175. +   /* Does it look like an Amiga object file?  */
  176. +   x = GL(buf);
  177. +   if ((x != HUNK_UNIT) && (x != HUNK_HEADER))
  178. +     {
  179. +       /* Not an Amiga file.  */
  180. +       bfd_set_error(bfd_error_wrong_format);
  181. +       return 0;
  182. +     }
  183. +   /* So far it seems to be an Amiga file.  Now slurp it
  184. +      in and examine it closer.  */
  185. +   if (-1 == fstat (fileno ((FILE *) abfd->iostream), &stat_buffer))
  186. +     {
  187. +       bfd_set_error(bfd_error_system_call);
  188. +       return 0;
  189. +     }
  190. +   /* Can't fail and return (but must be declared boolean to suit
  191. +      other bfd requirements).  */
  192. +   (void) amiga_mkobject (abfd);
  193. +   AMIGA_DATA(abfd)->symbol_tail_ptr = &AMIGA_DATA(abfd)->external_symbols;
  194. +   AMIGA_DATA(abfd)->first_byte = (unsigned long *) bfd_alloc (abfd, stat_buffer.st_size);
  195. +   bfd_seek (abfd, 0, SEEK_SET);
  196. +   bfd_read (AMIGA_DATA(abfd)->first_byte, 1, stat_buffer.st_size, abfd);
  197. +   AMIGA_DATA(abfd)->file_pointer = AMIGA_DATA(abfd)->first_byte;
  198. +   AMIGA_DATA(abfd)->file_end = (unsigned long *)((unsigned char *)AMIGA_DATA(abfd)->first_byte + stat_buffer.st_size);
  199. +   if (!amiga_digest_file (abfd))
  200. +     {
  201. +       /* Something went wrong.  */
  202. +       return (struct bfd_target *) 0;
  203. +     }
  204. +   /* Set default architecture to m68k:68020.  */
  205. +   abfd->arch_info = bfd_scan_arch ("m68k:68020");
  206. +   return abfd->xvec;
  207. + }
  208. + /* Skip over the hunk length longword + the number of longwords given there.  */
  209. + #define next_hunk(abfd) \
  210. +   { AMIGA_DATA(abfd)->file_pointer += 1 + GL(AMIGA_DATA(abfd)->file_pointer); }
  211. + static asection *
  212. + amiga_get_section_by_hunk_number (abfd, hunk_number)
  213. +      bfd *abfd;
  214. +      unsigned int hunk_number;
  215. + {
  216. +   /* A cache, so we don't have to search the entire list every time.  */
  217. +   static asection *last_reference;
  218. +   asection *p;
  219. +   if (last_reference)
  220. +     if (last_reference->target_index == hunk_number)
  221. +       return last_reference;
  222. +   for (p = abfd->sections; p != NULL; p = p->next)
  223. +     if (p->target_index == hunk_number)
  224. +       {
  225. +     last_reference = p;
  226. +     return p;
  227. +       }
  228. +   BFD_FAIL();
  229. +   return (asection *) 0;
  230. + }
  231. + /* Remember about a symbol found at the current file position.
  232. +    Return number of longwords to advance the file_pointer with.  */
  233. + static unsigned long
  234. + amiga_add_symbol (abfd, hunk_number)
  235. +      bfd *abfd;
  236. +      unsigned int hunk_number;
  237. + {
  238. +   int length;
  239. +   amiga_symbol_type *symbol = bfd_alloc (abfd, sizeof (amiga_symbol_type));
  240. +   if (symbol)
  241. +     {
  242. +       amiga_data_type *amiga_data = AMIGA_DATA(abfd);
  243. +       unsigned long *file_pointer = amiga_data->file_pointer;
  244. +       unsigned char type = GL(file_pointer) >> 24;
  245. +       ++abfd->symcount;
  246. +       *amiga_data->symbol_tail_ptr = symbol;
  247. +       amiga_data->symbol_tail_ptr = &symbol->next;
  248. +       symbol->symbol.the_bfd = abfd;
  249. +       /* The symbol name is not necessarily nul-terminated in the file.
  250. +      So, we move it to start on the length word and put a NUL at the
  251. +      end of it all.  This way, we avoid allocating separate memory for
  252. +      the symbol name, while assuring that the name is nul-terminated.  */
  253. +       length = (GL(file_pointer) & 0xffffff) << 2;
  254. +       strncpy ((char *) file_pointer, (char *) (file_pointer + 1), length);
  255. +       *(((char *)file_pointer) + length) = '\0';
  256. +       symbol->symbol.name = (char *)file_pointer;
  257. +       symbol->symbol.udata = (PTR) NULL;
  258. +       symbol->symbol.flags = ((type == EXT_DEF) || (type == EXT_ABS) || (type==EXT_SYMB))
  259. +                  ? BSF_GLOBAL : BSF_NO_FLAGS;
  260. +       symbol->symbol.value = ((type == EXT_DEF) || (type == EXT_ABS) || (type==EXT_SYMB))
  261. +                  ? (symvalue) GL(file_pointer + 1 + (length>>2)) : 0;
  262. +       symbol->symbol.section = amiga_get_section_by_hunk_number (abfd, hunk_number);
  263. +       symbol->hunk_number = hunk_number;
  264. +       symbol->type = type;
  265. +       symbol->next = 0;
  266. +     }
  267. +   return length >> 2;
  268. + }
  269. + static void
  270. + amiga_add_reloc (abfd, section, offset, symbol_number, howto, target_hunk)
  271. +      bfd *abfd;
  272. +      asection *section;
  273. +      bfd_size_type offset;
  274. +      int symbol_number;
  275. +      reloc_howto_type *howto;
  276. +      unsigned int target_hunk;
  277. + {
  278. +   amiga_reloc_type *reloc;
  279. +   reloc = (amiga_reloc_type *) bfd_alloc (abfd, sizeof (amiga_reloc_type));
  280. +   reloc->next = 0;
  281. +   abfd -> flags |= HAS_RELOC;
  282. +   section -> flags |= SEC_RELOC;
  283. +   ++section->reloc_count;
  284. +   if (amiga_per_section(section)->reloc_tail_ptr)
  285. +     amiga_per_section(section)->reloc_tail_ptr->next = reloc;
  286. +   else
  287. +     section->relocation = (struct reloc_cache_entry *) reloc;
  288. +   amiga_per_section(section)->reloc_tail_ptr = reloc;
  289. +   amiga_per_section(section)->reloc_tail_ptr->next = (amiga_reloc_type *) 0;
  290. +   reloc->relent.address = offset;
  291. +   reloc->relent.addend = 0;
  292. +   reloc->relent.howto = howto;
  293. +   reloc->symbol_number = symbol_number;
  294. +   reloc->target_hunk = target_hunk;
  295. + }
  296. + /* BFD doesn't currently allow multiple sections with the same
  297. +    name, so we try a little harder to get a unique name.  */
  298. + asection *
  299. + amiga_make_unique_section (abfd, name)
  300. +      bfd *abfd;
  301. +      CONST char *name;
  302. + {
  303. +   asection *section;
  304. +   section = bfd_make_section (abfd, name);
  305. +   if (!section)
  306. +     {
  307. +       int i = 1;
  308. +       char *new_name;
  309. +       new_name = bfd_alloc (abfd, strlen(name) + 3);
  310. +       /* We try to come up with an original name (since BFD
  311. +      currently requires all sections to have different names).  */
  312. +       while (!section && (i<=99))
  313. +     {
  314. +       sprintf (new_name, "%s_%u", name, i);
  315. +       section = bfd_make_section (abfd, new_name);
  316. +     }
  317. +       if (!section)
  318. +     {
  319. +       /* Complain about the given name.  */
  320. +       bfd_set_error(bfd_error_bad_value);
  321. +       return 0;
  322. +     }
  323. +     }
  324. +   return section;
  325. + }
  326. + static boolean
  327. + amiga_digest_file (abfd)
  328. +      bfd *abfd;
  329. + {
  330. +   int is_chip;
  331. +   int units = 0;
  332. +   int hunk_number;
  333. +   char *current_name = 0;
  334. +   asection *current_section;
  335. +   amiga_data_type *amiga_data = AMIGA_DATA(abfd);
  336. +   int hunk_type;
  337. +   /* Hunk numbers starts with 0, but we pre-increment the hunk_number when
  338. +      we assign a new one, so this really makes the first hunk number 0.  */
  339. +   hunk_number = -1;
  340. +   while (units < 2)
  341. +     {
  342. +       hunk_type = HUNK_VALUE(GL(amiga_data->file_pointer++));
  343. + #if DEBUG_AMIGA
  344. +       printf ("Processing %s hunk...",
  345. +           hunk_type == HUNK_UNIT ? "HUNK_UNIT" :
  346. +           hunk_type == HUNK_NAME ? "HUNK_NAME" :
  347. +           hunk_type == HUNK_DEBUG ? "HUNK_DEBUG" :
  348. +           hunk_type == HUNK_OVERLAY ? "HUNK_OVERLAY" :
  349. +           hunk_type == HUNK_BREAK ? "HUNK_BREAK" :
  350. +           hunk_type == HUNK_HEADER ? "HUNK_HEADER" :
  351. +           hunk_type == HUNK_CODE ? "HUNK_CODE" :
  352. +           hunk_type == HUNK_DATA ? "HUNK_DATA" :
  353. +           hunk_type == HUNK_BSS ? "HUNK_BSS" :
  354. +           hunk_type == HUNK_RELOC8 ? "HUNK_RELOC8" :
  355. +           hunk_type == HUNK_RELOC16 ? "HUNK_RELOC16" :
  356. +           hunk_type == HUNK_RELOC32 ? "HUNK_RELOC32" :
  357. +           hunk_type == HUNK_DREL8 ? "HUNK_DREL8" :
  358. +           hunk_type == HUNK_DREL16 ? "HUNK_DREL16" :
  359. +           hunk_type == HUNK_DREL32 ? "HUNK_DREL32" :
  360. +           hunk_type == HUNK_SYMBOL ? "HUNK_SYMBOL" :
  361. +           hunk_type == HUNK_EXT ? "HUNK_EXT" :
  362. +           hunk_type == HUNK_END ? "HUNK_END" :
  363. +           hunk_type == HUNK_LIB ? "HUNK_LIB" :
  364. +           hunk_type == HUNK_INDEX ? "HUNK_INDEX" :
  365. +           "*unknown*");
  366. + #endif
  367. +       switch (hunk_type)
  368. +     {
  369. +     case HUNK_UNIT:
  370. +       current_name =
  371. +         (GL(amiga_data->file_pointer) == 0)
  372. +           ? "" : (char *)(amiga_data->file_pointer + 1);
  373. +       /* Allow only one program unit per bfd.  */
  374. +       if (units++)
  375. +         break;
  376. +       /* We always initialize hunk_number to -1, as desribed above.  */
  377. +       hunk_number = -1;
  378. +       next_hunk (abfd);
  379. +       break;
  380. +     case HUNK_NAME:
  381. +       {
  382. +         int length = GL(amiga_data->file_pointer) << 2;
  383. +         /* Change the name to a nul-terminated string.  */
  384. +         strncpy ((char *)amiga_data->file_pointer, (char *)(amiga_data->file_pointer + 1), length);
  385. +         *(((char *) amiga_data->file_pointer) + length) = '\0';
  386. +         current_name = (char *) amiga_data->file_pointer;
  387. +         /* Can't use next_hunk() here, as we wrote over the hunk length
  388. +            that next_hunk() looks at.  */
  389. +         amiga_data->file_pointer += 1 + (length>>2);
  390. +       }
  391. +       break;
  392. +     case HUNK_DEBUG:
  393. +       /* The format for the HUNK_DEBUG, as produced by Amiga GNU C:
  394. +          longwords:
  395. +             |---------------|
  396. +             |  HUNK_DEBUG   |  0x3f1, Amigados imposed
  397. +         |---------------|
  398. +         |      N        |  Size of this hunk in longwords
  399. +         |---------------|
  400. +         | AMIGA_ZMAGIC  |  0413, same as BSD unix ZMAGIC
  401. +         |---------------|
  402. +         |  symtabsize   |  size of the symbol table in bytes
  403. +         |---------------|
  404. +         | stringtabsize |  size of the string table in bytes
  405. +         |---------------|
  406. +         | symtab data   |  symbol table in a.out format,
  407. +         :               :  size is symtabsize.
  408. +         :          .....:
  409. +         |..........|    |
  410. +         |   stringtab   |  string table in a.out format,
  411. +         :     data      :  size is stringtabsize.
  412. +         :               :  (can start on byte boundary,
  413. +         |---------------|   and can be padded at the end).
  414. +       /* Same as BSD unix ZMAGIC, but I don't want to include
  415. +          any BSD files here.  */
  416. + #define    AMIGA_ZMAGIC 0413
  417. +       /* Identifier for the GNU C format for HUNK_DEBUG on the Amiga.  */
  418. +       if (GL(amiga_data->file_pointer + 1) == AMIGA_ZMAGIC)
  419. +         {
  420. +           amiga_data->symtab_size = GL(amiga_data->file_pointer + 2);
  421. +           amiga_data->stringtab_size = GL(amiga_data->file_pointer + 3);
  422. +           adata(abfd).sym_filepos =
  423. +         (file_ptr) ((char *)(amiga_data->file_pointer + 4) - (char *)amiga_data->first_byte);
  424. +           adata(abfd).str_filepos = adata(abfd).sym_filepos
  425. +         + amiga_data->symtab_size;
  426. +         }
  427. +       else
  428. +         fprintf (stderr, "unknown debug hunk type\n");
  429. +       next_hunk (abfd);
  430. +       break;
  431. +     case HUNK_OVERLAY:
  432. +       /* Poor man's virtual memory.  Not yet supported.  */
  433. +       /* fixme */
  434. +       fprintf (stderr, "Warning: HUNK_OVERLAY encountered, ignoring.\n");
  435. +       next_hunk (abfd);
  436. +       break;
  437. +     case HUNK_BREAK:
  438. +       /* HUNK_BREAK indicates the end of an overlay node.  This
  439. +          hunk consists of a single longword, HUNK_BREAK.  As we
  440. +          do not yet support overlays, we ignore thins hunk for now.  */
  441. +       /* fixme */
  442. +       fprintf(stderr, "Warning: HUNK_BREAK encountered, ignoring.\n");
  443. +       next_hunk (abfd);
  444. +       break;
  445. +     case HUNK_HEADER:
  446. +       /* This is the header of a load file.
  447. +          Skip resident library names (never used, it's
  448. +          an obsolete feature of the file format).  fixme: verify that!  */
  449. +       while (GL(amiga_data->file_pointer))
  450. +         next_hunk (abfd);
  451. +       /* Skip null-word, table_size, F & L, and size-table.  */
  452. +       amiga_data->file_pointer += 4 + GL(amiga_data->file_pointer + 1) - GL(amiga_data->file_pointer + 2);
  453. +       break;
  454. +     case HUNK_CODE:
  455. +       is_chip = HUNK_ATTRIBUTE (GL(amiga_data->file_pointer - 1)) == HUNK_ATTR_CHIP;
  456. +       if (is_chip)
  457. +         fprintf (stderr, "Warning: CHIP code hunks are not supported, ignoring CHIP attribute\n");
  458. +       current_section = amiga_make_unique_section (abfd, (current_name && current_name[0]) ? current_name : ".text");
  459. +       if (current_section == 0)
  460. +         {
  461. +           /* Fatal error.  */
  462. +           return false;
  463. +         }
  464. +       current_section->filepos = (char *) (amiga_data->file_pointer + 1) - (char *)amiga_data->first_byte;
  465. +       current_section->_raw_size = GL(amiga_data->file_pointer) << 2;
  466. +       current_section->target_index = ++hunk_number;
  467. +       bfd_set_section_flags (abfd, current_section, SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS);
  468. +       next_hunk (abfd);
  469. +       break;
  470. +     case HUNK_DATA:
  471. +       current_section = amiga_make_unique_section (abfd, (current_name && current_name[0]) ? current_name : ".data");
  472. +       if (current_section == 0)
  473. +         {
  474. +           /* Fatal error.  */
  475. +           return false;
  476. +         }
  477. +       current_section->filepos = (char *) (amiga_data->file_pointer + 1) - (char *)amiga_data->first_byte;
  478. +       current_section->_raw_size = GL(amiga_data->file_pointer) << 2;
  479. +       current_section->target_index = ++hunk_number;
  480. +       bfd_set_section_flags (abfd, current_section, SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS);
  481. +       next_hunk (abfd);
  482. +       break;
  483. +     case HUNK_BSS:
  484. +       current_section = amiga_make_unique_section (abfd, (current_name && current_name[0]) ? current_name : ".bss");
  485. +       if (current_section == 0)
  486. +         {
  487. +           /* Fatal error.  */
  488. +           return false;
  489. +         }
  490. +       current_section->filepos = (file_ptr) -1;
  491. +       current_section->_raw_size = GL(amiga_data->file_pointer) << 2;
  492. +       current_section->target_index = ++hunk_number;
  493. +       bfd_set_section_flags (abfd, current_section, SEC_ALLOC);
  494. +       ++ amiga_data->file_pointer;
  495. +       break;
  496. +     case HUNK_RELOC8:
  497. +     case HUNK_RELOC16:
  498. +     case HUNK_RELOC32:
  499. +     case HUNK_DREL8:
  500. +     case HUNK_DREL16:
  501. +     case HUNK_DREL32:
  502. +       {
  503. +         int size, base_relative;
  504. +         reloc_howto_type *howto;
  505. +         base_relative = GL(&amiga_data->file_pointer[-1]) >= HUNK_DREL32;
  506. +         size = (base_relative ? HUNK_DREL8 : HUNK_RELOC8) - GL(&amiga_data->file_pointer[-1]);
  507. +         howto = amiga_howto_array[base_relative][size];
  508. +         while (GL(amiga_data->file_pointer))
  509. +           {
  510. +         long to_reloc = GL(amiga_data->file_pointer + 1);
  511. +         long n        = GL(amiga_data->file_pointer);
  512. +         long i = 1;
  513. +         while (i++ < n)
  514. +           amiga_add_reloc (abfd, current_section,
  515. +                    GL(amiga_data->file_pointer + i + 1),
  516. +                    -1, howto, to_reloc);
  517. +         amiga_data->file_pointer += GL(amiga_data->file_pointer) + 2;
  518. +           }
  519. +         ++amiga_data->file_pointer;
  520. +       }
  521. +       break;
  522. +     case HUNK_SYMBOL:
  523. +       /* "You use this block to attach a symbol table to a hunk so that
  524. +          you can use a symbolic debugger on the code.  The linker passes
  525. +          symbol table blocks through attached to the hunk and, if the hunks
  526. +          are coagulated, coagulates the symbol tables.  The loader does not
  527. +          load symbol table blocks into memory; when this is required,
  528. +          the debugger is expected to read the load file."
  529. +                                            -- The AmigaDOS Manual, 3rd ed.
  530. +          GNU C on the Amiga passes all needed debug information in the
  531. +          debug hunk (HUNK_DEBUG).  Thus we do not depend on HUNK_SYMBOL
  532. +          for the GNU debugger GDB to get symbol information and can safely
  533. +          ignore this hunk.
  534. +            If, however, someone would like to add full support for
  535. +          HUNK_SYMBOL to be able to use some debugger that doesn't
  536. +          understand the GNU C debug hunk, please go ahead.
  537. +            As of this writing, the BarFly debugger written by
  538. +          Ralph "laire" Schmidt is starting to understand the GNU C debug
  539. +          hunk.  As the GNU version of the debug hunk is publically
  540. +          documented, unlike for example the format used by SAS Insitute
  541. +          on the Amiga, I hope other debugger writers will follow his
  542. +          example.                          -- vinsci@nic.funet.fi   */
  543. +       /* The formats of the HUNK_SYMBOL and HUNK_EXT hunks are exactly
  544. +          the same, except the type byte of anything in the HUNK_SYMBOL
  545. +          is always zero.  Thus we ignore the symbol hunk by ignoring
  546. +          all EXT_SYMB's below and can thus reuse the code.  */
  547. +     /* This is all jim-dandy if you are just using bfd for GDB or other
  548. +        debuggers.  Unfortunately, some other programs need the info,
  549. +        for instance gprof.  So I am going to process the symbol table
  550. +            here.                              --LuebbeRW@lp.musc.edu       */
  551. +       /* Fall through */
  552. +     case HUNK_EXT:
  553. +       while (GL(amiga_data->file_pointer))
  554. +         {
  555. +           int num, size, base_relative;
  556. +           unsigned char type;
  557. +           reloc_howto_type *howto;
  558. +           /* Make sure we don't set this flag for HUNK_SYMBOL hunks.  */
  559. +           if (hunk_type == HUNK_EXT)
  560. +             abfd -> flags |= HAS_SYMS;
  561. +           switch (type = (GL(amiga_data->file_pointer) >> 24))
  562. +         {
  563. +         case EXT_SYMB:  /* This is a symbol from HUNK_SYMBOL, which we
  564. +                    ignore.  See long description above.  */
  565. +           num = amiga_add_symbol (abfd, hunk_number);
  566. +           amiga_data->file_pointer += 2 + num;
  567. +           break;
  568. +         case EXT_DEF:   /* Relocatable definition.  */
  569. +         case EXT_ABS:   /* Absolute definition.  */
  570. +         /* case EXT_RES: obsolete; Resident library definition.  */
  571. +           num = amiga_add_symbol (abfd, hunk_number);
  572. +           amiga_data->file_pointer += 2 + num;
  573. +           break;
  574. +         case EXT_COMMON:  /* 32 bit reference to COMMON block.  */
  575. +           {
  576. +             int i = 0;
  577. +             num = amiga_add_symbol (abfd, hunk_number);
  578. +             amiga_data->file_pointer += 2 + num;
  579. +             num = GL(amiga_data->file_pointer);
  580. +             while (i++ < num)
  581. +               amiga_add_reloc
  582. +             (abfd, current_section, GL(amiga_data->file_pointer + i),
  583. +              amiga_data->a.n_symbols, &howto_hunk_drel32, -1);
  584. +             next_hunk (abfd);
  585. +           }
  586. +           break;
  587. +         case EXT_REF8:     /*  8 bit reference to symbol.  */
  588. +         case EXT_REF16:    /* 16 bit reference to symbol.  */
  589. +         case EXT_REF32:    /* 32 bit reference to symbol.  */
  590. +         case EXT_DEXT8:    /*  8 bit data relative reference.  */
  591. +         case EXT_DEXT16:   /* 16 bit data relative reference.  */
  592. +         case EXT_DEXT32:   /* 32 bit data relative reference.  */
  593. +           size = GL(amiga_data->file_pointer) >> 24;
  594. +           base_relative = size >= EXT_DEXT32;
  595. +           switch (size)
  596. +             {
  597. +             case EXT_REF32:
  598. +             case EXT_DEXT32:
  599. +               size = 2;
  600. +               break;
  601. +             case EXT_REF16:
  602. +             case EXT_DEXT16:
  603. +               size = 1;
  604. +               break;
  605. +             default:
  606. +               size = 0;
  607. +             }
  608. +           howto = amiga_howto_array[base_relative][size];
  609. +           num = amiga_add_symbol (abfd, hunk_number);
  610. +           amiga_data->file_pointer += 1 + num;
  611. +           {
  612. +             int i = 0;
  613. +             num = GL(amiga_data->file_pointer);
  614. +             while (i++ < num)
  615. +               amiga_add_reloc (abfd, current_section,
  616. +                        GL(amiga_data->file_pointer + i),
  617. +                        amiga_data->a.n_symbols, howto, -1);
  618. +           }
  619. +           next_hunk (abfd);
  620. +           break;
  621. +         default:
  622. +           fprintf (stderr, "Unknown symbol type %d, don't know how to handle.\n", type);
  623. +           /* Fatal error.  */
  624. +           return false;
  625. +         }
  626. +         }
  627. +       ++ amiga_data->file_pointer;
  628. +       break;
  629. +     case HUNK_END:
  630. +       break;
  631. +     case HUNK_LIB:
  632. +     case HUNK_INDEX:
  633. +       fprintf (stderr, "Can not handle HUNK_LIB and HUNK_INDEX hunks.\nConvert the library to ALINK (join) format.\n");
  634. +       break;
  635. +     default:
  636. +       fprintf (stderr, "Unknown hunk type $%x, unit offset = $%x.\n",
  637. +            GL(amiga_data->file_pointer -1),
  638. +            ((amiga_data->file_pointer - 1) - amiga_data->first_byte) * 4);
  639. +       /* Fatal error.  */
  640. +       return false;
  641. +     }
  642. + #if DEBUG_AMIGA
  643. +       printf ("...hunk processed.\n");
  644. + #endif
  645. +       if (amiga_data->file_pointer >= amiga_data->file_end)
  646. +     break;
  647. +     }
  648. +   /* OK.  */
  649. +   return true;
  650. + }
  651. + static boolean
  652. + amiga_mkobject (abfd)
  653. +      bfd *abfd;
  654. + {
  655. +   struct amiga_data_struct *rawptr;
  656. +   rawptr = (struct amiga_data_struct *) bfd_zalloc (abfd, sizeof (struct amiga_data_struct));
  657. +   abfd->tdata.amiga_data = rawptr;
  658. +   return true;
  659. + }
  660. + static boolean
  661. + amiga_write_object_contents (abfd)
  662. +      bfd *abfd;
  663. + {
  664. +   /* fixme */
  665. +   return true;
  666. + }
  667. + static boolean
  668. + amiga_get_section_contents (abfd, section, location, offset, count)
  669. +      bfd *abfd;
  670. +      sec_ptr section;
  671. +      PTR location;
  672. +      file_ptr offset;
  673. +      bfd_size_type count;
  674. + {
  675. +   memmove ((void *) location,
  676. +        (void *) (((int) AMIGA_DATA(abfd)->first_byte)
  677. +              + (int) section->filepos
  678. +              + (int) offset),
  679. +        count);
  680. +   return true;
  681. + }
  682. + boolean
  683. + amiga_new_section_hook (abfd, newsect)
  684. +      bfd *abfd;
  685. +      asection *newsect;
  686. + {
  687. +   newsect->used_by_bfd = (PTR) bfd_alloc (abfd, sizeof (amiga_per_section_type));
  688. +   newsect->alignment_power = 2;
  689. +   amiga_per_section(newsect)->reloc_tail_ptr = (amiga_reloc_type *) 0;
  690. +   return true;
  691. + }
  692. + void
  693. + amiga_slurp_symbol_table (abfd)
  694. +      bfd *abfd;
  695. + {
  696. +   /* fixme:  currently we always load the symbols at check_format time,
  697. +      so we don't do it here.  When the amiga backend someday doesn't
  698. +      keep more info than needed in memory, this will have to be fixed.  */
  699. + }
  700. + unsigned int
  701. + amiga_get_symtab_upper_bound (abfd)
  702. +      bfd *abfd;
  703. + {
  704. +   amiga_slurp_symbol_table (abfd);
  705. +   return (abfd->symcount != 0) ?
  706. +     (abfd->symcount+1) * (sizeof (amiga_symbol_type *)) : 0;
  707. + }
  708. + unsigned int
  709. + amiga_get_symtab (abfd, location)
  710. +      bfd *abfd;
  711. +      asymbol **location;
  712. + {
  713. +   amiga_symbol_type *symp;
  714. +   if (abfd->symcount)
  715. +     {
  716. +       int i = 0;
  717. +       amiga_slurp_symbol_table (abfd);
  718. +       for (symp = AMIGA_DATA(abfd)->external_symbols;
  719. +                  symp != (amiga_symbol_type *) NULL;
  720. +                  symp = symp->next)
  721. +     {
  722. +       location[i++] = &symp->symbol;
  723. +     }
  724. +       for (symp = AMIGA_DATA(abfd)->external_references;
  725. +                  symp != (amiga_symbol_type *) NULL;
  726. +                  symp = symp->next)
  727. +     {
  728. +       location[i++] = &symp->symbol;
  729. +     }
  730. +     }
  731. +   return abfd->symcount;
  732. + }
  733. + asymbol *
  734. + amiga_make_empty_symbol (abfd)
  735. +      bfd *abfd;
  736. + {
  737. +   amiga_symbol_type *new =
  738. +     (amiga_symbol_type *) bfd_zalloc (abfd, sizeof (amiga_symbol_type));
  739. +   new->symbol.the_bfd = abfd;
  740. +   return &new->symbol;
  741. + }
  742. + void
  743. + amiga_get_symbol_info (ignore_abfd, symbol, ret)
  744. +       bfd *ignore_abfd;
  745. +       asymbol *symbol;
  746. +       symbol_info *ret;
  747. + {
  748. +   bfd_symbol_info (symbol, ret);
  749. +   if (symbol->name[0] == ' ')
  750. +     ret->name = "* empty table entry ";
  751. +   if (!symbol->section)
  752. +     ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A';
  753. + }
  754. + void
  755. + amiga_print_symbol (ignore_abfd, afile,  symbol, how)
  756. +       bfd *ignore_abfd;
  757. +       PTR afile;
  758. +       asymbol *symbol;
  759. +       bfd_print_symbol_type how;
  760. + {
  761. +   FILE *file = (FILE *)afile;
  762. +   switch (how) {
  763. +   case bfd_print_symbol_name:
  764. +     fprintf(file, "%s", symbol->name);
  765. +     break;
  766. +   case bfd_print_symbol_more:
  767. +     /* fixme: adapt for amiga */
  768. +     BFD_FAIL();
  769. +     break;
  770. +   case bfd_print_symbol_all:
  771. +       {
  772. +     CONST char *section_name = (symbol->section == (asection *)NULL)
  773. +       ? (CONST char *)"*abs" : symbol->section->name;
  774. +     if (symbol->name[0] == ' ')
  775. +       {
  776. +         fprintf(file, "* empty table entry ");
  777. +       }
  778. +     else
  779. +       {
  780. +         bfd_print_symbol_vandf ((PTR)file, symbol);
  781. +         fprintf(file," %-5s %04x %02x %s",
  782. +             section_name,
  783. +             amiga_symbol(symbol)->hunk_number,  /* ->desc */
  784. +             (unsigned) 0,                       /* ->other */
  785. +                                                 /* type */
  786. +             symbol->name);                      /* ->name */
  787. +     }
  788. +       }
  789. +     break;
  790. +   }
  791. + }
  792. + static unsigned int
  793. + amiga_get_reloc_upper_bound (abfd, asect)
  794. +      bfd *abfd;
  795. +      sec_ptr asect;
  796. + {
  797. +   if (bfd_get_format (abfd) != bfd_object)
  798. +     {
  799. +       bfd_set_error(bfd_error_invalid_operation);
  800. +       return 0;
  801. +     }
  802. +   return sizeof (arelent *) * (asect->reloc_count + 1);
  803. + }
  804. + unsigned int
  805. + amiga_canonicalize_reloc (abfd, section, relptr, symbols)
  806. +      bfd *abfd;
  807. +      sec_ptr section;
  808. +      arelent **relptr;
  809. +      asymbol **symbols;
  810. + {
  811. +   amiga_reloc_type *src = (amiga_reloc_type *) section->relocation;
  812. +   int i = 0;
  813. +   while (src != (amiga_reloc_type *) 0)
  814. +     {
  815. +       if (src->symbol_number == -1)
  816. +         src->relent.sym_ptr_ptr =
  817. +       &(amiga_get_section_by_hunk_number(abfd,src->target_hunk))->symbol;
  818. +       else
  819. +     src->relent.sym_ptr_ptr = symbols + i++;
  820. +       *relptr++ = &src->relent;
  821. +       src = src->next;
  822. +     }
  823. +   *relptr = (arelent *) 0;
  824. +   return section->reloc_count;
  825. + }
  826. + static boolean
  827. + amiga_set_section_contents (abfd, section, location, offset, count)
  828. +      bfd *abfd;
  829. +      sec_ptr section;
  830. +      unsigned char *location;
  831. +      file_ptr offset;
  832. +       int count;
  833. + {
  834. +   /* fixme */
  835. +   return true;
  836. + }
  837. + static boolean
  838. + amiga_set_arch_mach (abfd, arch, machine)
  839. +      bfd *abfd;
  840. +      enum bfd_architecture arch;
  841. +      unsigned long machine;
  842. + {
  843. +   bfd_default_set_arch_mach(abfd, arch, machine);
  844. +   if (arch == bfd_arch_m68k)
  845. +     {
  846. +       switch (machine)
  847. +     {
  848. +     case 68000:
  849. +     case 68008:
  850. +     case 68010:
  851. +     case 68020:
  852. +     case 68030:
  853. +     case 68040:
  854. +     case 68070:
  855. +     case 0:
  856. +       return true;
  857. +     default:
  858. +       return false;
  859. +     }
  860. +     }
  861. +   return false;
  862. + }
  863. + static int
  864. + DEFUN(amiga_sizeof_headers,(ignore_abfd, ignore),
  865. +       bfd *ignore_abfd AND
  866. +       boolean ignore)
  867. + {
  868. +   /* The amiga hunk format doesn't have headers.  */
  869. +   return 0;
  870. + }
  871. + /* Provided a BFD, a section and an offset into the section, calculate
  872. +    and return the name of the source file and the line nearest to the
  873. +    wanted location.  */
  874. + boolean
  875. + amiga_find_nearest_line(abfd, section, symbols, offset, filename_ptr,
  876. +             functionname_ptr, line_ptr)
  877. +      bfd *abfd;
  878. +      asection *section;
  879. +      asymbol **symbols;
  880. +      bfd_vma offset;
  881. +      char **filename_ptr;
  882. +      char **functionname_ptr;
  883. +      int *line_ptr;
  884. + {
  885. +   /* fixme (see aoutx.h, for example) */
  886. +   return false;
  887. + }
  888. + static const struct reloc_howto_struct *
  889. + amiga_bfd_reloc_type_lookup (abfd, code)
  890. +        bfd *abfd;
  891. +        bfd_reloc_code_real_type code;
  892. + {
  893. +   switch (code)
  894. +     {
  895. +     case BFD_RELOC_8_PCREL:  return &howto_hunk_reloc8;
  896. +     case BFD_RELOC_16_PCREL: return &howto_hunk_reloc16;
  897. +     case BFD_RELOC_32_PCREL: return &howto_hunk_reloc32;
  898. +     case BFD_RELOC_8:        return &howto_hunk_drel8;
  899. +     case BFD_RELOC_16:       return &howto_hunk_drel16;
  900. +     case BFD_RELOC_32:       return &howto_hunk_drel32;
  901. +     default:                 return 0;
  902. +     }
  903. + }
  904. + /* We don't have core files.  */
  905. + #define    amiga_core_file_failing_command _bfd_dummy_core_file_failing_command
  906. + #define    amiga_core_file_failing_signal _bfd_dummy_core_file_failing_signal
  907. + #define    amiga_core_file_matches_executable_p _bfd_dummy_core_file_matches_executable_p
  908. + /* We use BSD-Unix generic archive files (fixme: test that this actually works).  */
  909. + #define    amiga_openr_next_archived_file    bfd_generic_openr_next_archived_file
  910. + #define    amiga_generic_stat_arch_elt    bfd_generic_stat_arch_elt
  911. + #define    amiga_slurp_armap        bfd_slurp_bsd_armap
  912. + #define    amiga_slurp_extended_name_table    bfd_true
  913. + #define amiga_update_armap_timestamp    bfd_true
  914. + #define amiga_construct_extended_name_table\
  915. +   ((boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
  916. +    bfd_true)
  917. + #define    amiga_write_armap        bsd_write_armap
  918. + #define    amiga_truncate_arname        bfd_bsd_truncate_arname
  919. + #define amiga_bfd_debug_info_start        bfd_void
  920. + #define amiga_bfd_debug_info_end        bfd_void
  921. + #define amiga_bfd_debug_info_accumulate    (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
  922. + /* fixme: (when everything else has been done) a tailor-made
  923. +    amiga_get_relocated_section_contents would probably be faster
  924. +    than the generic routine.  */
  925. + #define amiga_bfd_get_relocated_section_contents  bfd_generic_get_relocated_section_contents
  926. + #define amiga_bfd_relax_section                   bfd_generic_relax_section
  927. + #define amiga_get_lineno (struct lineno_cache_entry *(*)())bfd_nullvoidptr
  928. + #define amiga_close_and_cleanup         _bfd_generic_close_and_cleanup
  929. + #define amiga_bfd_make_debug_symbol \
  930. +   ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
  931. + #define amiga_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
  932. + #define amiga_bfd_link_add_symbols _bfd_generic_link_add_symbols
  933. + #define amiga_bfd_final_link _bfd_generic_final_link
  934. + #define amiga_bfd_free_cached_info    _bfd_generic_bfd_free_cached_info
  935. + #define amiga_bfd_is_local_label    bfd_generic_is_local_label
  936. + #define amiga_bfd_copy_private_section_data bfd_void
  937. + #define amiga_bfd_copy_private_bfd_data bfd_void
  938. + #if defined (amiga)
  939. + /* So that the JUMP_TABLE() macro below can work.  */
  940. + #undef amiga
  941. + #endif
  942. + bfd_target amiga_vec =
  943. + {
  944. +   "amiga",        /* name */
  945. +   bfd_target_amiga_flavour,
  946. +   true,            /* data byte order is little */
  947. +   true,            /* header byte order is little */
  948. +   HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT, /* object flags */
  949. +   SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC, /* section flags */
  950. +   '_',                /* symbol leading char */
  951. +   ' ',                /* ar_pad_char */
  952. +   31,                /* ar_max_namelen */
  953. +   2,                /* minimum align */
  954. +   bfd_getb64, bfd_getb_signed_64, bfd_putb64, bfd_getb32, bfd_getb_signed_32,
  955. +   bfd_putb32, bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
  956. +   bfd_getb64, bfd_getb_signed_64, bfd_putb64, bfd_getb32, bfd_getb_signed_32,
  957. +   bfd_putb32, bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
  958. +   {
  959. +     /* bfd_check_format */
  960. +     _bfd_dummy_target,
  961. +     amiga_object_p,
  962. +     bfd_generic_archive_p,
  963. +     _bfd_dummy_target
  964. +   },
  965. +   {
  966. +     /* bfd_set_format */
  967. +     bfd_false,
  968. +     amiga_mkobject,
  969. +     _bfd_generic_mkarchive,
  970. +     bfd_false
  971. +   },
  972. +   {
  973. +     /* bfd_write_contents */
  974. +     bfd_false,
  975. +     amiga_write_object_contents,
  976. +     _bfd_write_archive_contents,
  977. +     bfd_false
  978. +   },
  979. +   BFD_JUMP_TABLE_GENERIC (amiga),
  980. +   BFD_JUMP_TABLE_COPY (amiga),
  981. +   BFD_JUMP_TABLE_CORE (_bfd_nocore),
  982. +   BFD_JUMP_TABLE_ARCHIVE (amiga),
  983. +   BFD_JUMP_TABLE_SYMBOLS (amiga),
  984. +   BFD_JUMP_TABLE_RELOCS (amiga),
  985. +   BFD_JUMP_TABLE_WRITE (amiga),
  986. +   BFD_JUMP_TABLE_LINK (amiga),
  987. +   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
  988. +   (PTR) 0
  989. + #if 0
  990. + /* fixme: no longer in use?  */
  991. +   /* How applications can find out about amiga relocation types (see
  992. +      documentation on reloc types).  */
  993. +   amiga_reloc_type_lookup
  994. + #endif
  995. + };
  996. diff -rc --new-file binutils-2.5.2/bfd/bfd-in2.h /gnu/src/amiga/binutils-2.5.2/bfd/bfd-in2.h
  997. *** binutils-2.5.2/bfd/bfd-in2.h    Sat Oct 22 01:27:50 1994
  998. --- /gnu/src/amiga/binutils-2.5.2/bfd/bfd-in2.h    Thu Nov 10 15:57:54 1994
  999. ***************
  1000. *** 1787,1792 ****
  1001. --- 1787,1793 ----
  1002.         struct lynx_core_struct *lynx_core_data;
  1003.         struct osf_core_struct *osf_core_data;
  1004.         struct cisco_core_struct *cisco_core_data;
  1005. +       struct amiga_data_struct *amiga_data;
  1006.         PTR any;
  1007.         } tdata;
  1008.     
  1009. ***************
  1010. *** 1984,1990 ****
  1011.     bfd_target_tekhex_flavour,
  1012.     bfd_target_srec_flavour,
  1013.     bfd_target_som_flavour,
  1014. !   bfd_target_os9k_flavour};
  1015.   
  1016.    /* Forward declaration.  */
  1017.   typedef struct bfd_link_info _bfd_link_info;
  1018. --- 1985,1992 ----
  1019.     bfd_target_tekhex_flavour,
  1020.     bfd_target_srec_flavour,
  1021.     bfd_target_som_flavour,
  1022. !   bfd_target_os9k_flavour,
  1023. !   bfd_target_amiga_flavour};
  1024.   
  1025.    /* Forward declaration.  */
  1026.   typedef struct bfd_link_info _bfd_link_info;
  1027. diff -rc --new-file binutils-2.5.2/bfd/bfd.c /gnu/src/amiga/binutils-2.5.2/bfd/bfd.c
  1028. *** binutils-2.5.2/bfd/bfd.c    Fri Oct 14 23:16:16 1994
  1029. --- /gnu/src/amiga/binutils-2.5.2/bfd/bfd.c    Thu Nov 10 15:57:57 1994
  1030. ***************
  1031. *** 169,174 ****
  1032. --- 169,175 ----
  1033.   .      struct lynx_core_struct *lynx_core_data;
  1034.   .      struct osf_core_struct *osf_core_data;
  1035.   .      struct cisco_core_struct *cisco_core_data;
  1036. + .      struct amiga_data_struct *amiga_data;
  1037.   .      PTR any;
  1038.   .      } tdata;
  1039.   .  
  1040. diff -rc --new-file binutils-2.5.2/bfd/config/amigados.mh /gnu/src/amiga/binutils-2.5.2/bfd/config/amigados.mh
  1041. *** binutils-2.5.2/bfd/config/amigados.mh    Thu Jan  1 00:00:00 1970
  1042. --- /gnu/src/amiga/binutils-2.5.2/bfd/config/amigados.mh    Thu Nov 10 15:57:59 1994
  1043. ***************
  1044. *** 0 ****
  1045. --- 1,5 ----
  1046. + # Host makefile fragment for Commodore Amiga running AmigaDOS
  1047. + # Use the GNU C compiler.
  1048. + CC=gcc
  1049. + # Don't use -g, it doesn't do anything useful yet.  Optimize though.
  1050. + CFLAGS=-O
  1051. diff -rc --new-file binutils-2.5.2/bfd/config/amigados.mt /gnu/src/amiga/binutils-2.5.2/bfd/config/amigados.mt
  1052. *** binutils-2.5.2/bfd/config/amigados.mt    Thu Jan  1 00:00:00 1970
  1053. --- /gnu/src/amiga/binutils-2.5.2/bfd/config/amigados.mt    Thu Nov 10 15:58:01 1994
  1054. ***************
  1055. *** 0 ****
  1056. --- 1,3 ----
  1057. + # Target config file for Commodore Amiga running AmigaDOS
  1058. + DEFAULT_VECTOR=amiga_vec
  1059. + SELECT_ARCHITECTURES=bfd_m68k_arch
  1060. diff -rc --new-file binutils-2.5.2/bfd/config.bfd /gnu/src/amiga/binutils-2.5.2/bfd/config.bfd
  1061. *** binutils-2.5.2/bfd/config.bfd    Tue Sep 13 18:30:07 1994
  1062. --- /gnu/src/amiga/binutils-2.5.2/bfd/config.bfd    Thu Nov 10 15:58:03 1994
  1063. ***************
  1064. *** 81,86 ****
  1065. --- 81,87 ----
  1066.     m68*-*-vxworks*)    bfd_name=m68k-aout strip_underscore=yes ;;
  1067.     m68*-ericsson-*)    bfd_name=m68k-ose strip_underscore=yes ;;
  1068.     m68*-netx-*)        bfd_name=m68k-aout strip_underscore=yes ;;
  1069. +   m68*-cbm-amigados*)    bfd_name=amigados ;;
  1070.   
  1071.     m88*-harris-cxux*)    bfd_name=m88k-elf ;;
  1072.     # DGUX used to use COFF, but now (Jan 94) I believe it uses ELF by default.
  1073. diff -rc --new-file binutils-2.5.2/bfd/configure.in /gnu/src/amiga/binutils-2.5.2/bfd/configure.in
  1074. *** binutils-2.5.2/bfd/configure.in    Wed Oct 19 18:00:22 1994
  1075. --- /gnu/src/amiga/binutils-2.5.2/bfd/configure.in    Mon Nov 21 07:42:27 1994
  1076. ***************
  1077. *** 137,142 ****
  1078. --- 137,143 ----
  1079.       # with the two vector lists in targets.c.
  1080.       a29kcoff_big_vec)        tb="$tb coff-a29k.o cofflink.o" ;;
  1081.       a_out_adobe_vec)        tb="$tb aout-adobe.o aout32.o stab-syms.o" ;;
  1082. +     amiga_vec)            tb="$tb amigados.o sunos.o aout32.o stab-syms.o" ;;
  1083.       aout0_big_vec)        tb="$tb aout0.o aout32.o stab-syms.o" ;;
  1084.       aout_mips_big_vec)        tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
  1085.       aout_mips_little_vec)    tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
  1086. ***************
  1087. *** 273,281 ****
  1088.   test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR"
  1089.   
  1090.   echo "TDEFAULTS = \
  1091. ! ${defvec+-DDEFAULT_VECTOR=$defvec} \
  1092. ! ${selvecs+-DSELECT_VECS='$selvecs'} \
  1093. ! ${selarchs+-DSELECT_ARCHITECTURES='$selarchs'}" \
  1094.     >> Makefile.2
  1095.   
  1096.   cat Makefile.tmp >> Makefile.2
  1097. --- 274,282 ----
  1098.   test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR"
  1099.   
  1100.   echo "TDEFAULTS = \
  1101. ! -DDEFAULT_VECTOR=amiga_vec \
  1102. ! -DSELECT_VECS='&amiga_vec' \
  1103. ! -DSELECT_ARCHITECTURES=bfd_m68k_arch" \
  1104.     >> Makefile.2
  1105.   
  1106.   cat Makefile.tmp >> Makefile.2
  1107. diff -rc --new-file binutils-2.5.2/bfd/hosts/amigados.h /gnu/src/amiga/binutils-2.5.2/bfd/hosts/amigados.h
  1108. *** binutils-2.5.2/bfd/hosts/amigados.h    Thu Jan  1 00:00:00 1970
  1109. --- /gnu/src/amiga/binutils-2.5.2/bfd/hosts/amigados.h    Thu Nov 10 15:58:07 1994
  1110. ***************
  1111. *** 0 ****
  1112. --- 1,5 ----
  1113. + /* Host configuration for AmigaDOS */
  1114. + #ifndef hosts_amigados_h
  1115. + #define hosts_amigados_h
  1116. + #include "hosts/std-host.h"
  1117. + #endif /* hosts_amigados_h */
  1118. diff -rc --new-file binutils-2.5.2/bfd/libamiga.h /gnu/src/amiga/binutils-2.5.2/bfd/libamiga.h
  1119. *** binutils-2.5.2/bfd/libamiga.h    Thu Jan  1 00:00:00 1970
  1120. --- /gnu/src/amiga/binutils-2.5.2/bfd/libamiga.h    Thu Nov 10 15:58:09 1994
  1121. ***************
  1122. *** 0 ****
  1123. --- 1,149 ----
  1124. + /* BFD back-end data structures for AmigaOS.
  1125. +    Copyright (C) 1992-1994 Free Software Foundation, Inc.
  1126. +    Contributed by Leonard Norrgard.
  1127. + This file is part of BFD, the Binary File Descriptor library.
  1128. + This program is free software; you can redistribute it and/or modify
  1129. + it under the terms of the GNU General Public License as published by
  1130. + the Free Software Foundation; either version 2 of the License, or
  1131. + (at your option) any later version.
  1132. + This program is distributed in the hope that it will be useful,
  1133. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  1134. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1135. + GNU General Public License for more details.
  1136. + You should have received a copy of the GNU General Public License
  1137. + along with this program; if not, write to the Free Software
  1138. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1139. + #ifdef __STDC__
  1140. + #define CAT3(a,b,c) a##b##c
  1141. + #else
  1142. + #define CAT3(a,b,c) a/**/b/**/c
  1143. + #endif
  1144. + #define GET_WORD bfd_h_get_32
  1145. + #define GET_SWORD (int32_type)GET_WORD
  1146. + #define PUT_WORD bfd_h_put_32
  1147. + #define NAME(x,y) CAT3(x,_32_,y)
  1148. + #define JNAME(x) CAT(x,_32)
  1149. + #define BYTES_IN_WORD 4
  1150. + /* Hunk ID numbers.  */
  1151. + #define HUNK_UNIT       999
  1152. + #define HUNK_NAME    1000
  1153. + #define HUNK_CODE    1001
  1154. + #define HUNK_DATA    1002
  1155. + #define HUNK_BSS    1003
  1156. + #define HUNK_RELOC32    1004
  1157. + #define HUNK_RELOC16    1005
  1158. + #define HUNK_RELOC8    1006
  1159. + #define HUNK_EXT    1007
  1160. + #define HUNK_SYMBOL    1008
  1161. + #define HUNK_DEBUG    1009
  1162. + #define HUNK_END    1010
  1163. + #define HUNK_HEADER    1011
  1164. + #define HUNK_OVERLAY    1013
  1165. + #define HUNK_BREAK    1014
  1166. + #define HUNK_DREL32    1015
  1167. + #define HUNK_DREL16    1016
  1168. + #define HUNK_DREL8    1017
  1169. + #define HUNK_LIB    1018
  1170. + #define HUNK_INDEX    1019
  1171. + /* The hunk ID part.  */
  1172. + #define HUNK_VALUE(hunk_id) ((hunk_id) & 0x3fffffff)
  1173. + /* Attributes of a hunk.  */
  1174. + #define HUNK_ATTRIBUTE(hunk_id) ((hunk_id) >> 30)
  1175. + #define HUNK_ATTR_CHIP 0x01 /* Hunk contents must go into chip (graphics) memory.  */
  1176. + /* HUNK_EXT sub-types.  */
  1177. + #define EXT_SYMB    0    /* Symbol table.  */
  1178. + #define EXT_DEF        1    /* Relocatable definition.  */
  1179. + #define EXT_ABS        2    /* Absolute definition. */
  1180. + #define EXT_RES        3    /* Obsolete.  */
  1181. + #define EXT_REF32    129    /* 32 bit reference to symbol.  */
  1182. + #define EXT_COMMON    130    /* 32 bit reference to COMMON block.  */
  1183. + #define EXT_REF16    131    /* 16 bit reference to symbol.  */
  1184. + #define EXT_REF8    132    /*  8 bit reference to symbol.  */
  1185. + #define EXT_DEXT32    133    /* 32 bit data releative reference.  */
  1186. + #define EXT_DEXT16    134    /* 16 bit data releative reference.  */
  1187. + #define EXT_DEXT8    135    /*  8 bit data releative reference.  */
  1188. + typedef struct amiga_reloc {
  1189. +   arelent relent;
  1190. +   struct amiga_reloc *next;
  1191. +   int symbol_number;
  1192. +   unsigned int target_hunk;
  1193. + } amiga_reloc_type;
  1194. + typedef struct amiga_symbol {
  1195. +   asymbol symbol;
  1196. +   struct amiga_symbol *next;
  1197. +   unsigned long hunk_number;
  1198. +   unsigned long value;
  1199. +   unsigned char type;
  1200. + } amiga_symbol_type;
  1201. + typedef struct amiga_per_section
  1202. + {
  1203. +   amiga_reloc_type *reloc_tail_ptr;
  1204. + } amiga_per_section_type;
  1205. + #define amiga_per_section(x) ((amiga_per_section_type *)((x)->used_by_bfd))
  1206. + /* The `tdata' struct for all a.out-like object file formats.
  1207. +    Various things depend on this struct being around any time an a.out
  1208. +    file is being handled.  An example is dbxread.c in GDB.  */
  1209. + struct amiga_data {
  1210. +   struct internal_exec *hdr;        /* exec file header */
  1211. +   amiga_symbol_type *symbols;        /* symtab for input bfd */
  1212. +   /* Filler, so we can pretend to be an a.out to GDB.  */
  1213. +   asection *dummy_1_textsec;
  1214. +   asection *dummy_2_datasec;
  1215. +   asection *dummy_3_bsssec;
  1216. +   /* The positions of the string table and symbol table.  */
  1217. +   file_ptr sym_filepos;
  1218. +   file_ptr str_filepos;
  1219. +   unsigned int n_symbols;               /* number of symbols */
  1220. +   /* Size of a relocation entry in external form */
  1221. +   unsigned dummy_reloc_entry_size;
  1222. +   /* Size of a symbol table entry in external form */
  1223. +   unsigned symbol_entry_size;
  1224. +   unsigned exec_bytes_size;
  1225. +   unsigned vma_adjusted : 1;
  1226. + };
  1227. + typedef struct  amiga_data_struct {
  1228. +   struct amiga_data a;
  1229. +   unsigned long symtab_size;
  1230. +   unsigned long stringtab_size;
  1231. +   unsigned long *first_byte;
  1232. +   unsigned long *file_end;
  1233. +   unsigned long *file_pointer;
  1234. +   amiga_symbol_type *external_symbols;
  1235. +   amiga_symbol_type *external_references;
  1236. +   amiga_symbol_type **symbol_tail_ptr;
  1237. + } amiga_data_type;
  1238. + #define    adata(bfd)        ((bfd)->tdata.amiga_data->a)
  1239. + /* We take the address of the first element of an asymbol to ensure that the
  1240. +    macro is only ever applied to an asymbol */
  1241. + #define amiga_symbol(asymbol) ((amiga_symbol_type *)(&(asymbol)->the_bfd))
  1242. + #define AMIGA_DATA(abfd) ((abfd)->tdata.amiga_data)
  1243. diff -rc --new-file binutils-2.5.2/bfd/targets.c /gnu/src/amiga/binutils-2.5.2/bfd/targets.c
  1244. *** binutils-2.5.2/bfd/targets.c    Sat Oct 22 01:28:21 1994
  1245. --- /gnu/src/amiga/binutils-2.5.2/bfd/targets.c    Thu Nov 10 15:58:12 1994
  1246. ***************
  1247. *** 146,152 ****
  1248.   .  bfd_target_tekhex_flavour,
  1249.   .  bfd_target_srec_flavour,
  1250.   .  bfd_target_som_flavour,
  1251. ! .  bfd_target_os9k_flavour};
  1252.   .
  1253.   .{* Forward declaration.  *}
  1254.   .typedef struct bfd_link_info _bfd_link_info;
  1255. --- 146,153 ----
  1256.   .  bfd_target_tekhex_flavour,
  1257.   .  bfd_target_srec_flavour,
  1258.   .  bfd_target_som_flavour,
  1259. ! .  bfd_target_os9k_flavour,
  1260. ! .  bfd_target_amiga_flavour};
  1261.   .
  1262.   .{* Forward declaration.  *}
  1263.   .typedef struct bfd_link_info _bfd_link_info;
  1264. ***************
  1265. *** 424,429 ****
  1266. --- 425,431 ----
  1267.      we can't intermix extern's and initializers.  */
  1268.   extern const bfd_target a29kcoff_big_vec;
  1269.   extern const bfd_target a_out_adobe_vec;
  1270. + extern const bfd_target amiga_vec;
  1271.   extern const bfd_target aout_mips_big_vec;
  1272.   extern const bfd_target aout_mips_little_vec;
  1273.   extern const bfd_target aout0_big_vec;
  1274. ***************
  1275. *** 528,533 ****
  1276. --- 530,536 ----
  1277.          it wasn't omitted by mistake.  */
  1278.       &a29kcoff_big_vec,
  1279.       &a_out_adobe_vec,
  1280. +         &amiga_vec,
  1281.   #if 0                /* No one seems to use this.  */
  1282.       &aout_mips_big_vec,
  1283.   #endif
  1284. diff -rc --new-file binutils-2.5.2/config/mh-amigados /gnu/src/amiga/binutils-2.5.2/config/mh-amigados
  1285. *** binutils-2.5.2/config/mh-amigados    Thu Jan  1 00:00:00 1970
  1286. --- /gnu/src/amiga/binutils-2.5.2/config/mh-amigados    Thu Nov 10 15:58:12 1994
  1287. ***************
  1288. *** 0 ****
  1289. --- 1,6 ----
  1290. + # Host makefile fragment for Commodore Amiga running AmigaDOS.
  1291. + # There is no standard system compiler.  Assume use GNU C.
  1292. + CC = gcc
  1293. + # There is no support for -g yet.  But use -O instead.
  1294. + CFLAGS = -O
  1295. diff -rc --new-file binutils-2.5.2/configure /gnu/src/amiga/binutils-2.5.2/configure
  1296. *** binutils-2.5.2/configure    Wed Oct 19 16:05:50 1994
  1297. --- /gnu/src/amiga/binutils-2.5.2/configure    Mon Nov 21 07:42:28 1994
  1298. ***************
  1299. *** 36,46 ****
  1300.   #       config.status is removed.
  1301.   #
  1302.   
  1303.   export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
  1304.   
  1305.   remove=rm
  1306. ! hard_link=ln
  1307. ! symbolic_link='ln -s'
  1308.   
  1309.   #for Test
  1310.   #remove="echo rm"
  1311. --- 36,49 ----
  1312.   #       config.status is removed.
  1313.   #
  1314.   
  1315. + # In places where the argument to echo may start with a '-', use /bin/echo
  1316. + # since the AmigaDOS pdksh builtin echo botches this case.
  1317.   export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
  1318.   
  1319.   remove=rm
  1320. ! hard_link=cp
  1321. ! symbolic_link=cp
  1322.   
  1323.   #for Test
  1324.   #remove="echo rm"
  1325. ***************
  1326. *** 65,71 ****
  1327.   norecursion=
  1328.   other_options=
  1329.   package_makefile_frag=
  1330. ! prefix=/usr/local
  1331.   progname=
  1332.   program_prefix=
  1333.   program_prefixoption=
  1334. --- 68,77 ----
  1335.   norecursion=
  1336.   other_options=
  1337.   package_makefile_frag=
  1338. ! # This is a hack so we don't have to remember to always configure using
  1339. ! # the "--prefix=/gnu" option.  Personally I feel this should be settable
  1340. ! # in a config file.  -fnf
  1341. ! prefix=/gnu
  1342.   progname=
  1343.   program_prefix=
  1344.   program_prefixoption=
  1345. ***************
  1346. *** 102,110 ****
  1347.   ## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
  1348.   ##
  1349.   
  1350. ! progname=$0
  1351.   # if PWD already has a value, it is probably wrong.
  1352. - if [ -n "$PWD" ]; then PWD=`pwd`; fi
  1353.   
  1354.   case "${progname}" in
  1355.   /*) ;;
  1356. --- 108,120 ----
  1357.   ## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
  1358.   ##
  1359.   
  1360. ! # For some reason, the value of $0 in AmigaDOS pdksh ends up with a
  1361. ! # trailing '/' that needs to be stripped.
  1362. ! progname=`/bin/echo $0 | sed 's:/$::'`
  1363. ! # if PWD already has a value, it is probably wrong.
  1364. ! # The AmigaDOS pksh can't change the value of PWD, it's readonly.
  1365. ! #if [ -n "$PWD" ]; then PWD=`pwd`; fi
  1366.   # if PWD already has a value, it is probably wrong.
  1367.   
  1368.   case "${progname}" in
  1369.   /*) ;;
  1370. ***************
  1371. *** 140,146 ****
  1372.   # Split out the argument for options that take them
  1373.       case $option in
  1374.       --*=*)
  1375. !         optarg=`echo $option | sed -e 's/^[^=]*=//'`
  1376.           ;;
  1377.   # These options have mandatory values.  Since we didn't find an = sign,
  1378.   # the value must be in the next argument
  1379. --- 150,156 ----
  1380.   # Split out the argument for options that take them
  1381.       case $option in
  1382.       --*=*)
  1383. !         optarg=`/bin/echo $option | sed -e 's/^[^=]*=//'`
  1384.           ;;
  1385.   # These options have mandatory values.  Since we didn't find an = sign,
  1386.   # the value must be in the next argument
  1387. ***************
  1388. *** 165,171 ****
  1389.       --cache*)
  1390.           ;;
  1391.       --disable-*)
  1392. !         enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
  1393.           eval $enableopt=no
  1394.           disableoptions="$disableoptions $option"
  1395.           ;;
  1396. --- 175,181 ----
  1397.       --cache*)
  1398.           ;;
  1399.       --disable-*)
  1400. !         enableopt=`/bin/echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
  1401.           eval $enableopt=no
  1402.           disableoptions="$disableoptions $option"
  1403.           ;;
  1404. ***************
  1405. *** 175,181 ****
  1406.           *)    optarg=yes ;;
  1407.           esac
  1408.   
  1409. !         enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
  1410.           eval $enableopt="$optarg"
  1411.           enableoptions="$enableoptions $option"
  1412.           ;;
  1413. --- 185,191 ----
  1414.           *)    optarg=yes ;;
  1415.           esac
  1416.   
  1417. !         enableopt=`/bin/echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
  1418.           eval $enableopt="$optarg"
  1419.           enableoptions="$enableoptions $option"
  1420.           ;;
  1421. ***************
  1422. *** 217,223 ****
  1423.           ;;
  1424.       --program-transform-name* | --program-t*)
  1425.           # Double any backslashes or dollar signs in the argument
  1426. !         program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  1427.           program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
  1428.           ;;
  1429.       --rm)
  1430. --- 227,233 ----
  1431.           ;;
  1432.       --program-transform-name* | --program-t*)
  1433.           # Double any backslashes or dollar signs in the argument
  1434. !         program_transform_name="${program_transform_name} -e `/bin/echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  1435.           program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
  1436.           ;;
  1437.       --rm)
  1438. ***************
  1439. *** 236,242 ****
  1440.                   # bolted into an object file as debug info, it has two slashes
  1441.                   # in it.  Ordinarily this is ok, but emacs takes double slash
  1442.                   # to mean "forget the first part".
  1443. !         srcdir=`echo $optarg | sed -e 's:/$::'`
  1444.           ;;
  1445.       --srcdir* | --sr*)
  1446.           srcdir=$optarg
  1447. --- 246,252 ----
  1448.                   # bolted into an object file as debug info, it has two slashes
  1449.                   # in it.  Ordinarily this is ok, but emacs takes double slash
  1450.                   # to mean "forget the first part".
  1451. !         srcdir=`/bin/echo $optarg | sed -e 's:/$::'`
  1452.           ;;
  1453.       --srcdir* | --sr*)
  1454.           srcdir=$optarg
  1455. ***************
  1456. *** 258,264 ****
  1457.           verbose=--verbose
  1458.           ;;
  1459.       --version | --V | --vers*)
  1460. !         echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
  1461.           exit 0
  1462.           ;;
  1463.       --with-*)
  1464. --- 268,274 ----
  1465.           verbose=--verbose
  1466.           ;;
  1467.       --version | --V | --vers*)
  1468. !         echo "This is Cygnus Configure version" `/bin/echo ${version} | sed 's/[ $:]//g'`
  1469.           exit 0
  1470.           ;;
  1471.       --with-*)
  1472. ***************
  1473. *** 267,278 ****
  1474.           *)    optarg=yes ;;
  1475.           esac
  1476.   
  1477. !         withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
  1478.           eval $withopt="$optarg"
  1479.           withoptions="$withoptions $option"
  1480.           ;;
  1481.       --without-*)
  1482. !         withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
  1483.           eval $withopt=no
  1484.           withoutoptions="$withoutoptions $option"
  1485.           ;;
  1486. --- 277,288 ----
  1487.           *)    optarg=yes ;;
  1488.           esac
  1489.   
  1490. !         withopt=`/bin/echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
  1491.           eval $withopt="$optarg"
  1492.           withoptions="$withoptions $option"
  1493.           ;;
  1494.       --without-*)
  1495. !         withopt=`/bin/echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
  1496.           eval $withopt=no
  1497.           withoutoptions="$withoutoptions $option"
  1498.           ;;
  1499. ***************
  1500. *** 331,337 ****
  1501.           NOUNDEFS)
  1502.               # Neither --host option nor undefs were present.
  1503.               # Call config.guess.
  1504. !             guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
  1505.               if host_alias=`${guesssys}`
  1506.               then
  1507.                   # If the string we are going to use for
  1508. --- 341,347 ----
  1509.           NOUNDEFS)
  1510.               # Neither --host option nor undefs were present.
  1511.               # Call config.guess.
  1512. !             guesssys=`/bin/echo ${progname} | sed 's/configure$/config.guess/'`
  1513.               if host_alias=`${guesssys}`
  1514.               then
  1515.                   # If the string we are going to use for
  1516. ***************
  1517. *** 411,418 ****
  1518.       exit 1
  1519.   fi
  1520.   
  1521. ! configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
  1522. ! moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
  1523.   
  1524.   # this is a hack.  sun4 must always be a valid host alias or this will fail.
  1525.   if ${configsub} sun4 >/dev/null 2>&1 ; then
  1526. --- 421,428 ----
  1527.       exit 1
  1528.   fi
  1529.   
  1530. ! configsub=`/bin/echo ${progname} | sed 's/configure$/config.sub/'`
  1531. ! moveifchange=`/bin/echo ${progname} | sed 's/configure$/move-if-change/'`
  1532.   
  1533.   # this is a hack.  sun4 must always be a valid host alias or this will fail.
  1534.   if ${configsub} sun4 >/dev/null 2>&1 ; then
  1535. ***************
  1536. *** 437,443 ****
  1537.                   srcdir=.
  1538.           else
  1539.                   if [ -r ${progname}.in ] ; then
  1540. !                         srcdir=`echo ${progname} | sed 's:/configure$::'`
  1541.                   else
  1542.                           echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
  1543.                           exit 1
  1544. --- 447,453 ----
  1545.                   srcdir=.
  1546.           else
  1547.                   if [ -r ${progname}.in ] ; then
  1548. !                         srcdir=`/bin/echo ${progname} | sed 's:/configure$::'`
  1549.                   else
  1550.                           echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
  1551.                           exit 1
  1552. ***************
  1553. *** 523,531 ****
  1554.   *)
  1555.       if result=`${config_shell} ${configsub} ${build_alias}` ; then
  1556.           buildopt="--build=${build_alias}"
  1557. !         build_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  1558. !         build_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  1559. !         build_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  1560.           build=${build_cpu}-${build_vendor}-${build_os}
  1561.       else
  1562.           echo "Unrecognized build system name ${build_alias}." 1>&2
  1563. --- 533,541 ----
  1564.   *)
  1565.       if result=`${config_shell} ${configsub} ${build_alias}` ; then
  1566.           buildopt="--build=${build_alias}"
  1567. !         build_cpu=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  1568. !         build_vendor=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  1569. !         build_os=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  1570.           build=${build_cpu}-${build_vendor}-${build_os}
  1571.       else
  1572.           echo "Unrecognized build system name ${build_alias}." 1>&2
  1573. ***************
  1574. *** 540,548 ****
  1575.       echo "Unrecognized host system name ${host_alias}." 1>&2
  1576.       exit 1
  1577.   fi
  1578. ! host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  1579. ! host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  1580. ! host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  1581.   host=${host_cpu}-${host_vendor}-${host_os}
  1582.   
  1583.   . ${tmpfile}.hst
  1584. --- 550,558 ----
  1585.       echo "Unrecognized host system name ${host_alias}." 1>&2
  1586.       exit 1
  1587.   fi
  1588. ! host_cpu=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  1589. ! host_vendor=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  1590. ! host_os=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  1591.   host=${host_cpu}-${host_vendor}-${host_os}
  1592.   
  1593.   . ${tmpfile}.hst
  1594. ***************
  1595. *** 553,561 ****
  1596.       echo "Unrecognized target system name ${target_alias}." 1>&2
  1597.       exit 1
  1598.   fi
  1599. ! target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  1600. ! target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  1601. ! target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  1602.   target=${target_cpu}-${target_vendor}-${target_os}
  1603.   
  1604.   . ${tmpfile}.tgt
  1605. --- 563,571 ----
  1606.       echo "Unrecognized target system name ${target_alias}." 1>&2
  1607.       exit 1
  1608.   fi
  1609. ! target_cpu=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  1610. ! target_vendor=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  1611. ! target_os=`/bin/echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  1612.   target=${target_cpu}-${target_vendor}-${target_os}
  1613.   
  1614.   . ${tmpfile}.tgt
  1615. ***************
  1616. *** 611,624 ****
  1617.       # ${subdir} is relative path from . to the directory we're currently
  1618.       # configuring.
  1619.       # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
  1620. !     invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
  1621.   
  1622.       ### figure out what to do with srcdir
  1623.       case "${srcdir}" in
  1624.           ".")  # no -srcdir option.  We're building in place.
  1625.                   makesrcdir=. ;;
  1626.           /*) # absolute path
  1627. !                 makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
  1628.                   ;;
  1629.           *) # otherwise relative
  1630.                   case "${subdir}" in
  1631. --- 621,634 ----
  1632.       # ${subdir} is relative path from . to the directory we're currently
  1633.       # configuring.
  1634.       # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
  1635. !     invsubdir=`/bin/echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
  1636.   
  1637.       ### figure out what to do with srcdir
  1638.       case "${srcdir}" in
  1639.           ".")  # no -srcdir option.  We're building in place.
  1640.                   makesrcdir=. ;;
  1641.           /*) # absolute path
  1642. !                 makesrcdir=`/bin/echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
  1643.                   ;;
  1644.           *) # otherwise relative
  1645.                   case "${subdir}" in
  1646. ***************
  1647. *** 846,852 ****
  1648.           # make sure that some sort of reasonable default exists for these 
  1649.           # two variables
  1650.           CXX=${CXX-"g++ -O"}
  1651. !         CC=${CC-cc}
  1652.   
  1653.               # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
  1654.               # remove any form feeds.
  1655. --- 856,862 ----
  1656.           # make sure that some sort of reasonable default exists for these 
  1657.           # two variables
  1658.           CXX=${CXX-"g++ -O"}
  1659. !         CC=${CC-gcc}
  1660.   
  1661.               # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
  1662.               # remove any form feeds.
  1663. ***************
  1664. *** 891,897 ****
  1665.           *) using="${using} and \"${site_makefile_frag}\"" ;;
  1666.           esac
  1667.   
  1668. !         newusing=`echo "${using}" | sed 's/and/using/'`
  1669.           using=${newusing}
  1670.           echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
  1671.   
  1672. --- 901,907 ----
  1673.           *) using="${using} and \"${site_makefile_frag}\"" ;;
  1674.           esac
  1675.   
  1676. !         newusing=`/bin/echo "${using}" | sed 's/and/using/'`
  1677.           using=${newusing}
  1678.           echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
  1679.   
  1680. ***************
  1681. *** 983,989 ****
  1682.   
  1683.   ### The recursion line is here.
  1684.               if [ ! -z "${recprog}" ] ; then
  1685. !                             if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
  1686.                                       ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
  1687.                                       ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect} ; then
  1688.                                       true
  1689. --- 993,1001 ----
  1690.   
  1691.   ### The recursion line is here.
  1692.               if [ ! -z "${recprog}" ] ; then
  1693. !                                 echo ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} ${prefixoption} ${tmpdiroption} ${exec_prefixoption} ${srcdiroption} ${program_prefixoption} ${program_suffixoption} \
  1694. !                     ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect}
  1695. !                     if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
  1696.                                       ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
  1697.                                       ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect} ; then
  1698.                                       true
  1699. diff -rc --new-file binutils-2.5.2/configure.in /gnu/src/amiga/binutils-2.5.2/configure.in
  1700. *** binutils-2.5.2/configure.in    Wed Nov  2 20:20:43 1994
  1701. --- /gnu/src/amiga/binutils-2.5.2/configure.in    Thu Nov 10 15:58:15 1994
  1702. ***************
  1703. *** 123,128 ****
  1704. --- 123,129 ----
  1705.     *-*-lynxos*)            host_makefile_frag=config/mh-lynxos ;;
  1706.     *-*-sysv4*)             host_makefile_frag=config/mh-sysv4 ;;
  1707.     *-*-sysv*)              host_makefile_frag=config/mh-sysv ;;
  1708. +   *-*-amigados*)      host_makefile_frag=config/mh-amigados ;;
  1709.   esac
  1710.   fi
  1711.   
  1712. diff -rc --new-file binutils-2.5.2/gas/Makefile.in /gnu/src/amiga/binutils-2.5.2/gas/Makefile.in
  1713. *** binutils-2.5.2/gas/Makefile.in    Wed Nov  2 20:17:06 1994
  1714. --- /gnu/src/amiga/binutils-2.5.2/gas/Makefile.in    Thu Nov 10 15:58:18 1994
  1715. ***************
  1716. *** 72,78 ****
  1717.   TEXI2DVI = texi2dvi
  1718.   RANLIB = ranlib
  1719.   CC = @CC@
  1720. ! CFLAGS = -g
  1721.   
  1722.   MAKEOVERRIDES=
  1723.   
  1724. --- 72,78 ----
  1725.   TEXI2DVI = texi2dvi
  1726.   RANLIB = ranlib
  1727.   CC = @CC@
  1728. ! CFLAGS =
  1729.   
  1730.   MAKEOVERRIDES=
  1731.   
  1732. ***************
  1733. *** 372,378 ****
  1734.      targ-env.h obj-format.h targ-cpu.h \
  1735.      struc-symbol.h write.h flonum.h bignum.h expr.h \
  1736.     frags.h hash.h read.h symbols.h tc.h obj.h input-file.h 
  1737. ! input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
  1738.     as.h targ-env.h obj-format.h \
  1739.     targ-cpu.h  struc-symbol.h \
  1740.     write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  1741. --- 372,378 ----
  1742.      targ-env.h obj-format.h targ-cpu.h \
  1743.      struc-symbol.h write.h flonum.h bignum.h expr.h \
  1744.     frags.h hash.h read.h symbols.h tc.h obj.h input-file.h 
  1745. ! input-scrub.o : input-scrub.c \
  1746.     as.h targ-env.h obj-format.h \
  1747.     targ-cpu.h  struc-symbol.h \
  1748.     write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  1749. diff -rc --new-file binutils-2.5.2/gas/as.c /gnu/src/amiga/binutils-2.5.2/gas/as.c
  1750. *** binutils-2.5.2/gas/as.c    Wed Oct 19 22:52:37 1994
  1751. --- /gnu/src/amiga/binutils-2.5.2/gas/as.c    Mon Nov 21 07:46:49 1994
  1752. ***************
  1753. *** 447,459 ****
  1754. --- 447,463 ----
  1755.     if (flag_print_statistics)
  1756.       {
  1757.         extern char **environ;
  1758. + #ifndef amigados
  1759.         char *lim = (char *) sbrk (0);
  1760. + #endif
  1761.         long run_time = get_run_time () - start_time;
  1762.   
  1763.         fprintf (stderr, "%s: total time in assembly: %ld.%06ld\n",
  1764.              myname, run_time / 1000000, run_time % 1000000);
  1765. + #ifndef amigados
  1766.         fprintf (stderr, "%s: data size %ld\n",
  1767.              myname, (long) (lim - (char *) &environ));
  1768. + #endif
  1769.       }
  1770.   
  1771.     /* Use exit instead of return, because under VMS environments they
  1772. diff -rc --new-file binutils-2.5.2/gas/config/tc-m68k.c /gnu/src/amiga/binutils-2.5.2/gas/config/tc-m68k.c
  1773. *** binutils-2.5.2/gas/config/tc-m68k.c    Thu Oct 27 23:11:43 1994
  1774. --- /gnu/src/amiga/binutils-2.5.2/gas/config/tc-m68k.c    Mon Nov 21 07:42:32 1994
  1775. ***************
  1776. *** 554,561 ****
  1777. --- 554,563 ----
  1778.     {"even", s_even, 0},
  1779.     {"skip", s_space, 0},
  1780.     {"proc", s_proc, 0},
  1781. + #ifndef amigados
  1782.   #ifdef TE_SUN3
  1783.     {"align", s_align_bytes, 0},
  1784. + #endif
  1785.   #endif
  1786.     {0, 0, 0}
  1787.   };
  1788. diff -rc --new-file binutils-2.5.2/gas/configure /gnu/src/amiga/binutils-2.5.2/gas/configure
  1789. *** binutils-2.5.2/gas/configure    Tue Nov  1 23:17:52 1994
  1790. --- /gnu/src/amiga/binutils-2.5.2/gas/configure    Thu Nov 10 16:39:59 1994
  1791. ***************
  1792. *** 1,7 ****
  1793.   #!/bin/sh
  1794.   
  1795.   # Guess values for system-dependent variables and create Makefiles.
  1796. ! # Generated automatically using autoconf version 2.0 
  1797.   # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  1798.   #
  1799.   # This configure script is free software; the Free Software Foundation
  1800. --- 1,7 ----
  1801.   #!/bin/sh
  1802.   
  1803.   # Guess values for system-dependent variables and create Makefiles.
  1804. ! # Generated automatically using autoconf version 2.1 
  1805.   # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  1806.   #
  1807.   # This configure script is free software; the Free Software Foundation
  1808. ***************
  1809. *** 9,50 ****
  1810.   
  1811.   # Defaults:
  1812.   ac_help=
  1813. ! ac_default_prefix=/usr/local
  1814.   # Any additions from configure.in:
  1815.   ac_help="$ac_help
  1816.       bfd-assembler    use BFD back end for writing object files"
  1817.   
  1818. - # Omit some internal or obsolete options to make the list less imposing.
  1819. - ac_usage="Usage: configure [options] [host]
  1820. - Options: [defaults in brackets after descriptions]
  1821. - Configuration:
  1822. -   --cache-file=FILE       cache test results in FILE
  1823. -   --help                  print this message
  1824. -   --no-create             do not create output files
  1825. -   --quiet, --silent       do not print \`checking...' messages
  1826. -   --version               print the version of autoconf that created configure
  1827. - Directory and file names:
  1828. -   --prefix=PREFIX         install architecture-independent files in PREFIX
  1829. -                           [$ac_default_prefix]
  1830. -   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  1831. -                           [same as prefix]
  1832. -   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  1833. -   --program-prefix=PREFIX prepend PREFIX to installed program names
  1834. -   --program-suffix=SUFFIX append SUFFIX to installed program names
  1835. -   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  1836. - Host type:
  1837. -   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  1838. -   --host=HOST             configure for HOST [guessed]
  1839. -   --target=TARGET         configure for TARGET [TARGET=HOST]
  1840. - Features and packages:
  1841. -   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1842. -   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  1843. -   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  1844. -   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  1845. -   --x-includes=DIR        X include files are in DIR
  1846. -   --x-libraries=DIR       X library files are in DIR
  1847. - --enable and --with options recognized:$ac_help"
  1848.   # Initialize some variables set by options.
  1849.   # The variables have the same names as the options, with
  1850.   # dashes changed to underlines.
  1851. --- 9,19 ----
  1852.   
  1853.   # Defaults:
  1854.   ac_help=
  1855. ! ac_default_prefix=/gnu
  1856.   # Any additions from configure.in:
  1857.   ac_help="$ac_help
  1858.       bfd-assembler    use BFD back end for writing object files"
  1859.   
  1860.   # Initialize some variables set by options.
  1861.   # The variables have the same names as the options, with
  1862.   # dashes changed to underlines.
  1863. ***************
  1864. *** 82,88 ****
  1865.     fi
  1866.   
  1867.     case "$ac_option" in
  1868. !   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  1869.     *) ac_optarg= ;;
  1870.     esac
  1871.   
  1872. --- 51,57 ----
  1873.     fi
  1874.   
  1875.     case "$ac_option" in
  1876. !   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  1877.     *) ac_optarg= ;;
  1878.     esac
  1879.   
  1880. ***************
  1881. *** 103,123 ****
  1882.       cache_file="$ac_optarg" ;;
  1883.   
  1884.     -disable-* | --disable-*)
  1885. !     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  1886.       # Reject names that are not valid shell variable names.
  1887. !     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  1888.         { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  1889.       fi
  1890. !     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  1891.       eval "enable_${ac_feature}=no" ;;
  1892.   
  1893.     -enable-* | --enable-*)
  1894. !     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  1895.       # Reject names that are not valid shell variable names.
  1896. !     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  1897.         { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  1898.       fi
  1899. !     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  1900.       case "$ac_option" in
  1901.         *=*) ;;
  1902.         *) ac_optarg=yes ;;
  1903. --- 72,92 ----
  1904.       cache_file="$ac_optarg" ;;
  1905.   
  1906.     -disable-* | --disable-*)
  1907. !     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  1908.       # Reject names that are not valid shell variable names.
  1909. !     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  1910.         { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  1911.       fi
  1912. !     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  1913.       eval "enable_${ac_feature}=no" ;;
  1914.   
  1915.     -enable-* | --enable-*)
  1916. !     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  1917.       # Reject names that are not valid shell variable names.
  1918. !     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  1919.         { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  1920.       fi
  1921. !     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  1922.       case "$ac_option" in
  1923.         *=*) ;;
  1924.         *) ac_optarg=yes ;;
  1925. ***************
  1926. *** 138,145 ****
  1927.       with_gas=yes ;;
  1928.   
  1929.     -help | --help | --hel | --he)
  1930.       cat << EOF
  1931. ! $ac_usage
  1932.   EOF
  1933.       exit 0 ;;
  1934.   
  1935. --- 107,144 ----
  1936.       with_gas=yes ;;
  1937.   
  1938.     -help | --help | --hel | --he)
  1939. +     # Omit some internal or obsolete options to make the list less imposing.
  1940. +     # This message is too long to be a string in the A/UX 3.1 sh.
  1941.       cat << EOF
  1942. ! Usage: configure [options] [host]
  1943. ! Options: [defaults in brackets after descriptions]
  1944. ! Configuration:
  1945. !   --cache-file=FILE       cache test results in FILE
  1946. !   --help                  print this message
  1947. !   --no-create             do not create output files
  1948. !   --quiet, --silent       do not print \`checking...' messages
  1949. !   --version               print the version of autoconf that created configure
  1950. ! Directory and file names:
  1951. !   --prefix=PREFIX         install architecture-independent files in PREFIX
  1952. !                           [$ac_default_prefix]
  1953. !   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  1954. !                           [same as prefix]
  1955. !   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  1956. !   --program-prefix=PREFIX prepend PREFIX to installed program names
  1957. !   --program-suffix=SUFFIX append SUFFIX to installed program names
  1958. !   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  1959. ! Host type:
  1960. !   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  1961. !   --host=HOST             configure for HOST [guessed]
  1962. !   --target=TARGET         configure for TARGET [TARGET=HOST]
  1963. ! Features and packages:
  1964. !   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1965. !   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  1966. !   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  1967. !   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  1968. !   --x-includes=DIR        X include files are in DIR
  1969. !   --x-libraries=DIR       X library files are in DIR
  1970. ! --enable and --with options recognized:$ac_help
  1971.   EOF
  1972.       exit 0 ;;
  1973.   
  1974. ***************
  1975. *** 219,234 ****
  1976.       verbose=yes ;;
  1977.   
  1978.     -version | --version | --versio | --versi | --vers)
  1979. !     echo "configure generated by autoconf version 2.0"
  1980.       exit 0 ;;
  1981.   
  1982.     -with-* | --with-*)
  1983. !     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  1984.       # Reject names that are not valid shell variable names.
  1985. !     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  1986.         { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  1987.       fi
  1988. !     ac_package=`echo $ac_package| sed 's/-/_/g'`
  1989.       case "$ac_option" in
  1990.         *=*) ;;
  1991.         *) ac_optarg=yes ;;
  1992. --- 218,233 ----
  1993.       verbose=yes ;;
  1994.   
  1995.     -version | --version | --versio | --versi | --vers)
  1996. !     echo "configure generated by autoconf version 2.1"
  1997.       exit 0 ;;
  1998.   
  1999.     -with-* | --with-*)
  2000. !     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  2001.       # Reject names that are not valid shell variable names.
  2002. !     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  2003.         { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  2004.       fi
  2005. !     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  2006.       case "$ac_option" in
  2007.         *=*) ;;
  2008.         *) ac_optarg=yes ;;
  2009. ***************
  2010. *** 236,247 ****
  2011.       eval "with_${ac_package}='$ac_optarg'" ;;
  2012.   
  2013.     -without-* | --without-*)
  2014. !     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  2015.       # Reject names that are not valid shell variable names.
  2016. !     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  2017.         { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  2018.       fi
  2019. !     ac_package=`echo $ac_package| sed 's/-/_/g'`
  2020.       eval "with_${ac_package}=no" ;;
  2021.   
  2022.     --x)
  2023. --- 235,246 ----
  2024.       eval "with_${ac_package}='$ac_optarg'" ;;
  2025.   
  2026.     -without-* | --without-*)
  2027. !     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  2028.       # Reject names that are not valid shell variable names.
  2029. !     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  2030.         { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  2031.       fi
  2032. !     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  2033.       eval "with_${ac_package}=no" ;;
  2034.   
  2035.     --x)
  2036. ***************
  2037. *** 266,272 ****
  2038.       ;;
  2039.   
  2040.     *) 
  2041. !     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  2042.         echo "configure: warning: $ac_option: invalid host type" 1>&2
  2043.       fi
  2044.       if test "x$nonopt" != xNONE; then
  2045. --- 265,271 ----
  2046.       ;;
  2047.   
  2048.     *) 
  2049. !     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  2050.         echo "configure: warning: $ac_option: invalid host type" 1>&2
  2051.       fi
  2052.       if test "x$nonopt" != xNONE; then
  2053. ***************
  2054. *** 279,285 ****
  2055.   done
  2056.   
  2057.   if test -n "$ac_prev"; then
  2058. !   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  2059.   fi
  2060.   
  2061.   trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  2062. --- 278,284 ----
  2063.   done
  2064.   
  2065.   if test -n "$ac_prev"; then
  2066. !   { echo "configure: error: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  2067.   fi
  2068.   
  2069.   trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  2070. ***************
  2071. *** 329,335 ****
  2072.   # confdefs.h avoids OS command line length limits that DEFS can exceed.
  2073.   rm -rf conftest* confdefs.h
  2074.   # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  2075. ! echo > confdefs.h
  2076.   
  2077.   # A filename unique to this package, relative to the directory that
  2078.   # configure is in, which we can look for to find out if srcdir is correct.
  2079. --- 328,334 ----
  2080.   # confdefs.h avoids OS command line length limits that DEFS can exceed.
  2081.   rm -rf conftest* confdefs.h
  2082.   # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  2083. ! /bin/echo > confdefs.h
  2084.   
  2085.   # A filename unique to this package, relative to the directory that
  2086.   # configure is in, which we can look for to find out if srcdir is correct.
  2087. ***************
  2088. *** 340,346 ****
  2089.     ac_srcdir_defaulted=yes
  2090.     # Try the directory containing this script, then its parent.
  2091.     ac_prog=$0
  2092. !   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  2093.     test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  2094.     srcdir=$ac_confdir
  2095.     if test ! -r $srcdir/$ac_unique_file; then
  2096. --- 339,345 ----
  2097.     ac_srcdir_defaulted=yes
  2098.     # Try the directory containing this script, then its parent.
  2099.     ac_prog=$0
  2100. !   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  2101.     test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  2102.     srcdir=$ac_confdir
  2103.     if test ! -r $srcdir/$ac_unique_file; then
  2104. ***************
  2105. *** 356,362 ****
  2106.       { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  2107.     fi
  2108.   fi
  2109. ! srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  2110.   
  2111.   # Prefer explicitly selected file to automatically selected ones.
  2112.   if test -z "$CONFIG_SITE"; then
  2113. --- 355,361 ----
  2114.       { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  2115.     fi
  2116.   fi
  2117. ! srcdir=`/bin/echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  2118.   
  2119.   # Prefer explicitly selected file to automatically selected ones.
  2120.   if test -z "$CONFIG_SITE"; then
  2121. ***************
  2122. *** 460,466 ****
  2123.   else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  2124.   fi
  2125.   
  2126. ! echo $ac_n "checking host system type""... $ac_c" 1>&4
  2127.   
  2128.   host_alias=$host
  2129.   case "$host_alias" in
  2130. --- 459,465 ----
  2131.   else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  2132.   fi
  2133.   
  2134. ! /bin/echo $ac_n "checking host system type""... $ac_c" 1>&4
  2135.   
  2136.   host_alias=$host
  2137.   case "$host_alias" in
  2138. ***************
  2139. *** 475,486 ****
  2140.   esac
  2141.   
  2142.   host=`$ac_config_sub $host_alias`
  2143. ! host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  2144. ! host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  2145. ! host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  2146. ! echo "$ac_t""$host" 1>&4
  2147.   
  2148. ! echo $ac_n "checking target system type""... $ac_c" 1>&4
  2149.   
  2150.   target_alias=$target
  2151.   case "$target_alias" in
  2152. --- 474,485 ----
  2153.   esac
  2154.   
  2155.   host=`$ac_config_sub $host_alias`
  2156. ! host_cpu=`/bin/echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  2157. ! host_vendor=`/bin/echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  2158. ! host_os=`/bin/echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  2159. ! /bin/echo "$ac_t""$host" 1>&4
  2160.   
  2161. ! /bin/echo $ac_n "checking target system type""... $ac_c" 1>&4
  2162.   
  2163.   target_alias=$target
  2164.   case "$target_alias" in
  2165. ***************
  2166. *** 492,503 ****
  2167.   esac
  2168.   
  2169.   target=`$ac_config_sub $target_alias`
  2170. ! target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  2171. ! target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  2172. ! target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  2173. ! echo "$ac_t""$target" 1>&4
  2174.   
  2175. ! echo $ac_n "checking build system type""... $ac_c" 1>&4
  2176.   
  2177.   build_alias=$build
  2178.   case "$build_alias" in
  2179. --- 491,502 ----
  2180.   esac
  2181.   
  2182.   target=`$ac_config_sub $target_alias`
  2183. ! target_cpu=`/bin/echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  2184. ! target_vendor=`/bin/echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  2185. ! target_os=`/bin/echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  2186. ! /bin/echo "$ac_t""$target" 1>&4
  2187.   
  2188. ! /bin/echo $ac_n "checking build system type""... $ac_c" 1>&4
  2189.   
  2190.   build_alias=$build
  2191.   case "$build_alias" in
  2192. ***************
  2193. *** 509,518 ****
  2194.   esac
  2195.   
  2196.   build=`$ac_config_sub $build_alias`
  2197. ! build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  2198. ! build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  2199. ! build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  2200. ! echo "$ac_t""$build" 1>&4
  2201.   
  2202.   test "$host_alias" != "$target_alias" &&
  2203.     test "$program_prefix$program_suffix$program_transform_name" = \
  2204. --- 508,517 ----
  2205.   esac
  2206.   
  2207.   build=`$ac_config_sub $build_alias`
  2208. ! build_cpu=`/bin/echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  2209. ! build_vendor=`/bin/echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  2210. ! build_os=`/bin/echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  2211. ! /bin/echo "$ac_t""$build" 1>&4
  2212.   
  2213.   test "$host_alias" != "$target_alias" &&
  2214.     test "$program_prefix$program_suffix$program_transform_name" = \
  2215. ***************
  2216. *** 523,529 ****
  2217.   else
  2218.     # Double any \ or $.
  2219.     echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
  2220. !   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  2221.     rm -f conftestsed
  2222.   fi
  2223.   test "$program_prefix" != NONE &&
  2224. --- 522,528 ----
  2225.   else
  2226.     # Double any \ or $.
  2227.     echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
  2228. !   program_transform_name="`/bin/echo $program_transform_name|sed -f conftestsed`"
  2229.     rm -f conftestsed
  2230.   fi
  2231.   test "$program_prefix" != NONE &&
  2232. ***************
  2233. *** 621,627 ****
  2234.     i960-*-vxworks5.*)    obj_format=coff emulation=ic960 gas_target=ic960coff ;;
  2235.     i960-*-vxworks*)    obj_format=bout ;;
  2236.   
  2237. !   m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*)
  2238.               obj_format=aout emulation=sun3 ;;
  2239.     m68k-motorola-sysv)    obj_format=coff gas_target=m68kcoff emulation=delta ;;
  2240.     m68k-bull-sysv3*)    obj_format=coff gas_target=m68kcoff emulation=dpx2 ;;
  2241. --- 620,626 ----
  2242.     i960-*-vxworks5.*)    obj_format=coff emulation=ic960 gas_target=ic960coff ;;
  2243.     i960-*-vxworks*)    obj_format=bout ;;
  2244.   
  2245. !   m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos* | m68*-cbm-amigados*)
  2246.               obj_format=aout emulation=sun3 ;;
  2247.     m68k-motorola-sysv)    obj_format=coff gas_target=m68kcoff emulation=delta ;;
  2248.     m68k-bull-sysv3*)    obj_format=coff gas_target=m68kcoff emulation=dpx2 ;;
  2249. ***************
  2250. *** 816,825 ****
  2251.   EOF
  2252.   
  2253.   
  2254. ! echo $ac_n "checking for CC""... $ac_c" 1>&4
  2255.   test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'`
  2256.   test -z "$CC" && CC=cc
  2257. ! echo "$ac_t""setting CC to $CC" 1>&4
  2258.   
  2259.   # Find out if we are using GNU C, under whatever name.
  2260.   cat > conftest.c <<EOF
  2261. --- 815,824 ----
  2262.   EOF
  2263.   
  2264.   
  2265. ! /bin/echo $ac_n "checking for CC""... $ac_c" 1>&4
  2266.   test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'`
  2267.   test -z "$CC" && CC=cc
  2268. ! /bin/echo "$ac_t""setting CC to $CC" 1>&4
  2269.   
  2270.   # Find out if we are using GNU C, under whatever name.
  2271.   cat > conftest.c <<EOF
  2272. ***************
  2273. *** 845,859 ****
  2274.   # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2275.   # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2276.   # ./install, which can be erroneously created by make from ./install.sh.
  2277. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  2278.   if test -z "$INSTALL"; then
  2279.   if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  2280. !   echo $ac_n "(cached) $ac_c" 1>&4
  2281.   else
  2282.       IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2283.     for ac_dir in $PATH; do
  2284.       case "$ac_dir" in
  2285. !     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  2286.       *)
  2287.         # OSF1 and SCO ODT 3.0 have their own names for install.
  2288.         for ac_prog in ginstall installbsd scoinst install; do
  2289. --- 844,858 ----
  2290.   # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2291.   # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2292.   # ./install, which can be erroneously created by make from ./install.sh.
  2293. ! /bin/echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  2294.   if test -z "$INSTALL"; then
  2295.   if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  2296. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2297.   else
  2298.       IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2299.     for ac_dir in $PATH; do
  2300.       case "$ac_dir" in
  2301. !     ''|.|/gnu/etc) ;;
  2302.       *)
  2303.         # OSF1 and SCO ODT 3.0 have their own names for install.
  2304.         for ac_prog in ginstall installbsd scoinst install; do
  2305. ***************
  2306. *** 878,884 ****
  2307.   fi
  2308.     INSTALL="$ac_cv_path_install"
  2309.   fi
  2310. ! echo "$ac_t""$INSTALL" 1>&4
  2311.   
  2312.   # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2313.   # It thinks the first close brace ends the variable substitution.
  2314. --- 877,883 ----
  2315.   fi
  2316.     INSTALL="$ac_cv_path_install"
  2317.   fi
  2318. ! /bin/echo "$ac_t""$INSTALL" 1>&4
  2319.   
  2320.   # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2321.   # It thinks the first close brace ends the variable substitution.
  2322. ***************
  2323. *** 887,900 ****
  2324.   test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2325.   
  2326.   
  2327. ! echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  2328.   # On Suns, sometimes $CPP names a directory.
  2329.   if test -n "$CPP" && test -d "$CPP"; then
  2330.     CPP=
  2331.   fi
  2332.   if test -z "$CPP"; then
  2333.   if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  2334. !   echo $ac_n "(cached) $ac_c" 1>&4
  2335.   else
  2336.       # This must be in double quotes, not single quotes, because CPP may get
  2337.     # substituted into the Makefile and "${CC-cc}" will confuse make.
  2338. --- 886,899 ----
  2339.   test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2340.   
  2341.   
  2342. ! /bin/echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  2343.   # On Suns, sometimes $CPP names a directory.
  2344.   if test -n "$CPP" && test -d "$CPP"; then
  2345.     CPP=
  2346.   fi
  2347.   if test -z "$CPP"; then
  2348.   if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  2349. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2350.   else
  2351.       # This must be in double quotes, not single quotes, because CPP may get
  2352.     # substituted into the Makefile and "${CC-cc}" will confuse make.
  2353. ***************
  2354. *** 902,908 ****
  2355.     # On the NeXT, cc -E runs the code through the compiler's parser,
  2356.     # not just through cpp.
  2357.     cat > conftest.$ac_ext <<EOF
  2358. ! #line 906 "configure"
  2359.   #include "confdefs.h"
  2360.   #include <assert.h>
  2361.   Syntax Error
  2362. --- 901,907 ----
  2363.     # On the NeXT, cc -E runs the code through the compiler's parser,
  2364.     # not just through cpp.
  2365.     cat > conftest.$ac_ext <<EOF
  2366. ! #line 905 "configure"
  2367.   #include "confdefs.h"
  2368.   #include <assert.h>
  2369.   Syntax Error
  2370. ***************
  2371. *** 912,922 ****
  2372.   if test -z "$ac_err"; then
  2373.     :
  2374.   else
  2375. !   echo "$ac_err" >&5
  2376.     rm -rf conftest*
  2377.     CPP="${CC-cc} -E -traditional-cpp"
  2378.     cat > conftest.$ac_ext <<EOF
  2379. ! #line 920 "configure"
  2380.   #include "confdefs.h"
  2381.   #include <assert.h>
  2382.   Syntax Error
  2383. --- 911,921 ----
  2384.   if test -z "$ac_err"; then
  2385.     :
  2386.   else
  2387. !   /bin/echo "$ac_err" >&5
  2388.     rm -rf conftest*
  2389.     CPP="${CC-cc} -E -traditional-cpp"
  2390.     cat > conftest.$ac_ext <<EOF
  2391. ! #line 919 "configure"
  2392.   #include "confdefs.h"
  2393.   #include <assert.h>
  2394.   Syntax Error
  2395. ***************
  2396. *** 926,932 ****
  2397.   if test -z "$ac_err"; then
  2398.     :
  2399.   else
  2400. !   echo "$ac_err" >&5
  2401.     rm -rf conftest*
  2402.     CPP=/lib/cpp
  2403.   fi
  2404. --- 925,931 ----
  2405.   if test -z "$ac_err"; then
  2406.     :
  2407.   else
  2408. !   /bin/echo "$ac_err" >&5
  2409.     rm -rf conftest*
  2410.     CPP=/lib/cpp
  2411.   fi
  2412. ***************
  2413. *** 937,953 ****
  2414.   fi
  2415.   fi
  2416.   CPP="$ac_cv_prog_CPP"
  2417. ! echo "$ac_t""$CPP" 1>&4
  2418.   
  2419.   for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
  2420.   do
  2421. ! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2422. ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2423.   if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2424. !   echo $ac_n "(cached) $ac_c" 1>&4
  2425.   else
  2426.     cat > conftest.$ac_ext <<EOF
  2427. ! #line 951 "configure"
  2428.   #include "confdefs.h"
  2429.   #include <$ac_hdr>
  2430.   EOF
  2431. --- 936,952 ----
  2432.   fi
  2433.   fi
  2434.   CPP="$ac_cv_prog_CPP"
  2435. ! /bin/echo "$ac_t""$CPP" 1>&4
  2436.   
  2437.   for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
  2438.   do
  2439. ! ac_safe=`/bin/echo "$ac_hdr" | tr './\055' '___'`
  2440. ! /bin/echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2441.   if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2442. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2443.   else
  2444.     cat > conftest.$ac_ext <<EOF
  2445. ! #line 950 "configure"
  2446.   #include "confdefs.h"
  2447.   #include <$ac_hdr>
  2448.   EOF
  2449. ***************
  2450. *** 957,984 ****
  2451.     rm -rf conftest*
  2452.     eval "ac_cv_header_$ac_safe=yes"
  2453.   else
  2454. !   echo "$ac_err" >&5
  2455.     rm -rf conftest*
  2456.     eval "ac_cv_header_$ac_safe=no"
  2457.   fi
  2458.   rm -f conftest*
  2459.   fi
  2460.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2461. !   echo "$ac_t""yes" 1>&4
  2462. !     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2463.     cat >> confdefs.h <<EOF
  2464.   #define $ac_tr_hdr 1
  2465.   EOF
  2466.    
  2467.   else
  2468. !   echo "$ac_t""no" 1>&4
  2469.   fi
  2470.   done
  2471.   
  2472.   
  2473.   # Put this here so that autoconf's "cross-compiling" message doesn't confuse
  2474.   # people who are not cross-compiling but are compiling cross-assemblers.
  2475. ! echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&4
  2476.   if test "${host}" = "${target}"; then
  2477.     cross_gas=no
  2478.   else
  2479. --- 956,983 ----
  2480.     rm -rf conftest*
  2481.     eval "ac_cv_header_$ac_safe=yes"
  2482.   else
  2483. !   /bin/echo "$ac_err" >&5
  2484.     rm -rf conftest*
  2485.     eval "ac_cv_header_$ac_safe=no"
  2486.   fi
  2487.   rm -f conftest*
  2488.   fi
  2489.   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2490. !   /bin/echo "$ac_t""yes" 1>&4
  2491. !     ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2492.     cat >> confdefs.h <<EOF
  2493.   #define $ac_tr_hdr 1
  2494.   EOF
  2495.    
  2496.   else
  2497. !   /bin/echo "$ac_t""no" 1>&4
  2498.   fi
  2499.   done
  2500.   
  2501.   
  2502.   # Put this here so that autoconf's "cross-compiling" message doesn't confuse
  2503.   # people who are not cross-compiling but are compiling cross-assemblers.
  2504. ! /bin/echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&4
  2505.   if test "${host}" = "${target}"; then
  2506.     cross_gas=no
  2507.   else
  2508. ***************
  2509. *** 988,1005 ****
  2510.   EOF
  2511.   
  2512.   fi
  2513. ! echo "$ac_t""$cross_gas" 1>&4
  2514.   
  2515.   # If we cannot run a trivial program, we must be cross compiling.
  2516. ! echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  2517.   if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  2518. !   echo $ac_n "(cached) $ac_c" 1>&4
  2519.   else
  2520.     if test "$cross_compiling" = yes; then
  2521.     ac_cv_cross=yes
  2522.   else
  2523.   cat > conftest.$ac_ext <<EOF
  2524. ! #line 1003 "configure"
  2525.   #include "confdefs.h"
  2526.   main(){return(0);}
  2527.   EOF
  2528. --- 987,1004 ----
  2529.   EOF
  2530.   
  2531.   fi
  2532. ! /bin/echo "$ac_t""$cross_gas" 1>&4
  2533.   
  2534.   # If we cannot run a trivial program, we must be cross compiling.
  2535. ! /bin/echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  2536.   if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  2537. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2538.   else
  2539.     if test "$cross_compiling" = yes; then
  2540.     ac_cv_cross=yes
  2541.   else
  2542.   cat > conftest.$ac_ext <<EOF
  2543. ! #line 1002 "configure"
  2544.   #include "confdefs.h"
  2545.   main(){return(0);}
  2546.   EOF
  2547. ***************
  2548. *** 1013,1028 ****
  2549.   rm -fr conftest*
  2550.   fi
  2551.   cross_compiling=$ac_cv_c_cross
  2552. ! echo "$ac_t""$ac_cv_c_cross" 1>&4
  2553.   
  2554.   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2555.   # for constant arguments.  Useless!
  2556. ! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4
  2557.   if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
  2558. !   echo $ac_n "(cached) $ac_c" 1>&4
  2559.   else
  2560.     cat > conftest.$ac_ext <<EOF
  2561. ! #line 1026 "configure"
  2562.   #include "confdefs.h"
  2563.   #include <alloca.h>
  2564.   int main() { return 0; }
  2565. --- 1012,1027 ----
  2566.   rm -fr conftest*
  2567.   fi
  2568.   cross_compiling=$ac_cv_c_cross
  2569. ! /bin/echo "$ac_t""$ac_cv_c_cross" 1>&4
  2570.   
  2571.   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2572.   # for constant arguments.  Useless!
  2573. ! /bin/echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4
  2574.   if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
  2575. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2576.   else
  2577.     cat > conftest.$ac_ext <<EOF
  2578. ! #line 1025 "configure"
  2579.   #include "confdefs.h"
  2580.   #include <alloca.h>
  2581.   int main() { return 0; }
  2582. ***************
  2583. *** 1040,1046 ****
  2584.   rm -f conftest*
  2585.   
  2586.   fi
  2587. ! echo "$ac_t""$ac_cv_header_alloca_h" 1>&4
  2588.   if test $ac_cv_header_alloca_h = yes; then
  2589.     cat >> confdefs.h <<\EOF
  2590.   #define HAVE_ALLOCA_H 1
  2591. --- 1039,1045 ----
  2592.   rm -f conftest*
  2593.   
  2594.   fi
  2595. ! /bin/echo "$ac_t""$ac_cv_header_alloca_h" 1>&4
  2596.   if test $ac_cv_header_alloca_h = yes; then
  2597.     cat >> confdefs.h <<\EOF
  2598.   #define HAVE_ALLOCA_H 1
  2599. ***************
  2600. *** 1048,1059 ****
  2601.   
  2602.   fi
  2603.   
  2604. ! echo $ac_n "checking for alloca""... $ac_c" 1>&4
  2605.   if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
  2606. !   echo $ac_n "(cached) $ac_c" 1>&4
  2607.   else
  2608.     cat > conftest.$ac_ext <<EOF
  2609. ! #line 1057 "configure"
  2610.   #include "confdefs.h"
  2611.   
  2612.   #ifdef __GNUC__
  2613. --- 1047,1058 ----
  2614.   
  2615.   fi
  2616.   
  2617. ! /bin/echo $ac_n "checking for alloca""... $ac_c" 1>&4
  2618.   if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
  2619. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2620.   else
  2621.     cat > conftest.$ac_ext <<EOF
  2622. ! #line 1056 "configure"
  2623.   #include "confdefs.h"
  2624.   
  2625.   #ifdef __GNUC__
  2626. ***************
  2627. *** 1087,1093 ****
  2628.   rm -f conftest*
  2629.   
  2630.   fi
  2631. ! echo "$ac_t""$ac_cv_func_alloca" 1>&4
  2632.   if test $ac_cv_func_alloca = yes; then
  2633.     cat >> confdefs.h <<\EOF
  2634.   #define HAVE_ALLOCA 1
  2635. --- 1086,1092 ----
  2636.   rm -f conftest*
  2637.   
  2638.   fi
  2639. ! /bin/echo "$ac_t""$ac_cv_func_alloca" 1>&4
  2640.   if test $ac_cv_func_alloca = yes; then
  2641.     cat >> confdefs.h <<\EOF
  2642.   #define HAVE_ALLOCA 1
  2643. ***************
  2644. *** 1106,1117 ****
  2645.   EOF
  2646.   
  2647.   
  2648. ! echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4
  2649.   if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
  2650. !   echo $ac_n "(cached) $ac_c" 1>&4
  2651.   else
  2652.     cat > conftest.$ac_ext <<EOF
  2653. ! #line 1115 "configure"
  2654.   #include "confdefs.h"
  2655.   #if defined(CRAY) && ! defined(CRAY2)
  2656.   webecray
  2657. --- 1105,1116 ----
  2658.   EOF
  2659.   
  2660.   
  2661. ! /bin/echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4
  2662.   if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
  2663. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2664.   else
  2665.     cat > conftest.$ac_ext <<EOF
  2666. ! #line 1114 "configure"
  2667.   #include "confdefs.h"
  2668.   #if defined(CRAY) && ! defined(CRAY2)
  2669.   webecray
  2670. ***************
  2671. *** 1131,1146 ****
  2672.   rm -f conftest*
  2673.   
  2674.   fi
  2675. ! echo "$ac_t""$ac_cv_os_cray" 1>&4
  2676.   if test $ac_cv_os_cray = yes; then
  2677. ! echo $ac_n "checking for _getb67""... $ac_c" 1>&4
  2678.   if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
  2679. !   echo $ac_n "(cached) $ac_c" 1>&4
  2680.   else
  2681.     cat > conftest.$ac_ext <<EOF
  2682. ! #line 1142 "configure"
  2683.   #include "confdefs.h"
  2684.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2685.   int main() { return 0; }
  2686.   int t() {
  2687.   
  2688. --- 1130,1148 ----
  2689.   rm -f conftest*
  2690.   
  2691.   fi
  2692. ! /bin/echo "$ac_t""$ac_cv_os_cray" 1>&4
  2693.   if test $ac_cv_os_cray = yes; then
  2694. ! /bin/echo $ac_n "checking for _getb67""... $ac_c" 1>&4
  2695.   if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
  2696. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2697.   else
  2698.     cat > conftest.$ac_ext <<EOF
  2699. ! #line 1141 "configure"
  2700.   #include "confdefs.h"
  2701.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2702. + /* Override any gcc2 internal prototype to avoid an error.  */
  2703. + char _getb67(); 
  2704.   int main() { return 0; }
  2705.   int t() {
  2706.   
  2707. ***************
  2708. *** 1150,1157 ****
  2709.   #if defined (__stub__getb67) || defined (__stub____getb67)
  2710.   choke me
  2711.   #else
  2712. ! /* Override any gcc2 internal prototype to avoid an error.  */
  2713. ! char _getb67(); _getb67();
  2714.   #endif
  2715.   
  2716.   ; return 0; }
  2717. --- 1152,1158 ----
  2718.   #if defined (__stub__getb67) || defined (__stub____getb67)
  2719.   choke me
  2720.   #else
  2721. ! _getb67();
  2722.   #endif
  2723.   
  2724.   ; return 0; }
  2725. ***************
  2726. *** 1167,1187 ****
  2727.   
  2728.   fi
  2729.   if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
  2730. !   echo "$ac_t""yes" 1>&4
  2731.     cat >> confdefs.h <<\EOF
  2732.   #define CRAY_STACKSEG_END _getb67
  2733.   EOF
  2734.   
  2735.   else
  2736. !   echo "$ac_t""no" 1>&4
  2737. ! echo $ac_n "checking for GETB67""... $ac_c" 1>&4
  2738.   if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
  2739. !   echo $ac_n "(cached) $ac_c" 1>&4
  2740.   else
  2741.     cat > conftest.$ac_ext <<EOF
  2742. ! #line 1183 "configure"
  2743.   #include "confdefs.h"
  2744.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2745.   int main() { return 0; }
  2746.   int t() {
  2747.   
  2748. --- 1168,1191 ----
  2749.   
  2750.   fi
  2751.   if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
  2752. !   /bin/echo "$ac_t""yes" 1>&4
  2753.     cat >> confdefs.h <<\EOF
  2754.   #define CRAY_STACKSEG_END _getb67
  2755.   EOF
  2756.   
  2757.   else
  2758. !   /bin/echo "$ac_t""no" 1>&4
  2759. ! /bin/echo $ac_n "checking for GETB67""... $ac_c" 1>&4
  2760.   if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
  2761. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2762.   else
  2763.     cat > conftest.$ac_ext <<EOF
  2764. ! #line 1184 "configure"
  2765.   #include "confdefs.h"
  2766.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2767. + /* Override any gcc2 internal prototype to avoid an error.  */
  2768. + char GETB67(); 
  2769.   int main() { return 0; }
  2770.   int t() {
  2771.   
  2772. ***************
  2773. *** 1191,1198 ****
  2774.   #if defined (__stub_GETB67) || defined (__stub___GETB67)
  2775.   choke me
  2776.   #else
  2777. ! /* Override any gcc2 internal prototype to avoid an error.  */
  2778. ! char GETB67(); GETB67();
  2779.   #endif
  2780.   
  2781.   ; return 0; }
  2782. --- 1195,1201 ----
  2783.   #if defined (__stub_GETB67) || defined (__stub___GETB67)
  2784.   choke me
  2785.   #else
  2786. ! GETB67();
  2787.   #endif
  2788.   
  2789.   ; return 0; }
  2790. ***************
  2791. *** 1208,1228 ****
  2792.   
  2793.   fi
  2794.   if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
  2795. !   echo "$ac_t""yes" 1>&4
  2796.     cat >> confdefs.h <<\EOF
  2797.   #define CRAY_STACKSEG_END GETB67
  2798.   EOF
  2799.   
  2800.   else
  2801. !   echo "$ac_t""no" 1>&4
  2802. ! echo $ac_n "checking for getb67""... $ac_c" 1>&4
  2803.   if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
  2804. !   echo $ac_n "(cached) $ac_c" 1>&4
  2805.   else
  2806.     cat > conftest.$ac_ext <<EOF
  2807. ! #line 1224 "configure"
  2808.   #include "confdefs.h"
  2809.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2810.   int main() { return 0; }
  2811.   int t() {
  2812.   
  2813. --- 1211,1234 ----
  2814.   
  2815.   fi
  2816.   if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
  2817. !   /bin/echo "$ac_t""yes" 1>&4
  2818.     cat >> confdefs.h <<\EOF
  2819.   #define CRAY_STACKSEG_END GETB67
  2820.   EOF
  2821.   
  2822.   else
  2823. !   /bin/echo "$ac_t""no" 1>&4
  2824. ! /bin/echo $ac_n "checking for getb67""... $ac_c" 1>&4
  2825.   if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
  2826. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2827.   else
  2828.     cat > conftest.$ac_ext <<EOF
  2829. ! #line 1227 "configure"
  2830.   #include "confdefs.h"
  2831.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2832. + /* Override any gcc2 internal prototype to avoid an error.  */
  2833. + char getb67(); 
  2834.   int main() { return 0; }
  2835.   int t() {
  2836.   
  2837. ***************
  2838. *** 1232,1239 ****
  2839.   #if defined (__stub_getb67) || defined (__stub___getb67)
  2840.   choke me
  2841.   #else
  2842. ! /* Override any gcc2 internal prototype to avoid an error.  */
  2843. ! char getb67(); getb67();
  2844.   #endif
  2845.   
  2846.   ; return 0; }
  2847. --- 1238,1244 ----
  2848.   #if defined (__stub_getb67) || defined (__stub___getb67)
  2849.   choke me
  2850.   #else
  2851. ! getb67();
  2852.   #endif
  2853.   
  2854.   ; return 0; }
  2855. ***************
  2856. *** 1249,1261 ****
  2857.   
  2858.   fi
  2859.   if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
  2860. !   echo "$ac_t""yes" 1>&4
  2861.     cat >> confdefs.h <<\EOF
  2862.   #define CRAY_STACKSEG_END getb67
  2863.   EOF
  2864.   
  2865.   else
  2866. !   echo "$ac_t""no" 1>&4
  2867.   fi
  2868.   
  2869.   fi
  2870. --- 1254,1266 ----
  2871.   
  2872.   fi
  2873.   if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
  2874. !   /bin/echo "$ac_t""yes" 1>&4
  2875.     cat >> confdefs.h <<\EOF
  2876.   #define CRAY_STACKSEG_END getb67
  2877.   EOF
  2878.   
  2879.   else
  2880. !   /bin/echo "$ac_t""no" 1>&4
  2881.   fi
  2882.   
  2883.   fi
  2884. ***************
  2885. *** 1264,1278 ****
  2886.   
  2887.   fi
  2888.   
  2889. ! echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4
  2890.   if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then
  2891. !   echo $ac_n "(cached) $ac_c" 1>&4
  2892.   else
  2893.     if test "$cross_compiling" = yes; then
  2894.     ac_cv_c_stack_direction=0
  2895.   else
  2896.   cat > conftest.$ac_ext <<EOF
  2897. ! #line 1276 "configure"
  2898.   #include "confdefs.h"
  2899.   find_stack_direction ()
  2900.   {
  2901. --- 1269,1283 ----
  2902.   
  2903.   fi
  2904.   
  2905. ! /bin/echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4
  2906.   if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then
  2907. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2908.   else
  2909.     if test "$cross_compiling" = yes; then
  2910.     ac_cv_c_stack_direction=0
  2911.   else
  2912.   cat > conftest.$ac_ext <<EOF
  2913. ! #line 1281 "configure"
  2914.   #include "confdefs.h"
  2915.   find_stack_direction ()
  2916.   {
  2917. ***************
  2918. *** 1300,1319 ****
  2919.   fi
  2920.   rm -fr conftest*
  2921.   fi
  2922. ! echo "$ac_t""$ac_cv_c_stack_direction" 1>&4
  2923.   cat >> confdefs.h <<EOF
  2924.   #define STACK_DIRECTION $ac_cv_c_stack_direction
  2925.   EOF
  2926.   
  2927.   fi
  2928.   
  2929. ! echo $ac_n "checking for inline""... $ac_c" 1>&4
  2930.   if eval "test \"`echo '${'ac_cv_c_inline'+set}'`\" = set"; then
  2931. !   echo $ac_n "(cached) $ac_c" 1>&4
  2932.   else
  2933.     if test "$GCC" = yes; then
  2934.   cat > conftest.$ac_ext <<EOF
  2935. ! #line 1317 "configure"
  2936.   #include "confdefs.h"
  2937.   
  2938.   int main() { return 0; }
  2939. --- 1305,1324 ----
  2940.   fi
  2941.   rm -fr conftest*
  2942.   fi
  2943. ! /bin/echo "$ac_t""$ac_cv_c_stack_direction" 1>&4
  2944.   cat >> confdefs.h <<EOF
  2945.   #define STACK_DIRECTION $ac_cv_c_stack_direction
  2946.   EOF
  2947.   
  2948.   fi
  2949.   
  2950. ! /bin/echo $ac_n "checking for inline""... $ac_c" 1>&4
  2951.   if eval "test \"`echo '${'ac_cv_c_inline'+set}'`\" = set"; then
  2952. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  2953.   else
  2954.     if test "$GCC" = yes; then
  2955.   cat > conftest.$ac_ext <<EOF
  2956. ! #line 1322 "configure"
  2957.   #include "confdefs.h"
  2958.   
  2959.   int main() { return 0; }
  2960. ***************
  2961. *** 1334,1340 ****
  2962.     ac_cv_c_inline=no
  2963.   fi
  2964.   fi
  2965. ! echo "$ac_t""$ac_cv_c_inline" 1>&4
  2966.   if test $ac_cv_c_inline = no; then
  2967.     cat >> confdefs.h <<\EOF
  2968.   #define inline __inline
  2969. --- 1339,1345 ----
  2970.     ac_cv_c_inline=no
  2971.   fi
  2972.   fi
  2973. ! /bin/echo "$ac_t""$ac_cv_c_inline" 1>&4
  2974.   if test $ac_cv_c_inline = no; then
  2975.     cat >> confdefs.h <<\EOF
  2976.   #define inline __inline
  2977. ***************
  2978. *** 1346,1359 ****
  2979.   # VMS doesn't have unlink.
  2980.   for ac_func in unlink remove
  2981.   do
  2982. ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  2983.   if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2984. !   echo $ac_n "(cached) $ac_c" 1>&4
  2985.   else
  2986.     cat > conftest.$ac_ext <<EOF
  2987. ! #line 1355 "configure"
  2988.   #include "confdefs.h"
  2989.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2990.   int main() { return 0; }
  2991.   int t() {
  2992.   
  2993. --- 1351,1367 ----
  2994.   # VMS doesn't have unlink.
  2995.   for ac_func in unlink remove
  2996.   do
  2997. ! /bin/echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  2998.   if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2999. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  3000.   else
  3001.     cat > conftest.$ac_ext <<EOF
  3002. ! #line 1360 "configure"
  3003.   #include "confdefs.h"
  3004.   #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  3005. + /* Override any gcc2 internal prototype to avoid an error.  */
  3006. + char $ac_func(); 
  3007.   int main() { return 0; }
  3008.   int t() {
  3009.   
  3010. ***************
  3011. *** 1363,1370 ****
  3012.   #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3013.   choke me
  3014.   #else
  3015. ! /* Override any gcc2 internal prototype to avoid an error.  */
  3016. ! char $ac_func(); $ac_func();
  3017.   #endif
  3018.   
  3019.   ; return 0; }
  3020. --- 1371,1377 ----
  3021.   #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3022.   choke me
  3023.   #else
  3024. ! $ac_func();
  3025.   #endif
  3026.   
  3027.   ; return 0; }
  3028. ***************
  3029. *** 1380,1393 ****
  3030.   
  3031.   fi
  3032.   if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3033. !   echo "$ac_t""yes" 1>&4
  3034. !     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  3035.     cat >> confdefs.h <<EOF
  3036.   #define $ac_tr_func 1
  3037.   EOF
  3038.    break
  3039.   else
  3040. !   echo "$ac_t""no" 1>&4
  3041.   fi
  3042.   done
  3043.   
  3044. --- 1387,1400 ----
  3045.   
  3046.   fi
  3047.   if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3048. !   /bin/echo "$ac_t""yes" 1>&4
  3049. !     ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  3050.     cat >> confdefs.h <<EOF
  3051.   #define $ac_tr_func 1
  3052.   EOF
  3053.    break
  3054.   else
  3055. !   /bin/echo "$ac_t""no" 1>&4
  3056.   fi
  3057.   done
  3058.   
  3059. ***************
  3060. *** 1395,1406 ****
  3061.   # Some non-ANSI preprocessors botch requoting inside strings.  That's bad
  3062.   # enough, but on some of those systems, the assert macro relies on requoting
  3063.   # working properly!
  3064. ! echo $ac_n "checking for working assert macro""... $ac_c" 1>&4
  3065.   if eval "test \"`echo '${'gas_cv_assert_ok'+set}'`\" = set"; then
  3066. !   echo $ac_n "(cached) $ac_c" 1>&4
  3067.   else
  3068.     cat > conftest.$ac_ext <<EOF
  3069. ! #line 1404 "configure"
  3070.   #include "confdefs.h"
  3071.   #include <assert.h>
  3072.   #include <stdio.h>
  3073. --- 1402,1413 ----
  3074.   # Some non-ANSI preprocessors botch requoting inside strings.  That's bad
  3075.   # enough, but on some of those systems, the assert macro relies on requoting
  3076.   # working properly!
  3077. ! /bin/echo $ac_n "checking for working assert macro""... $ac_c" 1>&4
  3078.   if eval "test \"`echo '${'gas_cv_assert_ok'+set}'`\" = set"; then
  3079. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  3080.   else
  3081.     cat > conftest.$ac_ext <<EOF
  3082. ! #line 1411 "configure"
  3083.   #include "confdefs.h"
  3084.   #include <assert.h>
  3085.   #include <stdio.h>
  3086. ***************
  3087. *** 1427,1433 ****
  3088.   rm -f conftest*
  3089.   
  3090.   fi
  3091. ! echo "$ac_t""$gas_cv_assert_ok" 1>&4
  3092.   test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
  3093.   #define BROKEN_ASSERT 1
  3094.   EOF
  3095. --- 1434,1440 ----
  3096.   rm -f conftest*
  3097.   
  3098.   fi
  3099. ! /bin/echo "$ac_t""$gas_cv_assert_ok" 1>&4
  3100.   test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
  3101.   #define BROKEN_ASSERT 1
  3102.   EOF
  3103. ***************
  3104. *** 1452,1463 ****
  3105.   #endif
  3106.   "
  3107.   
  3108. ! echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&4
  3109.   if eval "test \"`echo '${'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
  3110. !   echo $ac_n "(cached) $ac_c" 1>&4
  3111.   else
  3112.     cat > conftest.$ac_ext <<EOF
  3113. ! #line 1461 "configure"
  3114.   #include "confdefs.h"
  3115.   $gas_test_headers
  3116.   int main() { return 0; }
  3117. --- 1459,1470 ----
  3118.   #endif
  3119.   "
  3120.   
  3121. ! /bin/echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&4
  3122.   if eval "test \"`echo '${'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
  3123. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  3124.   else
  3125.     cat > conftest.$ac_ext <<EOF
  3126. ! #line 1468 "configure"
  3127.   #include "confdefs.h"
  3128.   $gas_test_headers
  3129.   int main() { return 0; }
  3130. ***************
  3131. *** 1479,1485 ****
  3132.   rm -f conftest*
  3133.   
  3134.   fi
  3135. ! echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&4
  3136.   test $gas_cv_decl_needed_malloc = no || {
  3137.    cat >> confdefs.h <<\EOF
  3138.   #define NEED_DECLARATION_MALLOC 1
  3139. --- 1486,1492 ----
  3140.   rm -f conftest*
  3141.   
  3142.   fi
  3143. ! /bin/echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&4
  3144.   test $gas_cv_decl_needed_malloc = no || {
  3145.    cat >> confdefs.h <<\EOF
  3146.   #define NEED_DECLARATION_MALLOC 1
  3147. ***************
  3148. *** 1488,1499 ****
  3149.   }
  3150.   
  3151.   
  3152. ! echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&4
  3153.   if eval "test \"`echo '${'gas_cv_decl_needed_free'+set}'`\" = set"; then
  3154. !   echo $ac_n "(cached) $ac_c" 1>&4
  3155.   else
  3156.     cat > conftest.$ac_ext <<EOF
  3157. ! #line 1497 "configure"
  3158.   #include "confdefs.h"
  3159.   $gas_test_headers
  3160.   int main() { return 0; }
  3161. --- 1495,1506 ----
  3162.   }
  3163.   
  3164.   
  3165. ! /bin/echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&4
  3166.   if eval "test \"`echo '${'gas_cv_decl_needed_free'+set}'`\" = set"; then
  3167. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  3168.   else
  3169.     cat > conftest.$ac_ext <<EOF
  3170. ! #line 1504 "configure"
  3171.   #include "confdefs.h"
  3172.   $gas_test_headers
  3173.   int main() { return 0; }
  3174. ***************
  3175. *** 1515,1521 ****
  3176.   rm -f conftest*
  3177.   
  3178.   fi
  3179. ! echo "$ac_t""$gas_cv_decl_needed_free" 1>&4
  3180.   test $gas_cv_decl_needed_free = no || {
  3181.    cat >> confdefs.h <<\EOF
  3182.   #define NEED_DECLARATION_FREE 1
  3183. --- 1522,1528 ----
  3184.   rm -f conftest*
  3185.   
  3186.   fi
  3187. ! /bin/echo "$ac_t""$gas_cv_decl_needed_free" 1>&4
  3188.   test $gas_cv_decl_needed_free = no || {
  3189.    cat >> confdefs.h <<\EOF
  3190.   #define NEED_DECLARATION_FREE 1
  3191. ***************
  3192. *** 1527,1538 ****
  3193.   # Does errno.h declare errno, or do we have to add a separate declaration
  3194.   # for it?
  3195.   
  3196. ! echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&4
  3197.   if eval "test \"`echo '${'gas_cv_decl_needed_errno'+set}'`\" = set"; then
  3198. !   echo $ac_n "(cached) $ac_c" 1>&4
  3199.   else
  3200.     cat > conftest.$ac_ext <<EOF
  3201. ! #line 1536 "configure"
  3202.   #include "confdefs.h"
  3203.   
  3204.   #ifdef HAVE_ERRNO_H
  3205. --- 1534,1545 ----
  3206.   # Does errno.h declare errno, or do we have to add a separate declaration
  3207.   # for it?
  3208.   
  3209. ! /bin/echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&4
  3210.   if eval "test \"`echo '${'gas_cv_decl_needed_errno'+set}'`\" = set"; then
  3211. !   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  3212.   else
  3213.     cat > conftest.$ac_ext <<EOF
  3214. ! #line 1543 "configure"
  3215.   #include "confdefs.h"
  3216.   
  3217.   #ifdef HAVE_ERRNO_H
  3218. ***************
  3219. *** 1558,1564 ****
  3220.   rm -f conftest*
  3221.   
  3222.   fi
  3223. ! echo "$ac_t""$gas_cv_decl_needed_errno" 1>&4
  3224.   test $gas_cv_decl_needed_errno = no || {
  3225.    cat >> confdefs.h <<\EOF
  3226.   #define NEED_DECLARATION_ERRNO 1
  3227. --- 1565,1571 ----
  3228.   rm -f conftest*
  3229.   
  3230.   fi
  3231. ! /bin/echo "$ac_t""$gas_cv_decl_needed_errno" 1>&4
  3232.   test $gas_cv_decl_needed_errno = no || {
  3233.    cat >> confdefs.h <<\EOF
  3234.   #define NEED_DECLARATION_ERRNO 1
  3235. ***************
  3236. *** 1618,1624 ****
  3237.   : ${CONFIG_STATUS=./config.status}
  3238.   
  3239.   echo creating $CONFIG_STATUS
  3240. ! rm -f $CONFIG_STATUS
  3241.   cat > $CONFIG_STATUS <<EOF
  3242.   #!/bin/sh
  3243.   # Generated automatically by configure.
  3244. --- 1625,1633 ----
  3245.   : ${CONFIG_STATUS=./config.status}
  3246.   
  3247.   echo creating $CONFIG_STATUS
  3248. ! # Some systems, like AmigaDOS, won't allow you to remove a script that is
  3249. ! # being executed, so just move it out of the way instead.
  3250. ! if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  3251.   cat > $CONFIG_STATUS <<EOF
  3252.   #!/bin/sh
  3253.   # Generated automatically by configure.
  3254. ***************
  3255. *** 1639,1645 ****
  3256.       echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3257.       exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3258.     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3259. !     echo "$CONFIG_STATUS generated by autoconf version 2.0"
  3260.       exit 0 ;;
  3261.     -help | --help | --hel | --he | --h)
  3262.       echo "\$ac_cs_usage"; exit 0 ;;
  3263. --- 1648,1654 ----
  3264.       echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3265.       exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3266.     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3267. !     /bin/echo "$CONFIG_STATUS generated by autoconf version 2.1"
  3268.       exit 0 ;;
  3269.     -help | --help | --hel | --he | --h)
  3270.       echo "\$ac_cs_usage"; exit 0 ;;
  3271. ***************
  3272. *** 1703,1723 ****
  3273.   for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3274.     # Support "outfile[:infile]", defaulting infile="outfile.in".
  3275.     case "$ac_file" in
  3276. !   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3277. !        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3278.     *) ac_file_in="${ac_file}.in" ;;
  3279.     esac
  3280.   
  3281.     # Adjust relative srcdir, etc. for subdirectories.
  3282.   
  3283.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3284. !   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3285.     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3286.       # The file is in a subdirectory.
  3287.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3288.       ac_dir_suffix="/$ac_dir"
  3289.       # A "../" for each directory in $ac_dir_suffix.
  3290. !     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3291.     else
  3292.       ac_dir_suffix= ac_dots=
  3293.     fi
  3294. --- 1712,1732 ----
  3295.   for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3296.     # Support "outfile[:infile]", defaulting infile="outfile.in".
  3297.     case "$ac_file" in
  3298. !   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  3299. !        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  3300.     *) ac_file_in="${ac_file}.in" ;;
  3301.     esac
  3302.   
  3303.     # Adjust relative srcdir, etc. for subdirectories.
  3304.   
  3305.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3306. !   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3307.     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3308.       # The file is in a subdirectory.
  3309.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3310.       ac_dir_suffix="/$ac_dir"
  3311.       # A "../" for each directory in $ac_dir_suffix.
  3312. !     ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3313.     else
  3314.       ac_dir_suffix= ac_dots=
  3315.     fi
  3316. ***************
  3317. *** 1725,1731 ****
  3318.     case "$ac_given_srcdir" in
  3319.     .)  srcdir=.
  3320.         if test -z "$ac_dots"; then top_srcdir=.
  3321. !       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3322.     /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3323.     *) # Relative path.
  3324.       srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3325. --- 1734,1740 ----
  3326.     case "$ac_given_srcdir" in
  3327.     .)  srcdir=.
  3328.         if test -z "$ac_dots"; then top_srcdir=.
  3329. !       else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
  3330.     /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3331.     *) # Relative path.
  3332.       srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3333. ***************
  3334. *** 1738,1744 ****
  3335.     esac
  3336.     echo creating "$ac_file"
  3337.     rm -f "$ac_file"
  3338. !   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3339.     case "$ac_file" in
  3340.     *Makefile*) ac_comsub="1i\\
  3341.   # $configure_input" ;;
  3342. --- 1747,1753 ----
  3343.     esac
  3344.     echo creating "$ac_file"
  3345.     rm -f "$ac_file"
  3346. !   configure_input="Generated automatically from `/bin/echo $ac_file_in|sed 's%.*/%%'` by configure."
  3347.     case "$ac_file" in
  3348.     *Makefile*) ac_comsub="1i\\
  3349.   # $configure_input" ;;
  3350. ***************
  3351. *** 1776,1783 ****
  3352.   for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3353.     # Support "outfile[:infile]", defaulting infile="outfile.in".
  3354.     case "$ac_file" in
  3355. !   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3356. !        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3357.     *) ac_file_in="${ac_file}.in" ;;
  3358.     esac
  3359.   
  3360. --- 1785,1792 ----
  3361.   for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3362.     # Support "outfile[:infile]", defaulting infile="outfile.in".
  3363.     case "$ac_file" in
  3364. !   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  3365. !        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  3366.     *) ac_file_in="${ac_file}.in" ;;
  3367.     esac
  3368.   
  3369. ***************
  3370. *** 1841,1847 ****
  3371.     cat conftest.in >> conftest.h
  3372.     rm -f conftest.in
  3373.     if cmp -s $ac_file conftest.h 2>/dev/null; then
  3374. !     echo "$ac_file is unchanged"
  3375.       rm -f conftest.h
  3376.     else
  3377.       rm -f $ac_file
  3378. --- 1850,1856 ----
  3379.     cat conftest.in >> conftest.h
  3380.     rm -f conftest.in
  3381.     if cmp -s $ac_file conftest.h 2>/dev/null; then
  3382. !     /bin/echo "$ac_file is unchanged"
  3383.       rm -f conftest.h
  3384.     else
  3385.       rm -f $ac_file
  3386. ***************
  3387. *** 1873,1885 ****
  3388.   
  3389.     # Make relative symlinks.
  3390.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3391. !   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  3392.     if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
  3393.       # The dest file is in a subdirectory.
  3394.       test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
  3395.       ac_dest_dir_suffix="/$ac_dest_dir"
  3396.       # A "../" for each directory in $ac_dest_dir_suffix.
  3397. !     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
  3398.     else
  3399.       ac_dest_dir_suffix= ac_dots=
  3400.     fi
  3401. --- 1882,1894 ----
  3402.   
  3403.     # Make relative symlinks.
  3404.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3405. !   ac_dest_dir=`/bin/echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  3406.     if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
  3407.       # The dest file is in a subdirectory.
  3408.       test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
  3409.       ac_dest_dir_suffix="/$ac_dest_dir"
  3410.       # A "../" for each directory in $ac_dest_dir_suffix.
  3411. !     ac_dots=`/bin/echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
  3412.     else
  3413.       ac_dest_dir_suffix= ac_dots=
  3414.     fi
  3415. ***************
  3416. *** 1890,1897 ****
  3417.     esac
  3418.   
  3419.     # Make a symlink if possible; otherwise try a hard link.
  3420. !   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
  3421. !     ln $srcdir/$ac_source $ac_dest; then :
  3422.     else
  3423.       { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  3424.     fi
  3425. --- 1899,1908 ----
  3426.     esac
  3427.   
  3428.     # Make a symlink if possible; otherwise try a hard link.
  3429. !   # On the Amiga, we instead try a hard link first and then
  3430. !   # just do a cp, since symbolic links still have rough edges.
  3431. !   if ln $ac_rel_source $ac_dest 2>/dev/null ||
  3432. !     cp -p $srcdir/$ac_source $ac_dest; then :
  3433.     else
  3434.       { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  3435.     fi
  3436. diff -rc --new-file binutils-2.5.2/gas/configure.in /gnu/src/amiga/binutils-2.5.2/gas/configure.in
  3437. *** binutils-2.5.2/gas/configure.in    Tue Nov  1 23:17:54 1994
  3438. --- /gnu/src/amiga/binutils-2.5.2/gas/configure.in    Mon Nov 21 07:42:33 1994
  3439. ***************
  3440. *** 39,44 ****
  3441. --- 39,45 ----
  3442.     m683??)       cpu_type=m68k ;;
  3443.   changequote([,])dnl
  3444.     m8*)        cpu_type=m88k ;;
  3445. +   m68*)        cpu_type=m68k ;;
  3446.     mips*el)    cpu_type=mips endian=little;;
  3447.     mips*)    cpu_type=mips endian=big ;;
  3448.     powerpc*)    cpu_type=ppc ;;
  3449. ***************
  3450. *** 109,115 ****
  3451.     i960-*-vxworks5.*)    obj_format=coff emulation=ic960 gas_target=ic960coff ;;
  3452.     i960-*-vxworks*)    obj_format=bout ;;
  3453.   
  3454. !   m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*)
  3455.               obj_format=aout emulation=sun3 ;;
  3456.     m68k-motorola-sysv)    obj_format=coff gas_target=m68kcoff emulation=delta ;;
  3457.     m68k-bull-sysv3*)    obj_format=coff gas_target=m68kcoff emulation=dpx2 ;;
  3458. --- 110,116 ----
  3459.     i960-*-vxworks5.*)    obj_format=coff emulation=ic960 gas_target=ic960coff ;;
  3460.     i960-*-vxworks*)    obj_format=bout ;;
  3461.   
  3462. !   m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos* | m68*-cbm-amigados*)
  3463.               obj_format=aout emulation=sun3 ;;
  3464.     m68k-motorola-sysv)    obj_format=coff gas_target=m68kcoff emulation=delta ;;
  3465.     m68k-bull-sysv3*)    obj_format=coff gas_target=m68kcoff emulation=dpx2 ;;
  3466. diff -rc --new-file binutils-2.5.2/ld/Makefile.in /gnu/src/amiga/binutils-2.5.2/ld/Makefile.in
  3467. *** binutils-2.5.2/ld/Makefile.in    Wed Oct 19 18:36:47 1994
  3468. --- /gnu/src/amiga/binutils-2.5.2/ld/Makefile.in    Mon Nov 21 07:42:35 1994
  3469. ***************
  3470. *** 58,64 ****
  3471.   AR = ar
  3472.   AR_FLAGS = qv
  3473.   CC = cc
  3474. ! CFLAGS = -g
  3475.   MAKEINFO = makeinfo
  3476.   TEXI2DVI = texi2dvi
  3477.   RANLIB = ranlib
  3478. --- 58,64 ----
  3479.   AR = ar
  3480.   AR_FLAGS = qv
  3481.   CC = cc
  3482. ! CFLAGS = -O2
  3483.   MAKEINFO = makeinfo
  3484.   TEXI2DVI = texi2dvi
  3485.   RANLIB = ranlib
  3486. ***************
  3487. *** 274,279 ****
  3488. --- 274,282 ----
  3489.   GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${host_alias} ${target_alias} ${EMUL} "$(NATIVE_LIB_DIRS)"
  3490.   GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
  3491.   
  3492. + eamigados.c: $(srcdir)/emulparams/amigados.sh \
  3493. +   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
  3494. +     ${GENSCRIPTS} amigados
  3495.   esun4.c: $(srcdir)/emulparams/sun4.sh \
  3496.     $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
  3497.       ${GENSCRIPTS} sun4
  3498. ***************
  3499. *** 440,446 ****
  3500.       ${GENSCRIPTS} netbsd532
  3501.   
  3502.   $(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY)
  3503. !     $(CC) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(EXTRALIBS)
  3504.   
  3505.   # The generated emulation files mostly have the same dependencies.
  3506.   $(EMULATION_OFILES): ../bfd/bfd.h ../bfd/sysdep.h $(INCDIR)/bfdlink.h \
  3507. --- 443,449 ----
  3508.       ${GENSCRIPTS} netbsd532
  3509.   
  3510.   $(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY)
  3511. !     $(CC) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(EXTRALIBS) -lfl
  3512.   
  3513.   # The generated emulation files mostly have the same dependencies.
  3514.   $(EMULATION_OFILES): ../bfd/bfd.h ../bfd/sysdep.h $(INCDIR)/bfdlink.h \
  3515. diff -rc --new-file binutils-2.5.2/ld/config/amigados.mh /gnu/src/amiga/binutils-2.5.2/ld/config/amigados.mh
  3516. *** binutils-2.5.2/ld/config/amigados.mh    Thu Jan  1 00:00:00 1970
  3517. --- /gnu/src/amiga/binutils-2.5.2/ld/config/amigados.mh    Thu Nov 10 15:58:30 1994
  3518. ***************
  3519. *** 0 ****
  3520. --- 1,14 ----
  3521. + # Host: Commodore Amiga running AmigaDOS.
  3522. + NAT_FILE= nm-amigados.h
  3523. + NATDEPFILES=
  3524. + XDEPFILES=
  3525. + XM_FILE= xm-amigados.h
  3526. + REGEX=regex.o
  3527. + REGEX1=regex.o
  3528. + # Use GNU C compiler
  3529. + CC = gcc
  3530. + # Use GNU install
  3531. + INSTALL = /bin/install -c
  3532. + # Don't use the mmalloc library, there is no sbrk() or mmap().
  3533. + MMALLOC=
  3534. + MMALLOC_DISABLE = -DNO_MMALLOC
  3535. diff -rc --new-file binutils-2.5.2/ld/config/amigados.mt /gnu/src/amiga/binutils-2.5.2/ld/config/amigados.mt
  3536. *** binutils-2.5.2/ld/config/amigados.mt    Thu Jan  1 00:00:00 1970
  3537. --- /gnu/src/amiga/binutils-2.5.2/ld/config/amigados.mt    Mon Nov 21 07:42:36 1994
  3538. ***************
  3539. *** 0 ****
  3540. --- 1,5 ----
  3541. + # Target: Commodore Amiga running AmigaDOS
  3542. + TDEPFILES= m68k-pinsn.o exec.o m68k-tdep.o
  3543. + TM_FILE= tm-amigados.h
  3544. + EMUL=amigados
  3545. + EMUL_EXTRA=sun3
  3546. diff -rc --new-file binutils-2.5.2/ld/configure.in /gnu/src/amiga/binutils-2.5.2/ld/configure.in
  3547. *** binutils-2.5.2/ld/configure.in    Fri Oct 21 22:19:47 1994
  3548. --- /gnu/src/amiga/binutils-2.5.2/ld/configure.in    Thu Nov 10 15:58:32 1994
  3549. ***************
  3550. *** 94,99 ****
  3551. --- 94,100 ----
  3552.     m68*-*-coff)        ld_target=m68k-coff ;;
  3553.     m68*-*-hpux*)        ld_target=hp300hpux ;;
  3554.     m68*-*-lynxos*)    ld_target=m68k-lynx ;;
  3555. +   m68*-cbm-amigados*)    ld_target=amigados ;;
  3556.     m68*-*-*)
  3557.       echo '***' "Unknown m68k target vendor for ld:" ${target_vendor} 1>&2
  3558.               exit 1 ;;
  3559. diff -rc --new-file binutils-2.5.2/ld/emulparams/amigados.sh /gnu/src/amiga/binutils-2.5.2/ld/emulparams/amigados.sh
  3560. *** binutils-2.5.2/ld/emulparams/amigados.sh    Thu Jan  1 00:00:00 1970
  3561. --- /gnu/src/amiga/binutils-2.5.2/ld/emulparams/amigados.sh    Thu Nov 10 15:58:33 1994
  3562. ***************
  3563. *** 0 ****
  3564. --- 1,7 ----
  3565. + SCRIPT_NAME=aout
  3566. + OUTPUT_FORMAT="amiga"
  3567. + TEXT_START_ADDR=0x400
  3568. + PAGE_SIZE=0x400
  3569. + SEGMENT_SIZE=0x400
  3570. + NONPAGED_TEXT_START_ADDR=0x400
  3571. + ARCH=m68k
  3572. diff -rc --new-file binutils-2.5.2/ld/ldmain.c /gnu/src/amiga/binutils-2.5.2/ld/ldmain.c
  3573. *** binutils-2.5.2/ld/ldmain.c    Wed Oct 26 05:23:55 1994
  3574. --- /gnu/src/amiga/binutils-2.5.2/ld/ldmain.c    Thu Nov 10 15:58:35 1994
  3575. ***************
  3576. *** 45,50 ****
  3577. --- 45,54 ----
  3578.   
  3579.   #include <string.h>
  3580.   
  3581. + #ifndef __amigados__
  3582. + #define HAVE_SBRK
  3583. + #endif
  3584.   static char *get_emulation PARAMS ((int, char **));
  3585.   static void set_scripts_dir PARAMS ((void));
  3586.   
  3587. ***************
  3588. *** 319,331 ****
  3589. --- 323,339 ----
  3590.     if (config.stats)
  3591.       {
  3592.         extern char **environ;
  3593. + #ifdef HAVE_SBRK
  3594.         char *lim = (char *) sbrk (0);
  3595. + #endif
  3596.         long run_time = get_run_time () - start_time;
  3597.   
  3598.         fprintf (stderr, "%s: total time in link: %ld.%06ld\n",
  3599.              program_name, run_time / 1000000, run_time % 1000000);
  3600. + #ifdef HAVE_SBRK
  3601.         fprintf (stderr, "%s: data size %ld\n", program_name,
  3602.              (long) (lim - (char *) &environ));
  3603. + #endif
  3604.       }
  3605.   
  3606.     /* Prevent remove_output from doing anything, after a successful link.  */
  3607. diff -rc --new-file binutils-2.5.2/libiberty/config/mh-amigados /gnu/src/amiga/binutils-2.5.2/libiberty/config/mh-amigados
  3608. *** binutils-2.5.2/libiberty/config/mh-amigados    Thu Jan  1 00:00:00 1970
  3609. --- /gnu/src/amiga/binutils-2.5.2/libiberty/config/mh-amigados    Thu Nov 10 15:58:35 1994
  3610. ***************
  3611. *** 0 ****
  3612. --- 1,9 ----
  3613. + # Host configuration for Commodore Amiga running AmigaDOS.
  3614. + # We don't actually use libmmalloc.a, since there is no sbrk(),
  3615. + # but this allows us to compile it (and then ignore it).
  3616. + CC=gcc
  3617. + # We don't need -g yet, so do -O instead.
  3618. + CFLAGS=-O
  3619. + MMALLOC=
  3620. + MMALLOC_DISABLE = -DNO_MMALLOC
  3621. diff -rc --new-file binutils-2.5.2/libiberty/config.table /gnu/src/amiga/binutils-2.5.2/libiberty/config.table
  3622. *** binutils-2.5.2/libiberty/config.table    Mon Sep  5 10:52:49 1994
  3623. --- /gnu/src/amiga/binutils-2.5.2/libiberty/config.table    Thu Nov 10 15:58:37 1994
  3624. ***************
  3625. *** 22,27 ****
  3626. --- 22,28 ----
  3627.     *-*-sysv4*)        frag=mh-sysv4 ;;
  3628.     *-*-sysv*)        frag=mh-sysv ;;
  3629.     *-*-go32)        frag=mh-go32 ;;
  3630. +   *-*-amigados*)    frag=mh-amigados ;;
  3631.   esac
  3632.   
  3633.   # xiberty sets xhost.  Try to handle funky case of solaris 2 -> sun 4.
  3634. diff -rc --new-file binutils-2.5.2/libiberty/xmalloc.c /gnu/src/amiga/binutils-2.5.2/libiberty/xmalloc.c
  3635. *** binutils-2.5.2/libiberty/xmalloc.c    Wed Sep 14 21:06:41 1994
  3636. --- /gnu/src/amiga/binutils-2.5.2/libiberty/xmalloc.c    Thu Nov 10 15:58:38 1994
  3637. ***************
  3638. *** 28,33 ****
  3639. --- 28,37 ----
  3640.   #define size_t unsigned long
  3641.   #endif
  3642.   
  3643. + #ifndef __amigados__
  3644. + #define HAVE_SBRK
  3645. + #endif
  3646.   /* For systems with larger pointers than ints, these must be declared.  */
  3647.   PTR malloc PARAMS ((size_t));
  3648.   PTR realloc PARAMS ((PTR, size_t));
  3649. ***************
  3650. *** 42,50 ****
  3651. --- 46,58 ----
  3652.   xmalloc_set_program_name (s)
  3653.        const char *s;
  3654.   {
  3655. + #ifdef HAVE_SBRK
  3656.     name = s;
  3657.     if (first_break == NULL)
  3658.       first_break = (char *) sbrk (0);
  3659. + #else
  3660. +   return;
  3661. + #endif
  3662.   }
  3663.   
  3664.   PTR
  3665. ***************
  3666. *** 58,63 ****
  3667. --- 66,72 ----
  3668.     newmem = malloc (size);
  3669.     if (!newmem)
  3670.       {
  3671. + #ifdef HAVE_SBRK
  3672.         extern char **environ;
  3673.         size_t allocated;
  3674.   
  3675. ***************
  3676. *** 69,74 ****
  3677. --- 78,84 ----
  3678.              "\n%s%sCan not allocate %lu bytes after allocating %lu bytes\n",
  3679.              name, *name ? ": " : "",
  3680.              (unsigned long) size, (unsigned long) allocated);
  3681. + #endif
  3682.         xexit (1);
  3683.       }
  3684.     return (newmem);
  3685. ***************
  3686. *** 89,94 ****
  3687. --- 99,105 ----
  3688.       newmem = realloc (oldmem, size);
  3689.     if (!newmem)
  3690.       {
  3691. + #ifdef HAVE_SBRK
  3692.         extern char **environ;
  3693.         size_t allocated;
  3694.   
  3695. ***************
  3696. *** 100,105 ****
  3697. --- 111,117 ----
  3698.              "\n%s%sCan not reallocate %lu bytes after allocating %lu bytes\n",
  3699.              name, *name ? ": " : "",
  3700.              (unsigned long) size, (unsigned long) allocated);
  3701. + #endif
  3702.         xexit (1);
  3703.       }
  3704.     return (newmem);
  3705.