home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / f2csrc.zip / f2csrc / src / README < prev    next >
Text File  |  1994-02-28  |  6KB  |  124 lines

  1. Type "make" to check the validity of the f2c source and compile f2c.
  2.  
  3. On a PC, you may need to compile xsum.c with -DMSDOS (i.e., with
  4. MSDOS #defined).
  5.  
  6. If your compiler does not understand ANSI/ISO C syntax (i.e., if
  7. you have a K&R C compiler), compile with -DKR_headers .
  8.  
  9. On non-Unix systems where files have separate binary and text modes,
  10. you may need to "make xsumr.out" rather than "make xsum.out".
  11.  
  12. If (in accordance with what follows) you need to modify the makefile
  13. or any of the source files, first issue a "make xsum.out" (or, if
  14. appropriate, "make xsumr.out") to check the validity of the f2c source,
  15. then make your changes, then type "make f2c".
  16.  
  17. The file usignal.h is for the benefit of strictly ANSI include files
  18. on a UNIX system -- the ANSI signal.h does not define SIGHUP or SIGQUIT.
  19. You may need to modify usignal.h if you are not running f2c on a UNIX
  20. system.
  21.  
  22. Should you get the message "xsum0.out xsum1.out differ", see what lines
  23. are different (`diff xsum0.out xsum1.out`) and ask netlib to send you
  24. the files in question "from f2c/src".  For example, if exec.c and
  25. expr.c have incorrect check sums, you would send netlib the message
  26.     send exec.c expr.c from f2c/src
  27.  
  28. On some systems, the malloc and free in malloc.c let f2c run faster
  29. than do the standard malloc and free.  Other systems cannot tolerate
  30. redefinition of malloc and free.  If yours is such a system, you may
  31. either modify the makefile appropriately, or simply execute
  32.     cc -c -DCRAY malloc.c
  33. before typing "make".  Still other systems have a -lmalloc that
  34. provides performance competitive with that from malloc.c; you may
  35. wish to compare the two on your system.
  36.  
  37. On some BSD systems, you may need to create a file named "string.h"
  38. whose single line is
  39. #include <strings.h>
  40. you may need to add " -Dstrchr=index" to the "CFLAGS =" assignment
  41. in the makefile, and you may need to add " memset.o" to the "OBJECTS ="
  42. assignment in the makefile -- see the comments in memset.c .
  43.  
  44. For non-UNIX systems, you may need to change some things in sysdep.c,
  45. such as the choice of intermediate file names.
  46.  
  47. On some systems, you may need to modify parts of sysdep.h (which is
  48. included by defs.h).  In particular, for Sun 4.1 systems and perhaps
  49. some others, you need to comment out the typedef of size_t.  For some
  50. systems (e.g., IRIX 4.0.1 and AIX) it is better to add
  51. #define ANSI_Libraries
  52. to the beginning of sysdep.h (or to supply -DANSI_Libraries in the
  53. makefile).
  54.  
  55. Alas, some systems #define __STDC__ but do not provide a true standard
  56. (ANSI or ISO) C environment, e.g. do not provide stdlib.h .  If yours
  57. is such a system, then (a) you should complain loudly to your vendor
  58. about __STDC__ being erroneously defined, and (b) you should insert
  59. #undef __STDC__
  60. at the beginning of sysdep.h .  You may need to make other adjustments.
  61.  
  62. For some non-ANSI versions of stdio, you must change the values given
  63. to binread and binwrite in sysdep.c from "rb" and "wb" to "r" and "w".
  64. You may need to make this change if you run f2c and get an error
  65. message of the form
  66.     Compiler error ... cannot open intermediate file ...
  67.  
  68. On many systems, it is best to combine libF77 and libI77 into a single
  69. library, say libf2c, as suggested in "readme from f2c".  If you do this,
  70. then you should adjust the definition of link_msg in sysdep.c
  71. appropriately (e.g., replacing "-lF77 -lI77" by "-lf2c").
  72.  
  73. Some older C compilers object to
  74.     typedef void (*foo)();
  75. or to
  76.     typedef void zap;
  77.     zap (*foo)();
  78. If yours is such a compiler, change the definition of VOID in
  79. f2c.h from void to int.
  80.  
  81. For convenience with systems that use control-Z to denote end-of-file,
  82. f2c treats control-Z characters (ASCII 26, '\x1a') that appear at the
  83. beginning of a line as an end-of-file indicator.  You can disable this
  84. test by compiling lex.c with NO_EOF_CHAR_CHECK #defined, or can
  85. change control-Z to some other character by #defining EOF_CHAR to
  86. be the desired value.
  87.  
  88.  
  89. If your machine has IEEE, VAX, or IBM-mainframe arithmetic, but your
  90. printf is inaccurate (e.g., with Symantec C++ version 6.0,
  91. printf("%.17g",12.) prints 12.000000000000001), you can make f2c print
  92. correctly rounded numbers by compiling with -DUSE_DTOA and adding
  93. dtoa.o g_fmt.o to the makefile's OBJECTS = line, so it becomes
  94.  
  95.     OBJECTS = $(OBJECTSd) malloc.o dtoa.o g_fmt.o
  96.  
  97. Also add the rule
  98.  
  99.     dtoa.o: dtoa.c
  100.         $(CC) -c $(CFLAGS) -DMALLOC=ckalloc -DIEEE... dtoa.c
  101.  
  102. (without the initial tab) to the makefile, where IEEE... is one of
  103. IEEE_MC68k, IEEE_8087, VAX, or IBM, depending on your machine's
  104. arithmetic.  See the comments near the start of dtoa.c.
  105.  
  106. The relevant source files, dtoa.c and g_fmt.c, are available
  107. separately from netlib's fp directory.  For example, you could
  108. send the E-mail message
  109.  
  110.     send dtoa.c g_fmt.c from fp
  111.  
  112. to netlib@research.att.com (or use anonymous ftp from netlib.att.com
  113. and look in directory /netlib/fp).
  114.  
  115.  
  116. Please send bug reports to dmg@research.att.com .  The old index file
  117. (now called "readme" due to unfortunate changes in netlib conventions:
  118. "send readme from f2c") will report recent changes in the recent-change
  119. log at its end; all changes will be shown in the "changes" file
  120. ("send changes from f2c").  To keep current source, you will need to
  121. request xsum0.out and version.c, in addition to the changed source
  122. files.  Changes first appear on netlib@research.att.com, and in due
  123. time propagate to the other netlib sites that are kept current.
  124.