home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-2.iso / Unix / mail / elm2.4 / elm-2.4.21-hints.shar / how2next < prev    next >
Encoding:
Text File  |  1993-06-12  |  5.3 KB  |  167 lines

  1.         Compiling Elm 2.4PL21 on NeXT Computers
  2.         =======================================
  3.         Jess Anderson (anderson@macc.wisc.edu)
  4.                        Feb 27, 1993
  5.         =======================================
  6.  
  7. Elm can be configured many different ways.  This file tells
  8. you about just some of the ways.  If you do it a different
  9. way and run into problems on a NeXT machine, please tell me
  10. about how you solved them so I can update these
  11. instructions.
  12.  
  13. Change two source files
  14. -----------------------
  15. Changes introduced at PL 21 depend on a header file called
  16. unistd.h, which does not exist on NeXT.  This requires a
  17. manual intervention in two files, <elm>/hdrs/defs.h and
  18. <elm>/hdrs/filter.h, to comment out the references.  Save
  19. the originals, since you may need to back out when another
  20. patch comes along.  I anticipate that patch 22 will fix this
  21. particular problem.
  22.  
  23. These diffs explain the changes:
  24.  
  25. $ diff hdrs/defs.h hdrs/defs.h.orig
  26. 498,499c498
  27. < #ifndef NeXT
  28. < #  ifndef ANSI_C   /* ANSI puts these in string.h */
  29. ---
  30. > #ifndef ANSI_C   /* ANSI puts these in string.h */
  31. 505,508c504,506
  32. < #  else
  33. < #    include <unistd.h> /* ansi C puts sleep, lseek and fseek in unistd.h */
  34. < #  endif
  35. < #endif /* NeXT */
  36. ---
  37. > #else
  38. > #  include <unistd.h> /* ansi C puts sleep, lseek and fseek in unistd.h */
  39. > #endif
  40.  
  41. $ diff hdrs/filter.h hdrs/filter.h.orig
  42. 217,219c217
  43. < #  ifndef NeXT
  44. < #    include <unistd.h>  /* NeXT doesn't have this header file */
  45. < #  endif /* !NeXT */
  46. ---
  47. > #include <unistd.h>
  48.  
  49.  
  50. Running Configure
  51. -----------------
  52. When I run Configure (I'm on NS3.0), I take the default
  53. responses for all questions except those noted here.
  54.  
  55. Give the name of the program used to process manual pages on your
  56. system: [/usr/bin/troff] /usr/bin/ptroff
  57.  
  58. What options should Elm use with /usr/bin/ptroff: [] -t
  59.  
  60. What optimizer/debugger flag should be used? [-O] -O -pipe
  61.  
  62.    Note: -pipe speeds up the compilation, but it's not
  63.    required, so you could take this default.  Also, one
  64.    person told me they used -O2 with gcc as their compiler.
  65.  
  66. Any additional cc flags? [none] -bsd
  67.  
  68.    Note: This used to be -bsd -fwritable-strings.  That no
  69.    longer seems necessary.  In fact, Elm will compile and
  70.    run if you take the default here.  Using -bsd, however,
  71.    greatly reduces the number of compiler warnings you get.
  72.    One person told me he could *not* use -bsd; he's running
  73.    NS 2.2 (actually, I think he had a different problem, but
  74.    I never got that ironed out.
  75.  
  76. Any additional ld flags (NOT including libraries)? [none]
  77.  
  78.    Note: Using -object here (would give you smaller
  79.    binaries) will cause a hang right near the end, while
  80.    linking filter.
  81.  
  82. What is the full path name of the include file
  83. directory? [] /usr/include/bsd
  84.  
  85.    You need this with NS3.0.
  86.  
  87. Am I going to be running as a setgid program? [y] n
  88.  
  89.    Note: it will work if you say yes, but it's better
  90.    security, they tell me, not to.
  91.  
  92. In addition to these answers, I also set my domain and
  93. turned MIME on.  You may want to take other nondefault
  94. options, but I can't vouch for what will happen.
  95.  
  96.  
  97. Configure options for NeXTstep NS1.0, NS2.x
  98. -------------------------------------------
  99. Note: these have been provided by others; I'm just passing
  100. them on here.
  101.  
  102. libs='-lsys_s'
  103. includepath='/usr/include'
  104. ccflags='-bsd'  [but apparently not for 2.2?]
  105. ldflags='-object' [optional, for smaller binaries]
  106.  
  107. Note: there no longer is a tag named d_voidsig= in
  108. config.sh.  Configure also finds the compiler library,
  109. /lib/libsys_s.a, so the question about that has gone away.
  110.  
  111.  
  112. At the shell escape prompt or just before
  113. -----------------------------------------
  114. Beginning with Elm 2.4, there is a mechanism for changing
  115. config.sh at the end of the Configure process.  If a file
  116. named config.over exists, Configure asks if you want to
  117. apply it.  If you say yes, it does, then pauses at the
  118. famous shell escape prompt.
  119.  
  120. I have this in my config.over:
  121.  
  122. d_memcpy='undef'
  123. sigtype='int'
  124. d_tzname='undef'
  125. d_bsd='define'
  126. passcat='nidump passwd /'
  127. nametype='bsd'
  128.  
  129.    Note: You must have the first four of these.  There is
  130.    some disagreement about the other two.  The passcat
  131.    line doesn't actually get used, it seems.  One person has
  132.    nametype='other' and d_password='define', says it works
  133.    for him.  
  134.  
  135. When Configure gives you the option to use a shell escape to
  136. edit config.sh before proceeding, do so unless you used the
  137. config.over file and make the changes listed above.
  138.  
  139.  
  140. Reconfigure script
  141. ------------------
  142.  
  143. I've tried so many different things by editing config.sh
  144. manually at the shell escape prompt that I finally wrote a
  145. simple script to run it over all the SH files before
  146. compiling.  To use it, put it in your top elm directory, do a
  147. chmod +x to make it executabl, then run it; basically, it's
  148. the tail end of Configure following the shell escape.
  149.  
  150. Compilation 
  151. ----------- 
  152. Then run a make.  Some warnings appear during compilation
  153. (takes about 10 minutes); they don't seem to make a
  154. difference.  You have to be root to run make install at the
  155. end of the compilation.
  156.  
  157.  
  158. Credits
  159. -------
  160.  
  161. Several people contributed to this effort.  They include Syd
  162. Weinstein (syd@dsinc.dsi.com), Jeff Nicholson-Owens
  163. (jeffo@uiuc.edu), Eric P. Scott (eps@toaster.sfsu.edu), Guy
  164. Thomas (gthomas@native-ed.bc.ca), and Heiko Rupp
  165. (hwr@pilhuhn.ka.sub.org).  Many thanks to all.  But I'll take
  166. the blame if there are errors here.
  167.